[dpdk-dev] [PATCH v2 1/2] net/bonding: in 8023ad mode enable all multicast rather than promiscuous
Radu Nicolau
radu.nicolau at intel.com
Thu Aug 2 11:57:03 CEST 2018
Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index f8cea4b..730087f 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -917,7 +917,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
};
char mem_name[RTE_ETH_NAME_MAX_LEN];
- int socket_id;
+ int socket_id, ret;
unsigned element_size;
uint32_t total_tx_desc;
struct bond_tx_queue *bd_tx_q;
@@ -942,7 +942,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
/* use this port as agregator */
port->aggregator_port_id = slave_id;
- rte_eth_promiscuous_enable(slave_id);
+
+ /* try to enable multicast, if fail set promiscuous */
+ rte_eth_allmulticast_enable(slave_id);
+ ret = rte_eth_allmulticast_get(slave_id);
+ if (ret != 1)
+ rte_eth_promiscuous_enable(slave_id);
timer_cancel(&port->warning_timer);
--
2.7.5
More information about the dev
mailing list