From aea2af182c15fd0564a1a75bcafeddac4ebb8418 Mon Sep 17 00:00:00 2001 From: Vladyslav Buslov Date: Fri, 1 Apr 2016 15:16:59 +0300 Subject: [PATCH] bonding: fix loop boundary condition Loop that calculates total number of tx descriptors in slave tx queues should iterate up to nb_tx_queues, not nb_rx_queues. Fixes: 3ef7955700e7 ("bonding: fix LACP mempool size") Signed-off-by: Vladyslav Buslov --- drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 1b7e93a0c2..c4448b70b8 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -890,7 +890,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id) /* The size of the mempool should be at least: * the sum of the TX descriptors + BOND_MODE_8023AX_SLAVE_TX_PKTS */ total_tx_desc = BOND_MODE_8023AX_SLAVE_TX_PKTS; - for (q_id = 0; q_id < bond_dev->data->nb_rx_queues; q_id++) { + for (q_id = 0; q_id < bond_dev->data->nb_tx_queues; q_id++) { bd_tx_q = (struct bond_tx_queue*)bond_dev->data->tx_queues[q_id]; total_tx_desc += bd_tx_q->nb_tx_desc; } -- 2.20.1