summaryrefslogtreecommitdiff
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorChas Williams <chas3@att.com>2018-07-03 22:28:32 -0400
committerFerruh Yigit <ferruh.yigit@intel.com>2018-07-05 15:35:19 +0200
commit69bce062132bd2b4a943fafbb710215a7999d198 (patch)
tree52c0e4d603fc4bfeb9c26720764390dc3d8c5b56 /drivers/net/bonding
parentd67692bacff307ef0748b1fcd0b155ee6c82f469 (diff)
downloaddpdk-next-eventdev-69bce062132bd2b4a943fafbb710215a7999d198.zip
dpdk-next-eventdev-69bce062132bd2b4a943fafbb710215a7999d198.tar.gz
dpdk-next-eventdev-69bce062132bd2b4a943fafbb710215a7999d198.tar.xz
net/bonding: do not clear active slave count
When the bond PMD is stopped, the active slave count is reset. For 802.3ad mode this potentially leaks memory and clears state since a second sequential activate_slave() will occur when the bond PMD is restarted and the LSC callback is triggered while the active slave count is 0. To fix this, don't clear the active slave count when stopping. Only deactivate_slave() should be used to clear the slaves. Fixes: 2efb58cbab6e ("bond: new link bonding library") Cc: stable@dpdk.org Signed-off-by: Chas Williams <chas3@att.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/rte_eth_bond_pmd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index e32fa39..3f3cddf 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2229,7 +2229,6 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
tlb_last_obytets[internals->active_slaves[i]] = 0;
}
- internals->active_slave_count = 0;
internals->link_status_polling_enabled = 0;
for (i = 0; i < internals->slave_count; i++)
internals->slaves[i].last_link_status = 0;