X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbonding%2Frte_eth_bond_api.c;h=17e6ff8b908e154018398c29362a40603df5d5ce;hb=fad80ab3698e7f7d3e9c2a28c371da6a17fbc477;hp=d77dc40963388ff222fc0693e18dfcd9b76def20;hpb=2dd4f08540cc32cc1a62579d66d055327638ac92;p=dpdk.git diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index d77dc40963..17e6ff8b90 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -129,12 +129,6 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id) RTE_ASSERT(active_count < RTE_DIM(internals->active_slaves)); internals->active_slave_count = active_count; - /* Resetting active_slave when reaches to max - * no of slaves in active list - */ - if (internals->active_slave >= active_count) - internals->active_slave = 0; - if (eth_dev->data->dev_started) { if (internals->mode == BONDING_MODE_8023AD) { bond_mode_8023ad_start(eth_dev); @@ -243,7 +237,12 @@ slave_rte_flow_prepare(uint16_t slave_id, struct bond_dev_private *internals) uint16_t slave_port_id = internals->slaves[slave_id].port_id; if (internals->flow_isolated_valid != 0) { - rte_eth_dev_stop(slave_port_id); + if (rte_eth_dev_stop(slave_port_id) != 0) { + RTE_BOND_LOG(ERR, "Failed to stop device on port %u", + slave_port_id); + return -1; + } + if (rte_flow_isolate(slave_port_id, internals->flow_isolated, &ferror)) { RTE_BOND_LOG(ERR, "rte_flow_isolate failed for slave" @@ -698,6 +697,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id, internals->current_primary_port = internals->slaves[0].port_id; else internals->primary_port = 0; + mac_address_slaves_update(bonded_eth_dev); } if (internals->active_slave_count < 1) {