DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Chas Williams <3chas3@gmail.com>,
	"Min Hu (Connor)" <humin29@huawei.com>
Subject: [PATCH v2 1/4] net/bonding: make 8023ad enable function void
Date: Thu, 28 May 2026 16:59:13 -0700	[thread overview]
Message-ID: <20260529000157.235931-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20260529000157.235931-1-stephen@networkplumber.org>

The function never returns an error. Cleanup the call sites.

The 8023ad disable function was never implemented,
remove prototype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bonding/eth_bond_8023ad_private.h | 17 +----------------
 drivers/net/bonding/rte_eth_bond_8023ad.c     |  4 +---
 drivers/net/bonding/rte_eth_bond_pmd.c        |  7 +++----
 3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/drivers/net/bonding/eth_bond_8023ad_private.h b/drivers/net/bonding/eth_bond_8023ad_private.h
index ab7d15f81a..bd7a5848de 100644
--- a/drivers/net/bonding/eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/eth_bond_8023ad_private.h
@@ -209,25 +209,10 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
  * @internal
  *
  * Enables 802.1AX mode and all active members on bonding interface.
- *
- * @param dev Bonding interface
- * @return
- *  0 on success, negative value otherwise.
  */
-int
+void
 bond_mode_8023ad_enable(struct rte_eth_dev *dev);
 
-/**
- * @internal
- *
- * Disables 802.1AX mode of the bonding interface and members.
- *
- * @param dev Bonding interface
- * @return
- *   0 on success, negative value otherwise.
- */
-int bond_mode_8023ad_disable(struct rte_eth_dev *dev);
-
 /**
  * @internal
  *
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index ba88f6d261..eba713e381 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1287,7 +1287,7 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 		bond_mode_8023ad_start(dev);
 }
 
-int
+void
 bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
@@ -1296,8 +1296,6 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
 	for (i = 0; i < internals->active_member_count; i++)
 		bond_mode_8023ad_activate_member(bond_dev,
 				internals->active_members[i]);
-
-	return 0;
 }
 
 int
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 96725071da..7fcb3ec7d7 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1619,8 +1619,7 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
 		eth_dev->rx_pkt_burst = bond_ethdev_rx_burst;
 		break;
 	case BONDING_MODE_8023AD:
-		if (bond_mode_8023ad_enable(eth_dev) != 0)
-			return -1;
+		bond_mode_8023ad_enable(eth_dev);
 
 		if (internals->mode4.dedicated_queues.enabled == 0) {
 			eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_8023ad;
@@ -1641,13 +1640,13 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
 		eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_active_backup;
 		break;
 	case BONDING_MODE_ALB:
-		if (bond_mode_alb_enable(eth_dev) != 0)
-			return -1;
+		bond_mode_alb_enable(eth_dev);
 
 		eth_dev->tx_pkt_burst = bond_ethdev_tx_burst_alb;
 		eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_alb;
 		break;
 	default:
+		RTE_BOND_LOG(ERR, "Invalid mode %#x", mode);
 		return -1;
 	}
 
-- 
2.53.0


  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   ` Stephen Hemminger [this message]
2026-05-28 23:59   ` [PATCH v2 2/4] net/bonding: check mode before setting dedicated queues Stephen Hemminger
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-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=3chas3@gmail.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox