DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dylan Baros <dcbaros@utexas.edu>
Cc: users@dpdk.org
Subject: Re: DPDK Queues
Date: Thu, 8 Dec 2022 17:03:22 -0800	[thread overview]
Message-ID: <20221208170322.1f40d630@hermes.local> (raw)
In-Reply-To: <CAMy0=Dc=ZSebFnYvJTMPpO8f4ZQVzqo1AASBrz5mNxfR4Yy2Mg@mail.gmail.com>

On Thu, 8 Dec 2022 12:32:21 -0600
Dylan Baros <dcbaros@utexas.edu> wrote:

> Good afternoon,
> 
> I am working on learning DPDK in an attempt to write a DPDK based
> application and I have a few questions.
> 
> My setup:
> 
>    - 2 x Intel Xeon Gold 6348 CPU @ 2.6 Ghz
>       - 28 cores per socket
>       - Max 3.5 Ghz
>       - Hyperthreading disabled
>       - Ubuntu 22.04.1 LTS
>       - Kernel 5.15.0-53-generic
>       - Cores set to performance governor
>       - 4 x Sabrent 2TB Rocket 4 Plus in RAID0 Config
>       - 128 GB DDR4 Memory
>       - 10 1GB HugePages (Can change to what is required)
>    - 1 x Mellanox ConnectX-5 100gbe NIC
>       - 31:00.0 Ethernet controller: Mellanox Technologies MT27800 Family
>       [ConnectX-5]
>       - Firmware-version: 16.35.1012
>    - UDP Source:
>       - 100 gbe NIC
>       - 9000 MTU Packets
>       - ipv4-udp packets
> 
> 
> The UDP source provides packets with 4 different destination ports. I want
> to direct each port to a queue and have writer threads pull data from the
> queue and write the payloads to one file per queue.
> 
> My questions are:
> 1. How can I direct the data to different queues depending on port
> destination? RSS or rte_flow? If so how do I direct it to do so?

RSS randomizes the queue assignment, and is available in almost all hardware.
The randomization is based on 4-tuple of src/dst ip and port number.

Rte flow allows directing port to queue, but is NIC dependent and is more
difficult to setup.

> 2. Can you have one lcore per queue or does it have to be one lcore per
> port?

The mapping of how queues are handled by cores is up to the application.
DPDK uses a pull model so it is up to which threads request packets
from which queue. Your application decides how that is managed.
But don't have multiple threads polling the same queue.

> 
> 3. How can I get to the payload in the packets? Any code examples of this?

Look at l3fwd. The macro rte_pktmbuf_mtod() to see look at contents.

> 
> Thanks,
> DB


      reply	other threads:[~2022-12-09  1:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 18:32 Dylan Baros
2022-12-09  1:03 ` Stephen Hemminger [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20221208170322.1f40d630@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dcbaros@utexas.edu \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).