[dpdk-stable] patch 'net/bonding: fix reset active slave' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 21 13:29:00 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/22/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.

Kevin Traynor

---
>From 097b88b0ee059af79061ac50d6397bccf82b2f14 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
Date: Mon, 18 Feb 2019 11:59:23 +0000
Subject: [PATCH] net/bonding: fix reset active slave

[ upstream commit 7f949ae391527200266afa59097317ef0047111e ]

test_alb_reply_from_client test fails due to incorrect active slave
array's index. This was due to invalid active slave count.

Count of internals->active_slave is not updated even when active slave
is deactivated.
Hence active slave count always keeps incrementing beyond the actual
active slaves.

Fix is to set the internals->active_slave to starting index 0 whenever
it exceeds the number of slaves in active slave list and also update
the active slave count during slave de-activation.

Fixes: e1110e977648 ("net/bonding: fix Rx slave fairness")

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
Acked-by: Chas Williams <chas3 at att.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 6 ++++++
 drivers/net/bonding/rte_eth_bond_pmd.c | 6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index e5e146540..ac084c4fd 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -130,4 +130,10 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 	internals->active_slave_count = active_count;
 
+	/* Resetting active_slave when reaches to max
+	 * no of slaves in active list
+	 */
+	if (internals->active_slave >= active_count)
+		internals->active_slave = 0;
+
 	if (eth_dev->data->dev_started) {
 		if (internals->mode == BONDING_MODE_8023AD) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 44deaf119..7ed69b388 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -85,5 +85,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	}
 
-	if (++internals->active_slave == slave_count)
+	if (++internals->active_slave >= slave_count)
 		internals->active_slave = 0;
 	return num_rx_total;
@@ -289,5 +289,5 @@ bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	}
 
-	if (++internals->active_slave == slave_count)
+	if (++internals->active_slave >= slave_count)
 		internals->active_slave = 0;
 
@@ -475,5 +475,5 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	}
 
-	if (++internals->active_slave == slave_count)
+	if (++internals->active_slave >= slave_count)
 		internals->active_slave = 0;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-21 11:21:26.394964369 +0000
+++ 0002-net-bonding-fix-reset-active-slave.patch	2019-03-21 11:21:26.289140996 +0000
@@ -1,8 +1,10 @@
-From 7f949ae391527200266afa59097317ef0047111e Mon Sep 17 00:00:00 2001
+From 097b88b0ee059af79061ac50d6397bccf82b2f14 Mon Sep 17 00:00:00 2001
 From: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
 Date: Mon, 18 Feb 2019 11:59:23 +0000
 Subject: [PATCH] net/bonding: fix reset active slave
 
+[ upstream commit 7f949ae391527200266afa59097317ef0047111e ]
+
 test_alb_reply_from_client test fails due to incorrect active slave
 array's index. This was due to invalid active slave count.
 
@@ -16,7 +18,6 @@
 the active slave count during slave de-activation.
 
 Fixes: e1110e977648 ("net/bonding: fix Rx slave fairness")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
 Acked-by: Radu Nicolau <radu.nicolau at intel.com>
@@ -27,7 +28,7 @@
  2 files changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
-index 57ef2f001..b55752ed3 100644
+index e5e146540..ac084c4fd 100644
 --- a/drivers/net/bonding/rte_eth_bond_api.c
 +++ b/drivers/net/bonding/rte_eth_bond_api.c
 @@ -130,4 +130,10 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
@@ -42,7 +43,7 @@
  	if (eth_dev->data->dev_started) {
  		if (internals->mode == BONDING_MODE_8023AD) {
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index f65db4410..b0d191d13 100644
+index 44deaf119..7ed69b388 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -85,5 +85,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)


More information about the stable mailing list