DPDK usage discussions
 help / color / mirror / Atom feed
From: "Ramin.Taraz@gd-ms.com" <Ramin.Taraz@gd-ms.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: Accessing packet data from different lcores
Date: Thu, 23 Dec 2021 19:50:08 +0000
Message-ID: <PH1P110MB1067954AE2B768692505F3FAAE7E9@PH1P110MB1067.NAMP110.PROD.OUTLOOK.COM> (raw)

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

Hi all.
Newbie question here.

I have been playing with dpdk 21.11 for a week or two and run into something that has me scratching my head a bit.

I'm looking at packet_reorder example.  I'm running this sample with 3 cores: 1 RX, 1 Worker, and 1 TX.

dpdk-packet_ordering  -l 0-3  --  -p 3 --disable-reorder

In this example:
RX thread reads the packets from receive queue and puts them in a rx_to_workers ring
Worker thread reads from the rx_to_workers ring, changes the port number and queues to workers_to_tx ring
Tx thread reads from workers_to_tx ring and calls rte_eth_tx_buffer

What I like to do is access the packet content in the worker thread and print out a few bytes from it.

What I'm finding is that mbuf_addr value, for the same mbuf, read from RX thread is different than if read in the Worker or TX thread.

For example, when printing out the address of mbuf, and mbuf_addr values, in the three threads, I get:

mbuf      = 100e30000
mbuf_addr = 100e30080

mbuf      = 100e30000
mbuf_addr = 100000000

mbuf      = 100e30000
mbuf_addr = 100000000

So although mbuf is the same, the mbuf_addr is different.   The packet content is obviously (?) different if read in RX, vs if read in Worker or TX thread.

Is this what is supposed to happen?

Basically: how do I get access to the actual ethernet packet, for reading or modifying, on different lcores; in this case the worker thread.

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

                 reply	other threads:[~2021-12-23 19:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH1P110MB1067954AE2B768692505F3FAAE7E9@PH1P110MB1067.NAMP110.PROD.OUTLOOK.COM \
    --to=ramin.taraz@gd-ms.com \
    --cc=users@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git