patches for DPDK stable branches
 help / color / Atom feed
From: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>
To: Marcin Smoczynski <marcinx.smoczynski@intel.com>,
	"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>,
	"keith.wiles@intel.com" <keith.wiles@intel.com>,
	"adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Mariusz Drost <mariuszx.drost@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1] net/tap: fix blocked rx packets error
Date: Thu, 5 Sep 2019 05:43:57 +0000
Message-ID: <VI1PR08MB53764DD31C010BEBFCF454F78FBB0@VI1PR08MB5376.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20190902114310.15928-1-marcinx.smoczynski@intel.com>

HI Marcin,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Marcin Smoczynski
> Sent: Monday, September 2, 2019 7:43 PM
> To: konstantin.ananyev@intel.com; keith.wiles@intel.com;
> adrien.mazarguil@6wind.com
> Cc: dev@dpdk.org; stable@dpdk.org; Marcin Smoczynski
> <marcinx.smoczynski@intel.com>; Mariusz Drost
> <mariuszx.drost@intel.com>
> Subject: [dpdk-dev] [PATCH v1] net/tap: fix blocked rx packets error
>
> When OS sends more packets than are beaing read with a single
s/ beaing/being

> '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();
I see this compiler barrier was added together with the above "rxq->trigger_seen = trigger", should it be removed or moved together downwards?

>       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

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 11:43 [dpdk-stable] " Marcin Smoczynski
2019-09-03 13:15 ` Ananyev, Konstantin
2019-09-05  5:43 ` Gavin Hu (Arm Technology China) [this message]
2019-09-06  8:48   ` [dpdk-stable] [dpdk-dev] " 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

Reply instructions:

You may reply publically 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=VI1PR08MB53764DD31C010BEBFCF454F78FBB0@VI1PR08MB5376.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox