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>,
Tomasz Kulasek <tomaszx.kulasek@intel.com>
Subject: [PATCH v2 2/4] net/bonding: check mode before setting dedicated queues
Date: Thu, 28 May 2026 16:59:14 -0700 [thread overview]
Message-ID: <20260529000157.235931-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20260529000157.235931-1-stephen@networkplumber.org>
The calls to enable and disable dedicated queues are missing
check for mode.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index eba713e381..d1f30229d0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1725,7 +1725,6 @@ RTE_EXPORT_SYMBOL(rte_eth_bond_8023ad_dedicated_queues_enable)
int
rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
{
- int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
@@ -1742,17 +1741,19 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
if (dev->data->dev_started)
return -1;
+ if (internals->mode != BONDING_MODE_8023AD)
+ return -1;
+
internals->mode4.dedicated_queues.enabled = 1;
bond_ethdev_mode_set(dev, internals->mode);
- return retval;
+ return 0;
}
RTE_EXPORT_SYMBOL(rte_eth_bond_8023ad_dedicated_queues_disable)
int
rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
{
- int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
@@ -1766,9 +1767,12 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
if (dev->data->dev_started)
return -1;
+ if (internals->mode != BONDING_MODE_8023AD)
+ return -1;
+
internals->mode4.dedicated_queues.enabled = 0;
bond_ethdev_mode_set(dev, internals->mode);
- return retval;
+ return 0;
}
--
2.53.0
next prev parent reply other threads:[~2026-05-29 0:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 16:51 [PATCH 0/3] net/bond: fix secondary process crash and related cleanup Stephen Hemminger
2026-04-17 16:51 ` [PATCH 1/3] net/bonding: restore dedicated queue state on mode set error Stephen Hemminger
2026-05-27 16:19 ` Bruce Richardson
2026-04-17 16:51 ` [PATCH 2/3] net/bonding: prevent crash on Rx/Tx from secondary process Stephen Hemminger
2026-05-27 16:24 ` Bruce Richardson
2026-04-17 16:51 ` [PATCH 3/3] net/bonding: remove redundant function names from log Stephen Hemminger
2026-05-27 16:28 ` Bruce Richardson
2026-05-08 17:59 ` [PATCH 0/3] net/bond: fix secondary process crash and related cleanup Stephen Hemminger
2026-05-28 23:59 ` [PATCH v2 0/4] net/bond: fixes and cleanup Stephen Hemminger
2026-05-28 23:59 ` [PATCH v2 1/4] net/bonding: make 8023ad enable function void Stephen Hemminger
2026-05-28 23:59 ` Stephen Hemminger [this message]
2026-05-28 23:59 ` [PATCH v2 3/4] net/bonding: prevent crash on Rx/Tx from secondary process Stephen Hemminger
2026-05-28 23:59 ` [PATCH v2 4/4] net/bonding: remove redundant function names from log Stephen Hemminger
2026-06-18 16:00 ` [PATCH v2 0/4] net/bond: fixes and cleanup 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=20260529000157.235931-3-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 \
--cc=tomaszx.kulasek@intel.com \
/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.