patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Wiles, Keith" <keith.wiles@intel.com>,
	"Smoczynski, MarcinX" <marcinx.smoczynski@intel.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Drost, MariuszX" <mariuszx.drost@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v2 1/1] net/tap: fix blocked rx packets error
Date: Thu, 10 Oct 2019 15:40:06 +0100	[thread overview]
Message-ID: <b803bf14-5ee8-9fa6-f2ec-c8a2a3a3b70c@intel.com> (raw)
In-Reply-To: <0F6D6BB2-958A-4EEA-BACF-DB5BFE79A6D0@intel.com>

On 9/23/2019 3:41 PM, Wiles, Keith wrote:
> 
> 
>> On Sep 23, 2019, at 8:22 AM, Smoczynski, MarcinX <marcinx.smoczynski@intel.com> wrote:
>>
>> 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: a0d8e807d9 ("net/tap: add Rx trigger")
>> Cc: stable@dpdk.org
>>
>> Tested-by: Mariusz Drost <mariuszx.drost@intel.com>
>> Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>> Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@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 64bd04911..9c3adb832 100644
>> --- a/drivers/net/tap/rte_eth_tap.c
>> +++ b/drivers/net/tap/rte_eth_tap.c
>> @@ -353,10 +353,8 @@ 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;
>> 		struct rte_mbuf *seg = NULL;
>> @@ -433,6 +431,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;
> 
> Looks reasonable to me. I was looking at the code for this patch and noticed what I believe is a bit odd.
> 
> The line around 1352 does set req->trigger_seen = 1;, but the tap_trigger global variable is always set to tap_trigger = (tap_trigger + 1) | 0x80000000; in the signal handler.
> Just seems the line around 1352 should be set to at least 0x80000001 to begin with just to be constant. Not for this patch and maybe it does not matter in the long run.
> 
> 
> Reviewed-by: Keith Wiles <Keith.Wiles@intel.com>

Applied to dpdk-next-net/master, thanks.

      reply	other threads:[~2019-10-10 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 11:43 [dpdk-stable] [PATCH v1] " 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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b803bf14-5ee8-9fa6-f2ec-c8a2a3a3b70c@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marcinx.smoczynski@intel.com \
    --cc=mariuszx.drost@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).