[External] : Re: Query Regarding Race Condition Between Packet Reception and Device Stop in DPDK
Changchun Zhang
changchun.zhang at oracle.com
Mon Feb 17 20:14:21 CET 2025
Okay, so here the issue is still rte_eth_dev_stop(), but not rte_eth_dev_rx_queue_stop(), right? I mean, as long as not calling rte_eth_dev_stop() on control path, is it safe to call rte_eth_dev_rx_queue_stop/rte_eth_dev_rx_queue_start on control path while fast path keeps calling rte_eth_rx_burst()?
Thanks,
Changchun
________________________________
From: Stephen Hemminger <stephen at networkplumber.org>
Sent: Monday, February 17, 2025 2:06 PM
To: Changchun Zhang <changchun.zhang at oracle.com>
Cc: Van Haaren, Harry <harry.van.haaren at intel.com>; NAGENDRA BALAGANI <nagendra.balagani at oracle.com>; users at dpdk.org <users at dpdk.org>
Subject: Re: [External] : Re: Query Regarding Race Condition Between Packet Reception and Device Stop in DPDK
On Mon, 17 Feb 2025 18:57:00 +0000
Changchun Zhang <changchun.zhang at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20250217/0daa7983/attachment.htm>
More information about the users
mailing list