DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/bonding: fix stack overflow in selection logic
@ 2019-08-05 14:44 kkanas
  2019-08-05 14:44 ` [dpdk-dev] [PATCH 2/2] net/bonding: fix " kkanas
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: kkanas @ 2019-08-05 14:44 UTC (permalink / raw)
  To: dev, david.marchand, Chas Williams; +Cc: Krzysztof Kanas, danielx.t.mrzyglod

From: Krzysztof Kanas <kkanas@marvell.com>

Bonding selection logic uses agg_bandwidth, agg_count indexed by port_id
but those arrays are 8 entries long.

Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")
Cc: danielx.t.mrzyglod@intel.com

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index d764dad331ed..89a8ba3de963 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -670,8 +670,8 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	struct port *agg, *port;
 	uint16_t slaves_count, new_agg_id, i, j = 0;
 	uint16_t *slaves;
-	uint64_t agg_bandwidth[8] = {0};
-	uint64_t agg_count[8] = {0};
+	uint64_t agg_bandwidth[RTE_MAX_ETHPORTS] = {0};
+	uint64_t agg_count[RTE_MAX_ETHPORTS] = {0};
 	uint16_t default_slave = 0;
 	uint8_t mode_count_id, mode_band_id;
 	struct rte_eth_link link_info;
-- 
2.21.0


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

end of thread, other threads:[~2019-11-15 15:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 14:44 [dpdk-dev] [PATCH 1/2] net/bonding: fix stack overflow in selection logic kkanas
2019-08-05 14:44 ` [dpdk-dev] [PATCH 2/2] net/bonding: fix " kkanas
2019-10-08 14:34   ` Yigit, Ferruh
2019-10-10  8:27     ` [dpdk-dev] [PATCH v2] " kkanas
2019-10-10 13:30       ` Chas Williams
2019-10-11  6:34         ` [dpdk-dev] [PATCH v3] " kkanas
2019-10-11 15:38           ` Chas Williams
2019-11-13  8:22             ` [dpdk-dev] [PATCH v4] " kkanas
2019-11-15 15:56               ` Ferruh Yigit
2019-08-05 15:09 ` [dpdk-dev] [PATCH 1/2] net/bonding: fix stack overflow in " David Marchand
2019-08-07  7:41   ` [dpdk-dev] [EXT] " Krzysztof Kanas
2019-10-08 14:33 ` [dpdk-dev] " Yigit, Ferruh

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).