From: a.schollmeyer@syseleven.de
To: Aman Singh <aman.deep.singh@intel.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
dev@dpdk.org, Adrian Schollmeyer <a.schollmeyer@syseleven.de>
Subject: [PATCH v2] app/testpmd: warn on shared rxq switch mismatch
Date: Wed, 26 Nov 2025 11:40:09 +0100 [thread overview]
Message-ID: <20251126104009.472852-1-a.schollmeyer@syseleven.de> (raw)
In-Reply-To: <20251125102207.428661-1-a.schollmeyer@syseleven.de>
From: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
Shared Rx queues do not work with every combination of ports. Besides
requiring the corresponding device capability, shared Rx queues also
require all ports of one share group and queue ID have the same switch
domain and Rx domain. When these fields do not match, shared Rx queues
are not properly set up and queue sharing may fail silently. This can
happen even in some less intuitive cases like multiple VFs of one
physical NIC.
To help with debugging issues with shared Rx queue configuration when
using testpmd, this commit introduces simple checks and warning messages
for all members of a share_group and share_qid to warn whenever there is
a mismatch in the switch and Rx domain.
Signed-off-by: Adrian Schollmeyer <a.schollmeyer@syseleven.de>
---
v2 changes:
* remove unnecessary casts
* refactor message printing logic to remove duplicate fprintf()
app/test-pmd/testpmd.c | 46 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 1fe41d852a..33b99756f7 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2675,6 +2675,52 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
uint32_t prev_hdrs = 0;
int ret;
+ if (rx_conf->share_group > 0) {
+ /* Additional warnings for bad Rx queue sharing */
+
+ const uint16_t dom_id = ports[port_id].dev_info.switch_info.domain_id;
+ const uint16_t rx_dom = ports[port_id].dev_info.switch_info.rx_domain;
+
+ uint16_t pid;
+ RTE_ETH_FOREACH_DEV(pid) {
+ struct rte_port *o_port = &ports[pid];
+ for (uint16_t q = 0; q < nb_rxq; ++q) {
+ struct port_rxqueue *rxq = &o_port->rxq[q];
+ if (rxq->conf.share_group != rx_conf->share_group ||
+ rxq->conf.share_qid != rx_conf->share_qid)
+ continue;
+
+ const uint16_t o_dom_id = o_port->dev_info.switch_info.domain_id;
+ const uint16_t o_rx_dom = o_port->dev_info.switch_info.rx_domain;
+ const char *mismatch = NULL;
+ uint16_t this_val = 0;
+ uint16_t other_val = 0;
+
+ if (o_dom_id != dom_id) {
+ mismatch = "switch domain";
+ this_val = dom_id;
+ other_val = o_dom_id;
+ } else if (o_rx_dom != rx_dom) {
+ mismatch = "rx domain";
+ this_val = rx_dom;
+ other_val = o_rx_dom;
+ }
+
+ if (mismatch) {
+ fprintf(stderr, "Bad shared rxq config: "
+ "%s mismatch in share group/qid %u/%u: "
+ "%u (port %u) vs. %u (port %u)\n",
+ mismatch,
+ rxq->conf.share_group,
+ rxq->conf.share_qid,
+ this_val,
+ port_id,
+ other_val,
+ pid);
+ }
+ }
+ }
+ }
if ((rx_pkt_nb_segs > 1) &&
(rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)) {
--
2.34.1
next prev parent reply other threads:[~2025-11-26 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 10:22 [PATCH] " a.schollmeyer
2025-11-25 14:30 ` Stephen Hemminger
2025-11-26 10:40 ` a.schollmeyer [this message]
2025-11-26 15:02 ` [PATCH v2] " Stephen Hemminger
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=20251126104009.472852-1-a.schollmeyer@syseleven.de \
--to=a.schollmeyer@syseleven.de \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).