DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Changchun Zhang <changchun.zhang@oracle.com>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	NAGENDRA BALAGANI <nagendra.balagani@oracle.com>,
	"users@dpdk.org" <users@dpdk.org>
Subject: Re: [External] : Re: Query Regarding Race Condition Between Packet Reception and Device Stop in DPDK
Date: Mon, 17 Feb 2025 11:06:52 -0800	[thread overview]
Message-ID: <20250217110652.2f3eb077@hermes.local> (raw)
In-Reply-To: <CO1PR10MB475637CF7A1B9548E765958584FB2@CO1PR10MB4756.namprd10.prod.outlook.com>

On Mon, 17 Feb 2025 18:57:00 +0000
Changchun Zhang <changchun.zhang@oracle.com> wrote:

> Hi Harry,
> 
> Can we call rte_eth_dev_rx_queue_stop() on a rx queue when a fast path is still polling the queue? The sequence on control and fast path cores would like:
> Control path:
> rte_eth_dev_rx_queue_stop(rx_queue_id);
> ...waiting for draining of rx_queue...
> rte_eth_dev_stop()
> ....
> 
> Fast path:
> Keep calling rte_eth_rx_burst()
> (I am expecting it will return 0 if queue is already drained and stopped)
> 

No.
The application needs to not call rx_burst when stop is being done.
There rx_burst is a fast path with no additional checks and is intentionally not thread safe.
You need to coordinate queue management inside the application.

  reply	other threads:[~2025-02-17 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  8:43 NAGENDRA BALAGANI
2025-02-14  9:22 ` Van Haaren, Harry
2025-02-14 16:31   ` Stephen Hemminger
2025-02-17  9:32     ` [External] : " NAGENDRA BALAGANI
2025-02-17 18:57   ` Changchun Zhang
2025-02-17 19:06     ` Stephen Hemminger [this message]
2025-02-17 19:14       ` Changchun Zhang
2025-02-17 19:20         ` Changchun Zhang
2025-02-17 20:56           ` Stephen Hemminger
2025-02-18  9:32         ` Van Haaren, Harry

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=20250217110652.2f3eb077@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=changchun.zhang@oracle.com \
    --cc=harry.van.haaren@intel.com \
    --cc=nagendra.balagani@oracle.com \
    --cc=users@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).