patch 'net/bonding: fix mode 4 with dedicated queues' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Nov 5 18:11:14 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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

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

Thanks.

Luca Boccassi

---
>From cc57fef023f3b14674e735a441967f3ea4211923 Mon Sep 17 00:00:00 2001
From: Usman Tanveer <usman.tanveer at emumba.com>
Date: Thu, 29 Sep 2022 09:05:51 +0500
Subject: [PATCH] net/bonding: fix mode 4 with dedicated queues

[ upstream commit f66323717edbfbb037317fc012ea0fe13e48db98 ]

When dedicated queues are enable with bonding mode 4 (mlx5), the
application sets the flow, which cannot be set if the device is not
started. This fixed the issue by starting the device just before
setting the flow. Because device should be started to set the flow.
Also it does not effect other driver codes (I have tried on ixgbe).

Bugzilla ID: 759

Signed-off-by: Usman Tanveer <usman.tanveer at emumba.com>
Acked-by: Chas Williams <3chas3 at gmail.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a73d5bd497..8efd3a8a79 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1817,15 +1817,6 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 			rte_flow_destroy(slave_eth_dev->data->port_id,
 					internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
 					&flow_error);
-
-		errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
-				slave_eth_dev->data->port_id);
-		if (errval != 0) {
-			RTE_BOND_LOG(ERR,
-				"bond_ethdev_8023ad_flow_set: port=%d, err (%d)",
-				slave_eth_dev->data->port_id, errval);
-			return errval;
-		}
 	}
 
 	/* Start device */
@@ -1836,6 +1827,18 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 		return -1;
 	}
 
+	if (internals->mode == BONDING_MODE_8023AD &&
+			internals->mode4.dedicated_queues.enabled == 1) {
+		errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
+				slave_eth_dev->data->port_id);
+		if (errval != 0) {
+			RTE_BOND_LOG(ERR,
+				"bond_ethdev_8023ad_flow_set: port=%d, err (%d)",
+				slave_eth_dev->data->port_id, errval);
+			return errval;
+		}
+	}
+
 	/* If RSS is enabled for bonding, synchronize RETA */
 	if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
 		int i;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-05 17:11:10.005319538 +0000
+++ 0015-net-bonding-fix-mode-4-with-dedicated-queues.patch	2022-11-05 17:11:08.614941354 +0000
@@ -1 +1 @@
-From f66323717edbfbb037317fc012ea0fe13e48db98 Mon Sep 17 00:00:00 2001
+From cc57fef023f3b14674e735a441967f3ea4211923 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f66323717edbfbb037317fc012ea0fe13e48db98 ]
+
@@ -21 +23 @@
-index 82db206eb8..aee9e60d40 100644
+index a73d5bd497..8efd3a8a79 100644
@@ -24,4 +26,4 @@
-@@ -1830,15 +1830,6 @@ slave_start(struct rte_eth_dev *bonded_eth_dev,
- 			RTE_BOND_LOG(ERR, "bond_ethdev_8023ad_flow_destroy: port=%d, err (%d)",
- 				slave_eth_dev->data->port_id, errval);
- 		}
+@@ -1817,15 +1817,6 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+ 			rte_flow_destroy(slave_eth_dev->data->port_id,
+ 					internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
+ 					&flow_error);
@@ -40 +42 @@
-@@ -1849,6 +1840,18 @@ slave_start(struct rte_eth_dev *bonded_eth_dev,
+@@ -1836,6 +1827,18 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -57 +59 @@
- 	if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
+ 	if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {


More information about the stable mailing list