Update the bonding promiscuous mode enable/disable functions as to propagate the change to all slaves instead of doing nothing.
Signed-off-by: Radu Nicolau <radu.nico...@intel.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index ad6e33f..fcb2268 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2617,12 +2617,10 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_8023AD: for (i = 0; i < internals->slave_count; i++) rte_eth_promiscuous_enable(internals->slaves[i].port_id); break; - /* In mode4 promiscus mode is managed when slave is added/removed */ - case BONDING_MODE_8023AD: - break; /* Promiscuous mode is propagated only to primary slave */ case BONDING_MODE_ACTIVE_BACKUP: case BONDING_MODE_TLB: @@ -2648,8 +2646,11 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) for (i = 0; i < internals->slave_count; i++) rte_eth_promiscuous_disable(internals->slaves[i].port_id); break; - /* In mode4 promiscus mode is set managed when slave is added/removed */ + /* Propagate to slaves only if multicast is enabled */ case BONDING_MODE_8023AD: + for (i = 0; i < internals->slave_count; i++) + if (rte_eth_allmulticast_get(internals->slaves[i].port_id) == 1) + rte_eth_promiscuous_disable(internals->slaves[i].port_id); break; /* Promiscuous mode is propagated only to primary slave */ case BONDING_MODE_ACTIVE_BACKUP: -- 2.7.5