DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 1/3] net/tap: handle increase in mp_max_fds
Date: Fri, 11 Oct 2024 19:17:27 -0700	[thread overview]
Message-ID: <20241012021844.536316-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20241012021844.536316-1-stephen@networkplumber.org>

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@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 5ad3bbadd1..c486c6f073 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -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) {
+
+	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_MP_MAX_FD_NUM);
+			dev->data->nb_rx_queues, RTE_PMD_TAP_MAX_QUEUES);
 		return -1;
 	}
 
-- 
2.45.2


  reply	other threads:[~2024-10-12  2:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 17:29 [PATCH 0/3] net/tap: queue limit patches Stephen Hemminger
2024-10-11 17:29 ` [PATCH 1/3] net/tap: handle increase in mp_max_fds Stephen Hemminger
2024-10-11 17:29 ` [PATCH 2/3] net/tap: add static assert to make sure max queues less than fd limit Stephen Hemminger
2024-10-11 17:29 ` [PATCH 3/3] net/tap: increase the maximum allowable queues Stephen Hemminger
2024-10-11 19:02   ` Stephen Hemminger
2024-10-12  1:01 ` [PATCH 0/3] net/tap: queue limit patches Ferruh Yigit
2024-10-12  2:20   ` Stephen Hemminger
2024-10-12  2:17 ` [PATCH v2 " Stephen Hemminger
2024-10-12  2:17   ` Stephen Hemminger [this message]
2024-10-12  2:17   ` [PATCH v2 2/3] net/tap: increase the maximum allowable queues Stephen Hemminger
2024-10-12  2:17   ` [PATCH v2 3/3] net/tap: remove unnecessary checks in configure Stephen Hemminger
2024-10-13  3:12     ` Ferruh Yigit
2024-10-12 23:53   ` [PATCH v2 0/3] net/tap: queue limit patches Ferruh Yigit
2024-10-13  0:53     ` Stephen Hemminger
2024-10-13  1:32       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241012021844.536316-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).