patch 'net/tap: restrict maximum number of MP FDs' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Mon Nov 11 07:28:21 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.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 11/30/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 11 Oct 2024 10:29:23 -0700
Subject: [PATCH] net/tap: restrict maximum number of MP FDs
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]

Now that max MP fds has increased to 253 it is possible that
the number of queues the TAP device can handle is less than that.
Therefore the code to handle MP message should only allow the
number of queues it can handle.

Coverity issue: 445386

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/tap/rte_eth_tap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 3fa03cdbee..93bba3cec1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2393,9 +2393,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
 	/* Fill file descriptors for all queues */
 	reply.num_fds = 0;
 	reply_param->rxq_count = 0;
-	if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
-			RTE_MP_MAX_FD_NUM){
-		TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
+
+	if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) {
+		TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",
+			dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES);
 		return -1;
 	}

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-11 14:23:09.395312653 +0800
+++ 0095-net-tap-restrict-maximum-number-of-MP-FDs.patch	2024-11-11 14:23:05.242192837 +0800
@@ -1 +1 @@
-From 288649a11a8a332727f2a988c676ff7dfd1bc4c5 Mon Sep 17 00:00:00 2001
+From 7c8fbea353f3f8fe7d076d22c5a5f5aab4e7f683 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 288649a11a8a332727f2a988c676ff7dfd1bc4c5 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -17,2 +19,2 @@
- drivers/net/tap/rte_eth_tap.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ drivers/net/tap/rte_eth_tap.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
@@ -21 +23 @@
-index 5ad3bbadd1..c486c6f073 100644
+index 3fa03cdbee..93bba3cec1 100644
@@ -24,5 +26,7 @@
-@@ -2391,9 +2391,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
- 	reply_param->q_count = 0;
-
- 	RTE_ASSERT(dev->data->nb_rx_queues == dev->data->nb_tx_queues);
--	if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) {
+@@ -2393,9 +2393,10 @@ tap_mp_sync_queues(const struct rte_mp_msg *request, const void *peer)
+ 	/* Fill file descriptors for all queues */
+ 	reply.num_fds = 0;
+ 	reply_param->rxq_count = 0;
+-	if (dev->data->nb_rx_queues + dev->data->nb_tx_queues >
+-			RTE_MP_MAX_FD_NUM){
+-		TAP_LOG(ERR, "Number of rx/tx queues exceeds max number of fds");
@@ -31,2 +35 @@
- 		TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",
--			dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
++		TAP_LOG(ERR, "Number of rx/tx queues %u exceeds max number of fds %u",


More information about the stable mailing list