[PATCH v2 1/4] net/bonding: make 8023ad enable function void
Bruce Richardson
bruce.richardson at intel.com
Fri Jun 19 11:48:49 CEST 2026
On Thu, May 28, 2026 at 04:59:13PM -0700, Stephen Hemminger wrote:
> 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 at networkplumber.org>
> ---
While I'd actually suggest this would be better as two patches - one for
enable, one for disable, it's probably ok to keep them combined. If
splitting in a new version, please keep my ack.
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> 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
>
More information about the dev
mailing list