From: Jan Blunck Date: Wed, 24 Jun 2015 21:01:23 +0000 (-0700) Subject: bonding: fix crash when stopping inactive slave X-Git-Tag: spdx-start~8932 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=af63759a5356e617cc9823e82d937d8a32deae55;p=dpdk.git bonding: fix crash when stopping inactive slave When stopping the bond device we don't need to try and free up the LACPDU's from deactivated devices since this is covered by bond_mode_8023ad_deactivate_slave(). This fixes the following: [ 0.100569] PANIC in bond_ethdev_stop(): [ 0.100589] line 1172 assert "port->rx_ring != NULL" failed Signed-off-by: Jan Blunck Acked-by: Declan Doherty --- diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 7888a7f65b..989e878eef 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1525,8 +1525,8 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) bond_mode_8023ad_stop(eth_dev); /* Discard all messages to/from mode 4 state machines */ - for (i = 0; i < internals->slave_count; i++) { - port = &mode_8023ad_ports[internals->slaves[i].port_id]; + for (i = 0; i < internals->active_slave_count; i++) { + port = &mode_8023ad_ports[internals->active_slaves[i]]; RTE_VERIFY(port->rx_ring != NULL); while (rte_ring_dequeue(port->rx_ring, &pkt) != -ENOENT)