[dpdk-stable] patch 'distributor: fix flushing in flight packets' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:35:16 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/24/20. 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/84833d715b7d254d25d5bcdeac0508c1cc4900dd

Thanks.

Kevin.

---
>From 84833d715b7d254d25d5bcdeac0508c1cc4900dd Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:58 +0200
Subject: [PATCH] distributor: fix flushing in flight packets

[ upstream commit 91d6b8235e726a40b87e9268b9686231eb1f7741 ]

rte_distributor_flush() is using total_outstanding()
function to calculate if it should still wait
for processing packets. However in burst mode
only backlog packets were counted.

This patch fixes that issue by counting also in flight
packets. There are also sum fixes to properly keep
count of in flight packets for each worker in bufs[].count.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Acked-by: David Hunt <david.hunt at intel.com>
---
 lib/librte_distributor/rte_distributor.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index a417e06d78..405c5d9dbf 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -483,4 +483,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 			if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
 				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
+				d->bufs[wid].count = 0;
 				release(d, wid);
 				handle_returns(d, wid);
@@ -497,9 +498,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		unsigned int pkts;
 
-		/* Sync with worker on GET_BUF flag. */
-		if (__atomic_load_n(&(d->bufs[wkr].bufptr64[0]),
-			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)
-			d->bufs[wkr].count = 0;
-
 		if ((num_mbufs - next_idx) < RTE_DIST_BURST_SIZE)
 			pkts = num_mbufs - next_idx;
@@ -621,6 +617,8 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		/* Sync with worker on GET_BUF flag. */
 		if ((__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
-			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF))
+			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)) {
+			d->bufs[wid].count = 0;
 			release(d, wid);
+		}
 
 	return num_mbufs;
@@ -673,5 +671,5 @@ total_outstanding(const struct rte_distributor *d)
 
 	for (wkr = 0; wkr < d->num_workers; wkr++)
-		total_outstanding += d->backlog[wkr].count;
+		total_outstanding += d->backlog[wkr].count + d->bufs[wkr].count;
 
 	return total_outstanding;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.522274814 +0000
+++ 0030-distributor-fix-flushing-in-flight-packets.patch	2020-11-18 16:33:37.933215065 +0000
@@ -1 +1 @@
-From 91d6b8235e726a40b87e9268b9686231eb1f7741 Mon Sep 17 00:00:00 2001
+From 84833d715b7d254d25d5bcdeac0508c1cc4900dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 91d6b8235e726a40b87e9268b9686231eb1f7741 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 9fea3f69ab..fb4e9d93f9 100644
+index a417e06d78..405c5d9dbf 100644
@@ -28 +29 @@
-@@ -466,4 +466,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -483,4 +483,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -34 +35 @@
-@@ -480,9 +481,4 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -497,9 +498,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -44 +45 @@
-@@ -604,6 +600,8 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -621,6 +617,8 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -54 +55 @@
-@@ -648,5 +646,5 @@ total_outstanding(const struct rte_distributor *d)
+@@ -673,5 +671,5 @@ total_outstanding(const struct rte_distributor *d)



More information about the stable mailing list