[dpdk-stable] patch 'net/bonding: fix slave id types' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:05 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

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/21/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.

Thanks.

Luca Boccassi

---
>From 68e34fdd450d1efd9d3df7065798acc9d98f9284 Mon Sep 17 00:00:00 2001
From: Hui Zhao <zhaohui8 at huawei.com>
Date: Thu, 21 Mar 2019 21:28:13 +0100
Subject: [PATCH] net/bonding: fix slave id types

[ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ]

mode_bond_id and mode_band_id are slave ids, stored on 16bits.

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: Hui Zhao <zhaohui8 at huawei.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 14b82bb304..abf833f6e1 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -659,7 +659,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 	SM_FLAG_CLR(port, NTT);
 }
 
-static uint8_t
+static uint16_t
 max_index(uint64_t *a, int n)
 {
 	if (n <= 0)
@@ -693,7 +693,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 	uint64_t agg_bandwidth[8] = {0};
 	uint64_t agg_count[8] = {0};
 	uint16_t default_slave = 0;
-	uint8_t mode_count_id, mode_band_id;
+	uint16_t mode_count_id;
+	uint16_t mode_band_id;
 	struct rte_eth_link link_info;
 
 	slaves = internals->active_slaves;
@@ -729,13 +730,11 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 
 	switch (internals->mode4.agg_selection) {
 	case AGG_COUNT:
-		mode_count_id = max_index(
-				(uint64_t *)agg_count, slaves_count);
+		mode_count_id = max_index(agg_count, slaves_count);
 		new_agg_id = mode_count_id;
 		break;
 	case AGG_BANDWIDTH:
-		mode_band_id = max_index(
-				(uint64_t *)agg_bandwidth, slaves_count);
+		mode_band_id = max_index(agg_bandwidth, slaves_count);
 		new_agg_id = mode_band_id;
 		break;
 	case AGG_STABLE:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:27.853764628 +0000
+++ 0038-net-bonding-fix-slave-id-types.patch	2019-12-19 14:32:25.873293225 +0000
@@ -1,12 +1,13 @@
-From c28aff1e41eedd9d44c480264efbd7f4dd5cf31e Mon Sep 17 00:00:00 2001
+From 68e34fdd450d1efd9d3df7065798acc9d98f9284 Mon Sep 17 00:00:00 2001
 From: Hui Zhao <zhaohui8 at huawei.com>
 Date: Thu, 21 Mar 2019 21:28:13 +0100
 Subject: [PATCH] net/bonding: fix slave id types
 
+[ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ]
+
 mode_bond_id and mode_band_id are slave ids, stored on 16bits.
 
 Fixes: f8244c6399d9 ("ethdev: increase port id range")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hui Zhao <zhaohui8 at huawei.com>
 Signed-off-by: David Marchand <david.marchand at redhat.com>
@@ -16,10 +17,10 @@
  1 file changed, 5 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
-index e50d946eba..c6a645a653 100644
+index 14b82bb304..abf833f6e1 100644
 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
 +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
-@@ -639,7 +639,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -659,7 +659,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
  	SM_FLAG_CLR(port, NTT);
  }
  
@@ -28,7 +29,7 @@
  max_index(uint64_t *a, int n)
  {
  	if (n <= 0)
-@@ -673,7 +673,8 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -693,7 +693,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
  	uint64_t agg_bandwidth[8] = {0};
  	uint64_t agg_count[8] = {0};
  	uint16_t default_slave = 0;
@@ -36,9 +37,9 @@
 +	uint16_t mode_count_id;
 +	uint16_t mode_band_id;
  	struct rte_eth_link link_info;
- 	int ret;
  
-@@ -717,13 +718,11 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+ 	slaves = internals->active_slaves;
+@@ -729,13 +730,11 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
  
  	switch (internals->mode4.agg_selection) {
  	case AGG_COUNT:


More information about the stable mailing list