<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I assume this answer is No, but just wanted to be confirmed. </div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature" class="elementToProof">
<p> </p>
<p><i>Thanks,</i></p>
<p>Changchun</p>
<p> </p>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Changchun Zhang <changchun.zhang@oracle.com><br>
<b>Sent:</b> Monday, February 17, 2025 2:14 PM<br>
<b>To:</b> Stephen Hemminger <stephen@networkplumber.org><br>
<b>Cc:</b> Van Haaren, Harry <harry.van.haaren@intel.com>; NAGENDRA BALAGANI <nagendra.balagani@oracle.com>; users@dpdk.org <users@dpdk.org><br>
<b>Subject:</b> Re: [External] : Re: Query Regarding Race Condition Between Packet Reception and Device Stop in DPDK</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:"Segoe UI","Segoe UI Web (West European)","Helvetica Neue",sans-serif; font-size:11pt; color:rgb(0,0,0)">
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()? </div>
<div class="x_elementToProof" style="font-family:"Segoe UI","Segoe UI Web (West European)","Helvetica Neue",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:"Segoe UI","Segoe UI Web (West European)","Helvetica Neue",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_Signature" class="x_elementToProof">
<p> </p>
<p><i>Thanks,</i></p>
<p>Changchun</p>
<p> </p>
</div>
<div id="x_appendonsend"></div>
<div style="font-family:"Segoe UI","Segoe UI Web (West European)","Helvetica Neue",sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block; width:98%">
<div dir="ltr" id="x_divRplyFwdMsg"><span style="font-family:Calibri,sans-serif; font-size:11pt; color:rgb(0,0,0)"><b>From:</b> Stephen Hemminger <stephen@networkplumber.org><br>
<b>Sent:</b> Monday, February 17, 2025 2:06 PM<br>
<b>To:</b> Changchun Zhang <changchun.zhang@oracle.com><br>
<b>Cc:</b> Van Haaren, Harry <harry.van.haaren@intel.com>; NAGENDRA BALAGANI <nagendra.balagani@oracle.com>; users@dpdk.org <users@dpdk.org><br>
<b>Subject:</b> Re: [External] : Re: Query Regarding Race Condition Between Packet Reception and Device Stop in DPDK</span>
<div> </div>
</div>
<div class="x_elementToProof" style="font-size:11pt">On Mon, 17 Feb 2025 18:57:00 +0000<br>
Changchun Zhang <changchun.zhang@oracle.com> wrote:<br>
<br>
> Hi Harry,<br>
><br>
> 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:<br>
> Control path:<br>
> rte_eth_dev_rx_queue_stop(rx_queue_id);<br>
> ...waiting for draining of rx_queue...<br>
> rte_eth_dev_stop()<br>
> ....<br>
><br>
> Fast path:<br>
> Keep calling rte_eth_rx_burst()<br>
> (I am expecting it will return 0 if queue is already drained and stopped)<br>
><br>
<br>
No.<br>
The application needs to not call rx_burst when stop is being done.<br>
There rx_burst is a fast path with no additional checks and is intentionally not thread safe.<br>
You need to coordinate queue management inside the application.</div>
</div>
</body>
</html>