From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6FF2AA034F for ; Wed, 11 Aug 2021 12:11:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63E4040040; Wed, 11 Aug 2021 12:11:26 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 045C740040 for ; Wed, 11 Aug 2021 12:11:25 +0200 (CEST) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id D86943F04C for ; Wed, 11 Aug 2021 10:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628676684; bh=lxGQYb47T+Fej3cCg27xqy7MTiJ0i50V1KOLCkNvhDI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G/ircJtWlqrKSGyUzZFvPjTRKo/oXoEKqLilXKvt2qM/7rPJyOgSqHQRclnq8JFDn LKCrIV6k45vkZaHhwDJmYGDxgdphuv6TYTxOUk/iJIta0aCXKclMrpL5RbfTKLguYF vBvFr5ZzmRxb0PZq2x6smfKTk/B2HpIvaQQFhaPm7bWE1gUj6Qv4xrtrmuwMgF/jjR ENYfRBJAiu5mm/GhUA2QDUCScE+9Om0ALRcJcHAEkZMgYq74CuTrEO8CBaiAqSGmDS Ksy+IXBTSQpgcc3J4Si9XDxRrppPF99xkbVnQC1AEVweaqxWAGCcpFgVoOsCNp6x5e apaVQvaRaAoOA== Received: by mail-qk1-f200.google.com with SMTP id o17-20020ae9f5110000b02903d22e54c86eso1027347qkg.8 for ; Wed, 11 Aug 2021 03:11:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lxGQYb47T+Fej3cCg27xqy7MTiJ0i50V1KOLCkNvhDI=; b=APkUKGDU7PXZNrrcQBMf/2I/ba2tImIU0R6FHzp9+r4qzYPzfLZeT3qCQWiwptzh+J MOTyOlMw44qxp/qNKBnpif8kHDF1RV9Ui+mVQo8g/15IiApFWVCYlgX3ICmkNfPdcEWn jtnsGVVTtGlavP7EBgwlgjn+athLxK5fuFIYZ2IZbbpFj6EXhfjJGmOjCGXuiFLWMJEn TrcErH76DOcJpxGa76Ay1+6b5M6nQVRerX+9J1Fta8b6nX4PLGhydlhuKOrE27PPgIFH e19eXB382PsBKfhK+vLqjboPFSQfpSaTvxF2KVvWcVG8jTO87Q4ahrr/lBXVCrqyLECa qkYQ== X-Gm-Message-State: AOAM532V+BY/sutmLMVU+PdOgw+65HSQ3Y+vqxv1mYoCn4q8Dm5pWKFd lA3BDIQwWh8hBB1Z+mG7ezx9ozRn0Fz4+aRuBzjtUR3jGUVB6Np5iDlgYPcILRkHMTY0HOvY2Y2 OtXSOhifeOrPH6JkbOGrKdGj2Fy5xm/2H3j4ce641 X-Received: by 2002:a05:620a:7f0:: with SMTP id k16mr25238834qkk.33.1628676683917; Wed, 11 Aug 2021 03:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3tahRtKLbD4kog8J0hCofQ3ApmqCRPhZTubZyZlOhM3vBXMNxRa0z6C9OT2cavvXjyFCxH9eJzv9V9pE2Lfc= X-Received: by 2002:a05:620a:7f0:: with SMTP id k16mr25238821qkk.33.1628676683761; Wed, 11 Aug 2021 03:11:23 -0700 (PDT) MIME-Version: 1.0 References: <20210811095145.1846-1-mk@semihalf.com> <20210811095145.1846-2-mk@semihalf.com> In-Reply-To: <20210811095145.1846-2-mk@semihalf.com> From: Christian Ehrhardt Date: Wed, 11 Aug 2021 12:10:58 +0200 Message-ID: To: Michal Krawczyk Cc: dpdk stable , Shai Brandes , Shay Agroskin Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/ena: trigger reset on Tx prepare failure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Aug 11, 2021 at 11:52 AM Michal Krawczyk wrote: > > [ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ] > Applied, thanks! > If the prepare function failed, then it means the descriptors are in the > invalid state. > > This condition now triggers the reset, which should be further handled > by the application. > > To notify the application about prepare function failure, the error log > was added. In general, it should never fail in normal conditions, as the > Tx function checks for the available space in the Tx ring before the > preparation even starts. > > Fixes: 2081d5e2e92d ("net/ena: add reset routine") > Cc: stable@dpdk.org > > Signed-off-by: Michal Krawczyk > Reviewed-by: Shai Brandes > Reviewed-by: Shay Agroskin > --- > drivers/net/ena/ena_ethdev.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > index 6c9a2aa1a9..408e127511 100644 > --- a/drivers/net/ena/ena_ethdev.c > +++ b/drivers/net/ena/ena_ethdev.c > @@ -2359,7 +2359,12 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > rc = ena_com_prepare_tx(tx_ring->ena_com_io_sq, > &ena_tx_ctx, &nb_hw_desc); > if (unlikely(rc)) { > + PMD_DRV_LOG(ERR, > + "Failed to prepare Tx buffers, rc: %d\n", rc); > ++tx_ring->tx_stats.prepare_ctx_err; > + tx_ring->adapter->reset_reason = > + ENA_REGS_RESET_DRIVER_INVALID_STATE; > + tx_ring->adapter->trigger_reset = true; > break; > } > tx_info->tx_descs = nb_hw_desc; > -- > 2.25.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd