[dpdk-stable] patch 'net/bonding: fix selection logic' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:31 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/17/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f64b3144cef8e9d14d85a303d8f7590f219e7108

Thanks.

Kevin.

---
>From f64b3144cef8e9d14d85a303d8f7590f219e7108 Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <kkanas at marvell.com>
Date: Wed, 13 Nov 2019 09:22:24 +0100
Subject: [PATCH] net/bonding: fix selection logic

[ upstream commit 8d75f49e61c11bff2ecf48818f7acf4520329848 ]

Arrays agg_count and agg_bandwidth should be indexed by slave_id not by
aggregator port_id.

The new_agg_id should be chosen as slave_id from slaves table in
different selection modes.

Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")

Signed-off-by: Krzysztof Kanas <kkanas at marvell.com>
Acked-by: Chas Williams <chas3 at att.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index def27c9f1..0beea19c4 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -673,7 +673,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	uint64_t agg_count[RTE_MAX_ETHPORTS] = {0};
 	uint16_t default_slave = 0;
-	uint16_t mode_count_id;
-	uint16_t mode_band_id;
 	struct rte_eth_link link_info;
+	uint16_t agg_new_idx = 0;
 
 	slaves = internals->active_slaves;
@@ -688,7 +687,7 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 			continue;
 
-		agg_count[agg->aggregator_port_id] += 1;
+		agg_count[i] += 1;
 		rte_eth_link_get_nowait(slaves[i], &link_info);
-		agg_bandwidth[agg->aggregator_port_id] += link_info.link_speed;
+		agg_bandwidth[i] += link_info.link_speed;
 
 		/* Actors system ID is not checked since all slave device have the same
@@ -710,14 +709,14 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	switch (internals->mode4.agg_selection) {
 	case AGG_COUNT:
-		mode_count_id = max_index(agg_count, slaves_count);
-		new_agg_id = mode_count_id;
+		agg_new_idx = max_index(agg_count, slaves_count);
+		new_agg_id = slaves[agg_new_idx];
 		break;
 	case AGG_BANDWIDTH:
-		mode_band_id = max_index(agg_bandwidth, slaves_count);
-		new_agg_id = mode_band_id;
+		agg_new_idx = max_index(agg_bandwidth, slaves_count);
+		new_agg_id = slaves[agg_new_idx];
 		break;
 	case AGG_STABLE:
 		if (default_slave == slaves_count)
-			new_agg_id = slave_id;
+			new_agg_id = slaves[slave_id];
 		else
 			new_agg_id = slaves[default_slave];
@@ -725,5 +724,5 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	default:
 		if (default_slave == slaves_count)
-			new_agg_id = slave_id;
+			new_agg_id = slaves[slave_id];
 		else
 			new_agg_id = slaves[default_slave];
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:15.802475506 +0000
+++ 0039-net-bonding-fix-selection-logic.patch	2019-12-11 21:24:12.675651052 +0000
@@ -1 +1 @@
-From 8d75f49e61c11bff2ecf48818f7acf4520329848 Mon Sep 17 00:00:00 2001
+From f64b3144cef8e9d14d85a303d8f7590f219e7108 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d75f49e61c11bff2ecf48818f7acf4520329848 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 05b3004c4..b77a37ddb 100644
+index def27c9f1..0beea19c4 100644
@@ -26 +27 @@
-@@ -674,7 +674,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -673,7 +673,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
@@ -33 +33,0 @@
- 	int ret;
@@ -35 +35,2 @@
-@@ -697,6 +696,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+ 	slaves = internals->active_slaves;
+@@ -688,7 +687,7 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
@@ -37 +38 @@
- 		}
+ 
@@ -39 +39,0 @@
--		agg_bandwidth[agg->aggregator_port_id] += link_info.link_speed;
@@ -40,0 +41,2 @@
+ 		rte_eth_link_get_nowait(slaves[i], &link_info);
+-		agg_bandwidth[agg->aggregator_port_id] += link_info.link_speed;
@@ -44 +46 @@
-@@ -719,14 +718,14 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -710,14 +709,14 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
@@ -64 +66 @@
-@@ -734,5 +733,5 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -725,5 +724,5 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)



More information about the stable mailing list