From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Igor Russkikh <irusskikh@marvell.com>,
Potnuri Bharat Teja <bharat@chelsio.com>
Subject: [PATCH v3 08/13] devtools: check VMDq capability
Date: Thu, 22 Oct 2026 19:44:35 +0200 [thread overview]
Message-ID: <20261022174447.412638-9-david.marchand@redhat.com> (raw)
In-Reply-To: <20261022174447.412638-1-david.marchand@redhat.com>
Let's check that the code and the documentation are aligned for VMDq
capability.
Some driver directory hosts multiple drivers that have multiple
corresponding entry in doc/guides/features/.
For this case, only try to detect a discrepancy if any doc announce a
feature but no code can be found.
Note: net/atlantic and net/cxgbe were forcibly setting some fields in
dev_info to 0, which is unneeded since ethdev already clears the structure.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v2:
- inverted logic:
Changes since v1:
- added helper for checking mq capabilities,
- added handling of multi drivers,
- moved net/atlantic and net/cxgbe cleanups here,
---
devtools/check-doc-vs-code.sh | 50 +++++++++++++++++++++++++++++++
drivers/net/atlantic/atl_ethdev.c | 2 --
drivers/net/cxgbe/cxgbe_ethdev.c | 1 -
3 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/devtools/check-doc-vs-code.sh b/devtools/check-doc-vs-code.sh
index 7afc18d153..e84b003a51 100755
--- a/devtools/check-doc-vs-code.sh
+++ b/devtools/check-doc-vs-code.sh
@@ -161,10 +161,54 @@ check_rte_flow() # <driver>
fi
}
+has_doc_feature() # <ini_file> <feature>
+{
+ grep -q "^$2[[:space:]]*=[[:space:]]*[YP]" "$1"
+}
+
+# check if any doc for a code directory has a feature
+any_doc_has_feature() # <code_dir> <feature>
+{
+ for drv in $(docs_for_code $1); do
+ d=$rootdir/doc/guides/nics/features/$drv.ini
+ if has_doc_feature "$d" "$2"; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+check_mq_cap() # <driver> <feature> <indicator> <code_pattern> <mq_pattern>
+{
+ if has_doc_feature "$doc" "$2"; then
+ # doc claims feature, code must have it
+ git grep -qE "$4" -- "$code" ||
+ error "$2 documented but $3 not set for $1"
+ elif ! any_doc_has_feature "$code" "$2"; then
+ # check code->doc only if no doc for the code directory has the feature
+ ! git grep -qE "$4" -- "$code" ||
+ error "$3 set but $2 not documented for $1"
+ ! git grep -qE "$5" -- "$code" ||
+ error "$2 mq_mode referenced but $2 not documented for $1"
+ fi
+}
+
+check_mq_caps() # <driver>
+{
+ code=$(driver_code_dir $1)
+ doc=$rootdir/doc/guides/nics/features/$1.ini
+ [ -d $code ] || return 0
+ [ -f $doc ] || return 0
+
+ check_mq_cap $1 "VMDq" "max_vmdq_pools" 'max_vmdq_pools[[:space:]]*=' \
+ 'RTE_ETH_MQ_(RX|TX).*VMDQ'
+}
+
if [ -z "$trusted_commit" ]; then
# check all
for driver in $(all_net_drivers); do
check_rte_flow $driver
+ check_mq_caps $driver
done
exit $result
fi
@@ -176,4 +220,10 @@ if has_code_change 'RTE_FLOW_.*_TYPE_' ||
check_rte_flow $driver
done
fi
+if has_code_change 'max_vmdq_pools|RTE_ETH_MQ_.*VMDQ' ||
+ has_file_change 'doc/guides/nics/features'; then
+ for driver in $(changed_net_drivers); do
+ check_mq_caps $driver
+ done
+fi
exit $result
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 24184bdb18..44a65d7557 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1106,8 +1106,6 @@ atl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_vfs = pci_dev->max_vfs;
dev_info->max_hash_mac_addrs = 0;
- dev_info->max_vmdq_pools = 0;
- dev_info->vmdq_queue_num = 0;
dev_info->rx_offload_capa = ATL_RX_OFFLOADS;
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 82e67eeff1..93554f354c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -129,7 +129,6 @@ int cxgbe_dev_info_get(struct rte_eth_dev *eth_dev,
device_info->max_mac_addrs = 1;
/* XXX: For now we support one MAC/port */
device_info->max_vfs = adapter->params.arch.vfcount;
- device_info->max_vmdq_pools = 0; /* XXX: For now no support for VMDQ */
device_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
--
2.54.0
next prev parent reply other threads:[~2026-10-22 17:45 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 13:05 [PATCH 0/8] Validate multiqueue configuration in ethdev David Marchand
2026-10-16 13:05 ` [PATCH 1/8] net/bnxt: remove leftover VMDq code in MAC helpers David Marchand
2026-10-16 13:05 ` [PATCH 2/8] drivers/net: fix reported VMDq capability David Marchand
2026-10-16 13:05 ` [PATCH 3/8] drivers/net: remove check on VMDq modes David Marchand
2026-10-16 13:05 ` [PATCH 4/8] devtools: check VMDq capability David Marchand
2026-10-16 13:05 ` [PATCH 5/8] ethdev: check DCB availability David Marchand
2026-10-16 13:05 ` [PATCH 6/8] drivers/net: fix reported RSS capability David Marchand
2026-10-16 13:05 ` [PATCH 7/8] ethdev: check RSS availability David Marchand
2026-10-16 13:05 ` [PATCH 8/8] ethdev: check unknown Rx/Tx multi-queue modes David Marchand
2026-10-16 16:44 ` [PATCH 0/8] Validate multiqueue configuration in ethdev Stephen Hemminger
2026-10-19 6:41 ` Renyong Wan
2026-10-21 10:30 ` [PATCH v2 00/12] " David Marchand
2026-10-21 10:30 ` [PATCH v2 01/12] devtools: fix matching in doc check David Marchand
2026-10-21 10:42 ` Thomas Monjalon
2026-10-21 10:30 ` [PATCH v2 02/12] doc: fix L2TPv2 and PPP matching support for ICE David Marchand
2026-10-21 10:30 ` [PATCH v2 03/12] devtools: handle multiple drivers in doc check David Marchand
2026-10-22 9:39 ` Thomas Monjalon
2026-10-21 10:30 ` [PATCH v2 04/12] net/bnxt: remove leftover VMDq code in MAC helpers David Marchand
2026-10-21 10:30 ` [PATCH v2 05/12] drivers/net: fix reported VMDq capability David Marchand
2026-10-21 10:53 ` Bruce Richardson
2026-10-21 10:30 ` [PATCH v2 06/12] drivers/net: remove check on VMDq modes David Marchand
2026-10-21 10:55 ` Bruce Richardson
2026-10-21 10:30 ` [PATCH v2 07/12] devtools: check VMDq capability David Marchand
2026-10-22 9:44 ` Thomas Monjalon
2026-10-21 10:30 ` [PATCH v2 08/12] doc: fix DCB capability for some Intel drivers David Marchand
2026-10-21 11:04 ` Bruce Richardson
2026-10-21 10:30 ` [PATCH v2 09/12] ethdev: check DCB availability David Marchand
2026-10-21 11:07 ` Bruce Richardson
2026-10-21 10:30 ` [PATCH v2 10/12] drivers/net: fix reported RSS capability David Marchand
2026-10-22 6:17 ` Renyong Wan
2026-10-21 10:30 ` [PATCH v2 11/12] ethdev: check RSS availability David Marchand
2026-10-21 10:30 ` [PATCH v2 12/12] ethdev: check unknown Rx/Tx multi-queue modes David Marchand
2026-10-21 17:42 ` [PATCH v2 00/12] Validate multiqueue configuration in ethdev Stephen Hemminger
2026-10-22 17:44 ` [PATCH v3 00/13] " David Marchand
2026-10-22 17:44 ` [PATCH v3 01/13] devtools: fix matching in doc check David Marchand
2026-10-22 17:44 ` [PATCH v3 02/13] doc: fix L2TPv2 and PPP matching support for ICE David Marchand
2026-10-22 17:44 ` [PATCH v3 03/13] devtools: support Intel drivers in doc check David Marchand
2026-10-23 10:11 ` Thomas Monjalon
2026-10-22 17:44 ` [PATCH v3 04/13] devtools: handle multiple " David Marchand
2026-10-23 10:13 ` Thomas Monjalon
2026-10-23 15:08 ` David Marchand
2026-10-22 17:44 ` [PATCH v3 05/13] net/bnxt: remove leftover VMDq code in MAC helpers David Marchand
2026-10-22 17:44 ` [PATCH v3 06/13] drivers/net: fix reported VMDq capability David Marchand
2026-10-22 17:44 ` [PATCH v3 07/13] drivers/net: remove check on VMDq modes David Marchand
2026-10-27 2:38 ` fengchengwen
2026-10-22 17:44 ` David Marchand [this message]
2026-10-22 17:44 ` [PATCH v3 09/13] doc: fix DCB capability for some Intel drivers David Marchand
2026-10-22 17:44 ` [PATCH v3 10/13] ethdev: check DCB availability David Marchand
2026-10-27 2:39 ` fengchengwen
2026-10-22 17:44 ` [PATCH v3 11/13] drivers/net: fix reported RSS capability David Marchand
2026-10-22 17:44 ` [PATCH v3 12/13] ethdev: check RSS availability David Marchand
2026-10-27 2:41 ` fengchengwen
2026-10-22 17:44 ` [PATCH v3 13/13] ethdev: check unknown Rx/Tx multi-queue modes David Marchand
2026-10-26 18:11 ` [PATCH v3 00/13] Validate multiqueue configuration in ethdev 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=20261022174447.412638-9-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=bharat@chelsio.com \
--cc=dev@dpdk.org \
--cc=irusskikh@marvell.com \
--cc=thomas@monjalon.net \
/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