[dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:19 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/59556c7e7a6ed3021349a88a6758fec07190e73b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang at huawei.com>
Date: Wed, 22 Sep 2021 15:09:12 +0800
Subject: [PATCH] net/bonding: fix dedicated queue mode in vector burst
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]

If the vector burst mode is selected, the dedicated queue mode will not
take effect on some PMDs because these PMDs may have some limitations
in vector burst mode. For example, the limit on burst size. Currently,
both hns3 and intel I40E require four alignments when receiving packets
in vector mode. As a result, they can't accept packets if burst size
below four. However, in dedicated queue mode, the burst size of periodic
packets processing is one.

This patch fixes the above problem by modifying the burst size to 32.
This approach also makes the packet processing of the dedicated queue
mode more reasonable. Currently, if multiple LACP protocol packets are
received in the hardware queue in a cycle, only one LACP packet will be
processed in this cycle, and the left packets will be processed in the
following cycle. After the modification, all the LACP packets will be
processed at one time, which seems more reasonable and closer to the
behavior of the bonding driver when the dedicated queue is not turned on.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Chengchang Tang <tangchengchang at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 32 ++++++++++++++++-------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 128754f459..478c28afee 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -838,6 +838,27 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		rx_machine(internals, slave_id, NULL);
 }
 
+static void
+bond_mode_8023ad_dedicated_rxq_process(struct bond_dev_private *internals,
+			uint16_t slave_id)
+{
+#define DEDICATED_QUEUE_BURST_SIZE 32
+	struct rte_mbuf *lacp_pkt[DEDICATED_QUEUE_BURST_SIZE];
+	uint16_t rx_count = rte_eth_rx_burst(slave_id,
+				internals->mode4.dedicated_queues.rx_qid,
+				lacp_pkt, DEDICATED_QUEUE_BURST_SIZE);
+
+	if (rx_count) {
+		uint16_t i;
+
+		for (i = 0; i < rx_count; i++)
+			bond_mode_8023ad_handle_slow_pkt(internals, slave_id,
+					lacp_pkt[i]);
+	} else {
+		rx_machine_update(internals, slave_id, NULL);
+	}
+}
+
 static void
 bond_mode_8023ad_periodic_cb(void *arg)
 {
@@ -926,15 +947,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 
 			rx_machine_update(internals, slave_id, lacp_pkt);
 		} else {
-			uint16_t rx_count = rte_eth_rx_burst(slave_id,
-					internals->mode4.dedicated_queues.rx_qid,
-					&lacp_pkt, 1);
-
-			if (rx_count == 1)
-				bond_mode_8023ad_handle_slow_pkt(internals,
-						slave_id, lacp_pkt);
-			else
-				rx_machine_update(internals, slave_id, NULL);
+			bond_mode_8023ad_dedicated_rxq_process(internals,
+					slave_id);
 		}
 
 		periodic_machine(internals, slave_id);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.940208311 +0800
+++ 0135-net-bonding-fix-dedicated-queue-mode-in-vector-burst.patch	2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From b8cfca26aed14354a6594d416a37881f494e2cfc Mon Sep 17 00:00:00 2001
+From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]
@@ -24 +26,0 @@
-Cc: stable at dpdk.org
@@ -33 +35 @@
-index 3558644232..2029955c10 100644
+index 128754f459..478c28afee 100644


More information about the stable mailing list