[dpdk-stable] patch 'net/tap: fix blocked Rx packets' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:27:09 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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

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/c67950b05fa9104ae2855cd1a7531a76dbdde508

Thanks.

Kevin.

---
>From c67950b05fa9104ae2855cd1a7531a76dbdde508 Mon Sep 17 00:00:00 2001
From: Marcin Smoczynski <marcinx.smoczynski at intel.com>
Date: Mon, 23 Sep 2019 15:22:47 +0200
Subject: [PATCH] net/tap: fix blocked Rx packets

[ upstream commit d070c3413164e3f8f7fa4c4325d7df50a8275f39 ]

When OS sends more packets than are being read with a single
'rte_eth_rx_burst' call, rx packets are getting stucked in the tap pmd
and are unable to receive, because trigger_seen is getting updated
and consecutive calls are not getting any packets.

Do not update trigger_seen unless less than a max number of packets were
received allowing next call to receive the rest.

Remove unnecessary compiler barrier.

Fixes: a0d8e807d9de ("net/tap: add Rx trigger")

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski at intel.com>
Tested-by: Mariusz Drost <mariuszx.drost at intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Reviewed-by: Keith Wiles <keith.wiles at intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 37bd25011..775619331 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -356,8 +356,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	if (trigger == rxq->trigger_seen)
 		return 0;
-	if (trigger)
-		rxq->trigger_seen = trigger;
+
 	process_private = rte_eth_devices[rxq->in_port].process_private;
-	rte_compiler_barrier();
 	for (num_rx = 0; num_rx < nb_pkts; ) {
 		struct rte_mbuf *mbuf = rxq->pool;
@@ -436,4 +434,7 @@ end:
 	rxq->stats.ibytes += num_rx_bytes;
 
+	if (trigger && num_rx < nb_pkts)
+		rxq->trigger_seen = trigger;
+
 	return num_rx;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.219294926 +0000
+++ 0060-net-tap-fix-blocked-Rx-packets.patch	2019-12-03 17:29:51.793749058 +0000
@@ -1 +1 @@
-From d070c3413164e3f8f7fa4c4325d7df50a8275f39 Mon Sep 17 00:00:00 2001
+From c67950b05fa9104ae2855cd1a7531a76dbdde508 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d070c3413164e3f8f7fa4c4325d7df50a8275f39 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 922371c29..a13d8d50d 100644
+index 37bd25011..775619331 100644
@@ -31 +32 @@
-@@ -354,8 +354,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -356,8 +356,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +42 @@
-@@ -434,4 +432,7 @@ end:
+@@ -436,4 +434,7 @@ end:



More information about the stable mailing list