DPDK patches and discussions
 help / color / mirror / Atom feed
* DPDK RX Ring number dump
@ 2022-12-12  4:59 Kamaraj P
  2022-12-12 10:36 ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Kamaraj P @ 2022-12-12  4:59 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Bruce Richardson, Burakov, Anatoly

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Hello All,

We have an application where we need to dump the received packet rx ring
number from the queue.
Can anyone share the DPDK api to dump the rx ringnumber for the packet
which we received (debug and troubleshoot)?


Thanks,
Kamaraj

[-- Attachment #2: Type: text/html, Size: 380 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DPDK RX Ring number dump
  2022-12-12  4:59 DPDK RX Ring number dump Kamaraj P
@ 2022-12-12 10:36 ` Bruce Richardson
  2022-12-12 10:45   ` Kamaraj P
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2022-12-12 10:36 UTC (permalink / raw)
  To: Kamaraj P; +Cc: dev, Stephen Hemminger, Burakov, Anatoly

On Mon, Dec 12, 2022 at 10:29:58AM +0530, Kamaraj P wrote:
>    Hello All,
>    We have an application where we need to dump the received packet rx
>    ring number from the queue.
>    Can anyone share the DPDK api to dump the rx ringnumber for the packet
>    which we received (debug and troubleshoot)?
>    Thanks,
>    Kamaraj

Hi,

this information is not preserved in the DPDK mbuf structure, so is lost
after the call to rx-burst. The DPDK port field stores the port number on
return from rx_burst, but your app could look to reuse this field to store
the queue number also. For example, if you have only a few input ports, you
could encode the port number in the high bits of the "port" field, and
store the rx queue in the lower bits. This could be done as an rx-callback
if you want to avoid adjusting your app following each and every rx-burst
call.

/Bruce

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DPDK RX Ring number dump
  2022-12-12 10:36 ` Bruce Richardson
@ 2022-12-12 10:45   ` Kamaraj P
  2022-12-12 11:03     ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Kamaraj P @ 2022-12-12 10:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Stephen Hemminger, Burakov, Anatoly

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

Thanks. Is there any teatpmd application has this logic to dump these info
whenever we received the packet.

Thanks,
Kamaraj

On Mon, 12 Dec 2022, 4:07 pm Bruce Richardson, <bruce.richardson@intel.com>
wrote:

> On Mon, Dec 12, 2022 at 10:29:58AM +0530, Kamaraj P wrote:
> >    Hello All,
> >    We have an application where we need to dump the received packet rx
> >    ring number from the queue.
> >    Can anyone share the DPDK api to dump the rx ringnumber for the packet
> >    which we received (debug and troubleshoot)?
> >    Thanks,
> >    Kamaraj
>
> Hi,
>
> this information is not preserved in the DPDK mbuf structure, so is lost
> after the call to rx-burst. The DPDK port field stores the port number on
> return from rx_burst, but your app could look to reuse this field to store
> the queue number also. For example, if you have only a few input ports, you
> could encode the port number in the high bits of the "port" field, and
> store the rx queue in the lower bits. This could be done as an rx-callback
> if you want to avoid adjusting your app following each and every rx-burst
> call.
>
> /Bruce
>

[-- Attachment #2: Type: text/html, Size: 1567 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DPDK RX Ring number dump
  2022-12-12 10:45   ` Kamaraj P
@ 2022-12-12 11:03     ` Bruce Richardson
  2022-12-12 16:31       ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2022-12-12 11:03 UTC (permalink / raw)
  To: Kamaraj P; +Cc: dev, Stephen Hemminger, Burakov, Anatoly

On Mon, Dec 12, 2022 at 04:15:04PM +0530, Kamaraj P wrote:
>    Thanks. Is there any teatpmd application has this logic to dump these
>    info whenever we received the packet.
>    Thanks,
>    Kamaraj
> 
Sorry, no. No example application has the logic to do this.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DPDK RX Ring number dump
  2022-12-12 11:03     ` Bruce Richardson
@ 2022-12-12 16:31       ` Stephen Hemminger
  2022-12-13  7:31         ` Kamaraj P
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2022-12-12 16:31 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Kamaraj P, dev, Burakov, Anatoly

On Mon, 12 Dec 2022 11:03:03 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:

> On Mon, Dec 12, 2022 at 04:15:04PM +0530, Kamaraj P wrote:
> >    Thanks. Is there any teatpmd application has this logic to dump these
> >    info whenever we received the packet.
> >    Thanks,
> >    Kamaraj
> >   
> Sorry, no. No example application has the logic to do this.

Since the DPDK uses a pull model, the receive queue is known
when calling rx_burst().

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DPDK RX Ring number dump
  2022-12-12 16:31       ` Stephen Hemminger
@ 2022-12-13  7:31         ` Kamaraj P
  0 siblings, 0 replies; 6+ messages in thread
From: Kamaraj P @ 2022-12-13  7:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, dev, Burakov, Anatoly

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Thanks Stephen,.
As Bruce suggested earlier we cannot get ringnumber from the queue(attached
to the port) after rx_burst call.

Thanks,
Kamaraj


On Mon, 12 Dec 2022, 10:01 pm Stephen Hemminger, <stephen@networkplumber.org>
wrote:

> On Mon, 12 Dec 2022 11:03:03 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > On Mon, Dec 12, 2022 at 04:15:04PM +0530, Kamaraj P wrote:
> > >    Thanks. Is there any teatpmd application has this logic to dump
> these
> > >    info whenever we received the packet.
> > >    Thanks,
> > >    Kamaraj
> > >
> > Sorry, no. No example application has the logic to do this.
>
> Since the DPDK uses a pull model, the receive queue is known
> when calling rx_burst().
>

[-- Attachment #2: Type: text/html, Size: 1269 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-13  7:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12  4:59 DPDK RX Ring number dump Kamaraj P
2022-12-12 10:36 ` Bruce Richardson
2022-12-12 10:45   ` Kamaraj P
2022-12-12 11:03     ` Bruce Richardson
2022-12-12 16:31       ` Stephen Hemminger
2022-12-13  7:31         ` Kamaraj P

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).