From: Bernard Iremonger Date: Wed, 23 Mar 2016 17:30:05 +0000 (+0000) Subject: bonding: fix current primary port X-Git-Tag: spdx-start~7169 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e0665f9809517217c1bd1280f3ef3f387f217fe0;p=dpdk.git bonding: fix current primary port The current_primary_port is initialised to an invalid value during bonded device creation. It must be set to a valid value later. This fix sets it to a valid value when the first slave port is added to the bonding device. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Bernard Iremonger Acked-by: Bruce Richardson --- diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 3fca76483e..d473ac2439 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -352,6 +352,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Make primary slave */ internals->primary_port = slave_port_id; + internals->current_primary_port = slave_port_id; /* Inherit queues settings from first slave */ internals->nb_rx_queues = slave_eth_dev->data->nb_rx_queues;