From: Stephen Hemminger <stephen@networkplumber.org>
To: Tudor Cornea <tudor.cornea@gmail.com>
Cc: linville@tuxdriver.com, ferruh.yigit@amd.com,
andrew.rybchenko@oktetlabs.ru, dev@dpdk.org
Subject: Re: [PATCH] net/af_packet: allow disabling packet fanout
Date: Thu, 12 Dec 2024 09:11:02 -0800 [thread overview]
Message-ID: <20241212091102.20422f95@hermes.local> (raw)
In-Reply-To: <20241212080442.1628366-1-tudor.cornea@gmail.com>
On Thu, 12 Dec 2024 10:04:42 +0200
Tudor Cornea <tudor.cornea@gmail.com> wrote:
> This allows us to control whether the PMD will attempt to use
> the PACKET_FANOUT socket option, and allows the binary compiled
> against newer kernel headers to run on an older kernel, which
> lacks support for it.
>
> Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Controlling fanout more is a good idea but not sure what this patch
is trying to do with it.
- DPDK minimum kernel version is now 4.19 so no point in worrying about
backward compatibility. According to man page for packet, fanout
was added in 3.1 kernel.
- It would be useful to allow application to control fanout in more detail.
According to man page:
• The load-balance mode PACKET_FANOUT_LB implements a round-
robin algorithm.
• PACKET_FANOUT_CPU selects the socket based on the CPU that the
packet arrived on.
• PACKET_FANOUT_ROLLOVER processes all data on a single socket,
moving to the next when one becomes backlogged.
• PACKET_FANOUT_RND selects the socket using a pseudo-random
number generator.
• PACKET_FANOUT_QM (available since Linux 3.14) selects the
socket using the recorded queue_mapping of the received skb.
The default should be for packet to behave like a hardware NIC if RSS is
enabled. And use a single queue if RSS is not enabled. The PMD kind of does
this now but not the same.
next prev parent reply other threads:[~2024-12-12 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 8:04 Tudor Cornea
2024-12-12 17:11 ` Stephen Hemminger [this message]
2024-12-16 9:58 ` Tudor Cornea
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=20241212091102.20422f95@hermes.local \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=linville@tuxdriver.com \
--cc=tudor.cornea@gmail.com \
/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).