[dpdk-stable] patch 'net/ena: trigger reset on Tx prepare failure' has been queued to stable release 20.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 26 15:53:11 CEST 2021
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 <mk at semihalf.com>
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 <mk at semihalf.com>
Reviewed-by: Shai Brandes <shaibran at amazon.com>
Reviewed-by: Shay Agroskin <shayagr at amazon.com>
---
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 at 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)
More information about the stable
mailing list