From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
stable@dpdk.org, Chas Williams <3chas3@gmail.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Declan Doherty <declan.doherty@intel.com>
Subject: [PATCH v2 3/8] net/bonding: skip unavailable members in device info
Date: Mon, 31 Aug 2026 09:06:43 -0700 [thread overview]
Message-ID: <20260831161105.289670-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20260831161105.289670-1-stephen@networkplumber.org>
bond_ethdev_info() queries every member to derive the maximum number of
Rx and Tx queues the bonding device can support. A single failing
member aborted the whole call.
Skip members that cannot be queried and derive the queue limits from
the rest.
A bonding device with no members at all keeps reporting UINT16_MAX, as
it did before: no member has constrained it yet.
Fixes: acfb51e2fe96 ("net/bonding: fix number of bonding Tx/Rx queues")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 6235c07679..7579b97b06 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2360,28 +2360,40 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
/* Max number of tx/rx queues that the bonding device can support is the
* minimum values of the bonding members, as all members must be capable
* of supporting the same number of tx/rx queues.
+ *
+ * A member may be unqueryable here: it can be removed concurrently, or
+ * simply not be probed in this process. Skip those, but do not report
+ * the UINT16_MAX default if no member could be queried at all, since
+ * that would let any queue count pass rte_eth_dev_configure().
*/
if (internals->member_count > 0) {
struct rte_eth_dev_info member_info;
+ uint16_t queried = 0;
uint16_t idx;
for (idx = 0; idx < internals->member_count; idx++) {
member = internals->members[idx];
ret = rte_eth_dev_info_get(member.port_id, &member_info);
if (ret != 0) {
- RTE_BOND_LOG(ERR,
- "Error getting device (port %u) info: %s",
+ RTE_BOND_LOG(WARNING,
+ "Skipping device (port %u) info: %s",
member.port_id, strerror(-ret));
-
- return ret;
+ continue;
}
+ queried++;
+
if (member_info.max_rx_queues < max_nb_rx_queues)
max_nb_rx_queues = member_info.max_rx_queues;
if (member_info.max_tx_queues < max_nb_tx_queues)
max_nb_tx_queues = member_info.max_tx_queues;
}
+
+ if (queried == 0) {
+ RTE_BOND_LOG(ERR, "No member device info available");
+ return -ENODEV;
+ }
}
dev_info->max_rx_queues = max_nb_rx_queues;
--
2.53.0
next prev parent reply other threads:[~2026-08-31 16:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 17:42 [RFC PATCH] net/bonding: reject control operations in secondary Weijun Pan
2026-07-22 23:10 ` Stephen Hemminger
2026-07-26 17:32 ` Stephen Hemminger
2026-08-23 15:16 ` [RFC PATCH v2] net/bonding: restrict secondary control operations Weijun Pan
2026-08-23 15:43 ` Stephen Hemminger
2026-08-24 2:39 ` Weijun Pan
2026-08-24 16:15 ` Stephen Hemminger
2026-08-26 16:10 ` [RFC PATCH v3] " Weijun Pan
2026-08-26 17:53 ` Stephen Hemminger
2026-08-30 1:14 ` [RFC PATCH v4 1/2] net/bonding: skip unavailable member stats Weijun Pan
2026-08-30 1:14 ` [RFC PATCH v4 2/2] net/bonding: restrict secondary control operations Weijun Pan
2026-08-30 4:29 ` Stephen Hemminger
2026-08-30 4:22 ` [RFC PATCH v4 1/2] net/bonding: skip unavailable member stats Stephen Hemminger
2026-08-30 16:35 ` [RFC PATCH v5 " Weijun Pan
2026-08-30 16:35 ` [RFC PATCH v5 2/2] net/bonding: restrict secondary control operations Weijun Pan
2026-08-30 20:23 ` [PATCH 0/8] net/bonding: fixes and per-member statistics Stephen Hemminger
2026-08-30 20:23 ` [PATCH 1/8] net/bonding: fix TLB member ordering with unusable member Stephen Hemminger
2026-08-30 20:23 ` [PATCH 2/8] net/bonding: skip unavailable member stats Stephen Hemminger
2026-08-30 20:23 ` [PATCH 3/8] net/bonding: skip unavailable members in device info Stephen Hemminger
2026-08-30 20:23 ` [PATCH 4/8] net/bonding: use atomic link status accessors Stephen Hemminger
2026-08-30 20:23 ` [PATCH 5/8] net/bonding: restrict control operations in secondary process Stephen Hemminger
2026-08-30 20:23 ` [PATCH 6/8] net/bonding: add extended statistics Stephen Hemminger
2026-08-30 20:23 ` [PATCH 7/8] test/bonding: add extended statistics test Stephen Hemminger
2026-08-30 20:23 ` [PATCH 8/8] doc: add bonding features matrix Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 0/8] net/bonding: fixes and per-member stats Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 1/8] net/bonding: fix TLB member ordering with unusable member Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 2/8] net/bonding: skip unavailable member stats Stephen Hemminger
2026-08-31 16:06 ` Stephen Hemminger [this message]
2026-08-31 16:06 ` [PATCH v2 4/8] net/bonding: use atomic link status accessors Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 5/8] net/bonding: restrict control ops in secondary process Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 6/8] net/bonding: add extended statistics Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 7/8] test/bonding: add extended statistics test Stephen Hemminger
2026-08-31 16:06 ` [PATCH v2 8/8] doc: add bonding features matrix 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=20260831161105.289670-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=3chas3@gmail.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.