From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 2/3] net/tap: add static assert to make sure max queues less than fd limit
Date: Fri, 11 Oct 2024 10:29:24 -0700 [thread overview]
Message-ID: <20241011173026.170884-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20241011173026.170884-1-stephen@networkplumber.org>
Since tap needs to pass fd's between primary and secondary process.
The number of tap queues must be less than the limit.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/tap/rte_eth_tap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index c486c6f073..a7aa034a55 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -20,6 +20,7 @@
#include <rte_errno.h>
#include <rte_cycles.h>
+#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -71,6 +72,8 @@
#define TAP_MP_KEY "tap_mp_sync_queues"
#define TAP_MP_REQ_START_RXTX "tap_mp_req_start_rxtx"
+static_assert(RTE_PMD_TAP_MAX_QUEUES <= RTE_MP_MAX_FD_NUM, "TAP max queues exceeds MP fd limit");
+
#define TAP_IOV_DEFAULT_MAX 1024
#define TAP_RX_OFFLOAD (RTE_ETH_RX_OFFLOAD_SCATTER | \
--
2.45.2
next prev parent reply other threads:[~2024-10-11 17:30 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 ` Stephen Hemminger [this message]
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 ` [PATCH v2 1/3] net/tap: handle increase in mp_max_fds Stephen Hemminger
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=20241011173026.170884-3-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).