DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] Make bond_ethdev_stop iterate only over active slaves
@ 2015-06-24 21:01 Jan Blunck
  2015-06-26  7:33 ` Doherty, Declan
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Blunck @ 2015-06-24 21:01 UTC (permalink / raw)
  To: dev

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 <jblunck@infradead.org>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 5a2fbef..1fd1321 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1520,8 +1520,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)
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-28 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 21:01 [dpdk-dev] [PATCH] Make bond_ethdev_stop iterate only over active slaves Jan Blunck
2015-06-26  7:33 ` Doherty, Declan
2015-06-28 22:32   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).