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 058A8A0C47 for ; Mon, 26 Jul 2021 15:55:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB43E40DDA; Mon, 26 Jul 2021 15:55:54 +0200 (CEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 67B93410E1 for ; Mon, 26 Jul 2021 15:55:52 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id b7so11195649wri.8 for ; Mon, 26 Jul 2021 06:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H0mvrvPz+6VwgSq12Nfngr/Dx7zr2jfVkDGCDlfpw2c=; b=h37+W+UWaZKx+a1Ll2WhXY4jH4X5uKjsv41zl6nadKLFOutJen8ymDfrEXq6G30AMW 2mIqnLjrG4QFc6dpnjpU+pQPpZ65ipgLb2hekEfe0XVw4q5pvwyqCwm+tXQsbiVEL5M7 fGsgzAIA2hPjvq18rfBvbNTTyM+hxoNeWBAsShU+nGEoYuHlOGVEztV2kVpJhtLZz1i6 kgBdh0dh36XpBEkA+Ey7doRy0ZNZXUbspjMimVCCmqL8eqKGS5Qzposd2Oz8oc4WGNA1 vSx703ehROcKsWrZ3hm3zyQR3RVI+gqyBlWLDfiQwtuM/Llgz2ZXvTuPLgFmRtJu0xUq HW0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H0mvrvPz+6VwgSq12Nfngr/Dx7zr2jfVkDGCDlfpw2c=; b=M8qyVeOj+FRUd4wAiCPUFsuNeQVEhtNHh3o5CRjr/FEnN/B8ul5dtccI027Aw62F4q 7VE8Q5uJKMGoCaHRukygxVYddUqFK96soO8yPKc1J/CG5aFqXMoSM2v2lv9QGgCUMPHL deFkGixTKif1WRuOdC89Te5h3s18ksrK7kso8Vhh52iurPaT2ui38cp04r+/M6lQH6HW DlQZ0PHY76KEBvWE/pzPMtMtcc8Z5Dmd29i0dQKXAbhnspki62eL2qj0TtIx3PR7uVzq zurEmLAMndZ92HhWuWi0r8dCI8e/Qi/sE0h3amXGAwhBZ1g2YzqtGNB2I8FOTz5OW47M ez3g== X-Gm-Message-State: AOAM530QE8GkIHDwCo6hOu6z8pAZ23kjq5OiRKttIVtqj3CcTeRQwlsZ mihN8VPgiB9uf34irDkePqU= X-Google-Smtp-Source: ABdhPJxoV85Y1/PJT8wlEfYVAyFCUZ2dv7KXWZYtnztnc0SgPY5lhyoquCgsiGSDofKxNEACkq5MDQ== X-Received: by 2002:adf:f9c9:: with SMTP id w9mr19003414wrr.107.1627307752175; Mon, 26 Jul 2021 06:55:52 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id v15sm37276646wmj.11.2021.07.26.06.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:55:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Michal Krawczyk Cc: Shai Brandes , Shay Agroskin , dpdk stable Date: Mon, 26 Jul 2021 14:53:11 +0100 Message-Id: <20210726135322.149850-48-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ena: trigger reset on Tx prepare failure' has been queued to stable release 20.11.3 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" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/66d9de1cde0d6139e8daa89ddece5de3f60298f6 Thanks. Luca Boccassi --- >From 66d9de1cde0d6139e8daa89ddece5de3f60298f6 Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Fri, 23 Jul 2021 12:24:51 +0200 Subject: [PATCH] net/ena: trigger reset on Tx prepare failure [ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ] 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") Signed-off-by: Michal Krawczyk Reviewed-by: Shai Brandes Reviewed-by: Shay Agroskin --- drivers/net/ena/ena_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 69198a6435..06fb99182c 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2537,7 +2537,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf) 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; return rc; } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:18.622764403 +0100 +++ 0048-net-ena-trigger-reset-on-Tx-prepare-failure.patch 2021-07-26 13:53:15.949294725 +0100 @@ -1 +1 @@ -From b57e1053813b369d20bb2a177081a4c8ca63cede Mon Sep 17 00:00:00 2001 +From 66d9de1cde0d6139e8daa89ddece5de3f60298f6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 2335436b6c..67cd91046a 100644 +index 69198a6435..06fb99182c 100644 @@ -31 +32 @@ -@@ -2570,7 +2570,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf) +@@ -2537,7 +2537,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)