patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/tap: fix blocked rx packets error
@ 2019-09-02 11:43 Marcin Smoczynski
  2019-09-03 13:15 ` Ananyev, Konstantin
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marcin Smoczynski @ 2019-09-02 11:43 UTC (permalink / raw)
  To: konstantin.ananyev, keith.wiles, adrien.mazarguil
  Cc: dev, stable, Marcin Smoczynski, Mariusz Drost

When OS sends more packets than are beaing 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.

Fixes: a0d8e807d9 ("net/tap: add Rx trigger")
Cc: stable@dpdk.org

Tested-by: Mariusz Drost <mariuszx.drost@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 64bd04911..60121ae56 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -353,8 +353,7 @@ 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; ) {
@@ -433,6 +432,9 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	rxq->stats.ipackets += num_rx;
 	rxq->stats.ibytes += num_rx_bytes;
 
+	if (trigger && num_rx < nb_pkts)
+		rxq->trigger_seen = trigger;
+
 	return num_rx;
 }
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-10 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 11:43 [dpdk-stable] [PATCH v1] net/tap: fix blocked rx packets error Marcin Smoczynski
2019-09-03 13:15 ` Ananyev, Konstantin
2019-09-05  5:43 ` [dpdk-stable] [dpdk-dev] " Gavin Hu (Arm Technology China)
2019-09-06  8:48   ` Smoczynski, MarcinX
2019-09-23 13:22 ` [dpdk-stable] [PATCH v2 0/1] " Marcin Smoczynski
2019-09-23 13:22   ` [dpdk-stable] [PATCH v2 1/1] " Marcin Smoczynski
2019-09-23 14:41     ` Wiles, Keith
2019-10-10 14:40       ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).