From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: rjarry@redhat.com, cfontain@redhat.com,
Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH v3 1/5] ethdev: check VMDq availability
Date: Sun, 10 May 2026 19:03:01 +0200 [thread overview]
Message-ID: <20260510170306.3406045-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20260510170306.3406045-1-david.marchand@redhat.com>
Refuse VMDq related Rx/Tx modes when the driver do not announce VMDq
pools availability.
This will used later as a gate to ignore/reject VMDq related matters.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v2:
- added an entry in release notes,
- changed approach: relied on pre-existing dev_info->max_vmdq_pools
rather than introduce a new device capability,
Changes since v1:
- dropped incorrect VMDq feature announce for bnxt representors, em,
i40e representors, ipn3ke representors,
---
doc/guides/rel_notes/release_26_07.rst | 6 ++++++
lib/ethdev/rte_ethdev.c | 16 ++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/doc/guides/rel_notes/release_26_07.rst b/doc/guides/rel_notes/release_26_07.rst
index f012d47a4b..b59793f177 100644
--- a/doc/guides/rel_notes/release_26_07.rst
+++ b/doc/guides/rel_notes/release_26_07.rst
@@ -92,6 +92,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated VMDq related API in ethdev.**
+
+ * At port configuration time, the number of VMDq pools advertised by a driver is now used to
+ validate VMDq related Rx and Tx modes (``RTE_ETH_MQ_RX_VMDQ_FLAG``, ``RTE_ETH_MQ_TX_VMDQ_DCB``,
+ ``RTE_ETH_MQ_TX_VMDQ_ONLY``).
+
ABI Changes
-----------
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 2edc7a362e..eae34954e2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -1581,6 +1581,22 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
goto rollback;
}
+ if (dev_info.max_vmdq_pools == 0) {
+ if ((dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0) {
+ RTE_ETHDEV_LOG_LINE(ERR, "Ethdev port_id=%u does not support VMDq rx mode",
+ port_id);
+ ret = -EINVAL;
+ goto rollback;
+ }
+ if (dev_conf->txmode.mq_mode == RTE_ETH_MQ_TX_VMDQ_DCB ||
+ dev_conf->txmode.mq_mode == RTE_ETH_MQ_TX_VMDQ_ONLY) {
+ RTE_ETHDEV_LOG_LINE(ERR, "Ethdev port_id=%u does not support VMDq tx mode",
+ port_id);
+ ret = -EINVAL;
+ goto rollback;
+ }
+ }
+
/*
* Setup new number of Rx/Tx queues and reconfigure device.
*/
--
2.53.0
next prev parent reply other threads:[~2026-05-10 17:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 9:18 [PATCH 0/4] Remove limitations coming from legacy VMDq David Marchand
2026-04-03 9:18 ` [PATCH 1/4] ethdev: skip VMDq pools unless configured David Marchand
2026-04-03 9:18 ` [PATCH 2/4] ethdev: announce VMDq capability David Marchand
2026-04-06 22:22 ` Kishore Padmanabha
2026-04-29 14:18 ` David Marchand
2026-04-03 9:18 ` [PATCH 3/4] ethdev: hide VMDq internal sizes David Marchand
2026-04-03 9:18 ` [PATCH 4/4] net/iavf: accept up to 32k unicast MAC addresses David Marchand
2026-04-05 18:47 ` [PATCH 0/4] Remove limitations coming from legacy VMDq Stephen Hemminger
2026-04-29 14:22 ` David Marchand
2026-05-06 12:35 ` [PATCH v2 0/5] " David Marchand
2026-05-06 12:35 ` [PATCH v2 1/5] ethdev: skip VMDq pools unless configured David Marchand
2026-05-06 12:35 ` [PATCH v2 2/5] ethdev: announce VMDq capability David Marchand
2026-05-06 12:35 ` [PATCH v2 3/5] ethdev: hide VMDq internal sizes David Marchand
2026-05-06 12:35 ` [PATCH v2 4/5] net/iavf: accept up to 32k unicast MAC addresses David Marchand
2026-05-06 12:35 ` [PATCH v2 5/5] net/iavf: fix duplicate MAC addresses install David Marchand
2026-05-07 2:51 ` [PATCH v2 0/5] Remove limitations coming from legacy VMDq Stephen Hemminger
2026-05-10 15:03 ` David Marchand
2026-05-10 17:03 ` [PATCH v3 " David Marchand
2026-05-10 17:03 ` David Marchand [this message]
2026-05-10 17:03 ` [PATCH v3 2/5] ethdev: skip VMDq pools unless configured David Marchand
2026-05-10 17:03 ` [PATCH v3 3/5] ethdev: hide VMDq internal sizes David Marchand
2026-05-10 17:03 ` [PATCH v3 4/5] net/iavf: accept up to 32k unicast MAC addresses David Marchand
2026-05-12 14:41 ` Stephen Hemminger
2026-05-10 17:03 ` [PATCH v3 5/5] net/iavf: fix duplicate MAC addresses install David Marchand
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=20260510170306.3406045-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=cfontain@redhat.com \
--cc=dev@dpdk.org \
--cc=rjarry@redhat.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