patch 'net/memif: fix crash with different number of Rx/Tx queues' has been queued to stable release 19.11.14
christian.ehrhardt at canonical.com
christian.ehrhardt at canonical.com
Fri Nov 11 12:38:49 CET 2022
Hi,
FYI, your patch has been queued to stable release 19.11.14
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/18/22. 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/cpaelzer/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/92238ae09101db4f54422012959d36f4f0fccc8f
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From 92238ae09101db4f54422012959d36f4f0fccc8f Mon Sep 17 00:00:00 2001
From: Huzaifa Rahman <huzaifa.rahman at emumba.com>
Date: Tue, 26 Jul 2022 15:16:28 +0500
Subject: [PATCH] net/memif: fix crash with different number of Rx/Tx queues
[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ]
There's a bug in memif_stats_get() function due to confusion
between C2S (client->server) and S2C (server->client) rings,
causing a crash if there's a different number of Rx and Tx queues.
Fixit by selectiing the correct rings for Rx and Tx i.e for Rx, S2C
rings are selected and for Tx, C2S rings are selected.
Bugzilla ID: 734
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Signed-off-by: Huzaifa Rahman <huzaifa.rahman at emumba.com>
Reviewed-by: Joyce Kong <joyce.kong at arm.com>
---
drivers/net/memif/rte_eth_memif.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 10aebadbd0..d3196703d1 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1359,8 +1359,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->opackets = 0;
stats->obytes = 0;
- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
- pmd->run.num_m2s_rings;
+ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings :
+ pmd->run.num_s2m_rings;
nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp :
RTE_ETHDEV_QUEUE_STAT_CNTRS;
@@ -1373,8 +1373,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ibytes += mq->n_bytes;
}
- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings :
- pmd->run.num_s2m_rings;
+ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
+ pmd->run.num_m2s_rings;
nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp :
RTE_ETHDEV_QUEUE_STAT_CNTRS;
--
2.38.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-11-11 12:35:05.918121854 +0100
+++ 0032-net-memif-fix-crash-with-different-number-of-Rx-Tx-q.patch 2022-11-11 12:35:04.781192106 +0100
@@ -1 +1 @@
-From 231435a5e6c7fa915697d8f84a91b44176bba4d1 Mon Sep 17 00:00:00 2001
+From 92238ae09101db4f54422012959d36f4f0fccc8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index a574bce49e..5b5cae34ea 100644
+index 10aebadbd0..d3196703d1 100644
@@ -27 +28 @@
-@@ -1444,8 +1444,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1359,8 +1359,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -31,4 +32,4 @@
-- tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings :
-- pmd->run.num_s2c_rings;
-+ tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings :
-+ pmd->run.num_c2s_rings;
+- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
+- pmd->run.num_m2s_rings;
++ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings :
++ pmd->run.num_s2m_rings;
@@ -38 +39 @@
-@@ -1458,8 +1458,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1373,8 +1373,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -42,4 +43,4 @@
-- tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings :
-- pmd->run.num_c2s_rings;
-+ tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings :
-+ pmd->run.num_s2c_rings;
+- tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_m2s_rings :
+- pmd->run.num_s2m_rings;
++ tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
++ pmd->run.num_m2s_rings;
More information about the stable
mailing list