Skip to contentSkip to conversation

bonding: fix initialisation of current_primary_port

PATCH Applied Bernard Iremonger 2 participants 2 messages Mar 23, 2016 – Mar 25, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: fix initialisation of current_primary_port

The current_primary_port is initialised to an invalid value during bonded device creation.
It should 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")
---
 drivers/net/bonding/rte_eth_bond_api.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/bonding/rte_eth_bond_api.c +1 -0
index 3fca764..d473ac2 100644
@@ -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;
Signature · 1 line
2.6.3
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 10 lines · Bernard Iremonger

The current_primary_port is initialised to an invalid value during bonded device creation.
It should 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")

---

Applied to dpdk-next-net/rel_16_04

/Bruce