<div dir="ltr"><font face="verdana, sans-serif">Hi Harry,</font><div><font face="verdana, sans-serif"><br></font></div><div><p style="margin:0in;font-size:10pt"><font face="verdana, sans-serif">Thanks for your
valuable time and response for the query. Long struggling issue has been
fixed now. </font></p>

<p style="margin:0in;font-size:10pt"><font face="verdana, sans-serif"> </font></p>

<p style="margin:0in"><font face="verdana, sans-serif"><span style="font-size:10pt">Issue
was resolved after proper initialization of '</span><span style="font-size:11pt">disable_implicit_release' variable during event dev
initialization. </span></font></p>

<p style="margin:0in;font-size:11pt"><font face="verdana, sans-serif"> </font></p>

<p style="margin:0in;font-size:10pt"><font face="verdana, sans-serif">In our case, we are
sending packets from Rx core to worker core using event dev queue and expect
implicit release of event after worker core dequeued the packets from event dev
queue. After initialization of '</font><span style="font-family:verdana,sans-serif;font-size:14.6667px">disable_implicit_release' variable, now event dev queue released the inflight packets after the dequeue happened in the worker. </span></p>

<p style="margin:0in;font-size:11pt"><font face="verdana, sans-serif"> </font></p>

<p style="margin:0in;font-size:10pt"><font face="verdana, sans-serif">With a wide
range of testing, now all cases are working fine.</font></p><p style="margin:0in;font-family:Calibri;font-size:10pt"><br></p><p style="margin:0in"><font face="verdana, sans-serif">Regards,</font></p><p style="margin:0in"><font face="verdana, sans-serif">Hariharan</font></p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 19, 2023 at 9:49 PM Van Haaren, Harry <<a href="mailto:harry.van.haaren@intel.com">harry.van.haaren@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From: Hari Haran <<a href="mailto:info2hariharan@gmail.com" target="_blank">info2hariharan@gmail.com</a>> <br>
> Sent: Wednesday, July 19, 2023 4:30 PM<br>
> To: Van Haaren, Harry <<a href="mailto:harry.van.haaren@intel.com" target="_blank">harry.van.haaren@intel.com</a>><br>
> Cc: <a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a><br>
> Subject: Re: Inflight value shown invalid in Event Dev Queue<br>
> <br>
> Hi Harry Haaren (Yes :) )<br>
> <br>
> I have given more details below, please check this. <br>
<br>
Please reply "in-line", it makes it easier to read the conversation for future readers, and gives reference to your replies.<br>
<br>
> Device Configuration:<br>
> Event Dev Queue : 1<br>
> Number of ports : 3<br>
> <br>
> Queue 0 depth - 32k<br>
> Port 0, 1 amd 2 : Enqueue depth 4096, Dequeue depth 128<br>
> <br>
> Cores: <br>
> Rx core - 1<br>
> Workers cores - 2<br>
> <br>
> Port 2:<br>
> Used in Rx core - Used to post packets from Rx core to worker cores using event dev queue .<br>
> So port 2 used to post packets only.  <br>
> API used: rte_event_enqueue_burst()<br>
> <br>
> Port 0 and 1 linked with Event Dev Q 0 to dequeue the packets. These ports used to dequeue the packets only. <br>
> Port 0 used in Worker core 1 - Only to receive the packets from Rx core using event dev queue<br>
> Port 1 used in worker core 2 - Only to receive the packets from Rx core using event dev queue<br>
> API used: rte_event_dequeue_burst()<br>
> <br>
> Expected behaviour:<br>
> <br>
> Port 2 enqueue packets to event dev Q in Rx core <br>
> Port 0 and 1 dequeue packets from event dev Q in two workers <br>
> <br>
> Event dev scheduler of queue 0, will schedule received packets in port 2 to port 0 and 1. <br>
> <br>
> <br>
> Problem Description:<br>
> <br>
> Port 0 - only received 4096 packets through event dev Q, after that no packets available for this. <br>
> API used: rte_event_dequeue_burst()<br>
> <br>
> Port 2 - Successfully enqueued 32k packets through event dev Q, after that enqueue failure observed. <br>
> API used: rte_event_enqueue_burst()<br>
> Looks like, event dev queue stalled at this point. <br>
> <br>
> Also why port 0 stats show inflight as 4096?<br>
<br>
This seems to be the problem - are you returning the events to Eventdev?<br>
Or calling the rte_event_dequeue_burst() API again (the "implicit releases" default value will automatically "complete" the events on the next dequeue() call, making the "inflights" go down, and allowing the Eventdev to make forward progress.<br>
<br>
Please ensure that new events are enqueued with "NEW" type,<br>
And that the worker cores are forwarding events with "FWD" type.<br>
<br>
This ensures that the RX/producer core is back-pressured first, and that worker cores (who enqueue FWD type events) can make progress as there is still space in the device.<br>
Typically, setting a "new_event_threshold" on the producer port (<a href="https://doc.dpdk.org/api/structrte__event__port__conf.html#a70bebdfb5211f97b81b46ff08594ddda" rel="noreferrer" target="_blank">https://doc.dpdk.org/api/structrte__event__port__conf.html#a70bebdfb5211f97b81b46ff08594ddda</a>) of 50% of the total capacity is a good starting point. The ideal new % amount depends on the workload itself, and how often one NEW event turns into N NEW events..<br>
<br>
> Port 0 Stats:<br>
>   rx   0  drop 0  tx   4096   inflight 4096<br>
> <br>
> All Stats:<br>
> Dev=0 Port=1EventDev todo-fix-name: ports 3, qids 1<br>
> rx   32768<br>
> drop 0<br>
> tx   4096<br>
> sched calls: 628945658<br>
> sched cq/qid call: 628964843<br>
> sched no IQ enq: 628926401<br>
> sched no CQ enq: 628942982<br>
> inflight 32768, credits: 0<br>
> <br>
> <br>
> Port 0<br>
>   rx   0  drop 0  tx   4096   inflight 4096<br>
>   Max New: 32768  Avg cycles PP: 0    Credits: 0<br>
>   Receive burst distribution:<br>
>       0:100% 1-4:0.00% 5-8:0.00% 9-12:0.00%<br>
>   rx ring used:    0 free: 4096<br>
>   cq ring used:    0 free:  128<br>
> Port 1<br>
>   rx   0  drop 0  tx   0  inflight 0<br>
>   Max New: 32768  Avg cycles PP: 0    Credits: 0<br>
>   Receive burst distribution:<br>
>       0:100%<br>
>   rx ring used:    0 free: 4096<br>
>   cq ring used:    0 free:  128<br>
> Port 2<br>
>   rx   32768  drop 0  tx   0  inflight 0<br>
>   Max New: 32768  Avg cycles PP: 0    Credits: 0<br>
>   Receive burst distribution:<br>
>       0:-nan%<br>
>   rx ring used:    0 free: 4096<br>
>   cq ring used:    0 free:  128<br>
> <br>
> Queue 0 (Atomic)<br>
>   rx   32768  drop 0  tx   4096<br>
>   Per Port Stats:<br>
>     Port 0: Pkts: 4096    Flows: 1<br>
>     Port 1: Pkts: 0   Flows: 0<br>
>     Port 2: Pkts: 0   Flows: 0<br>
>     Port 3: Pkts: 0   Flows: 0<br>
>   iq 0: Used 28672<br>
> <br>
> Regards,<br>
> Hariharan<br>
<br>
Regards, -Harry<br>
<br>
<snip below older parts of conversation><br>
</blockquote></div>