From: Federico Parola <federico.parola@polito.it>
To: xdp-newbies@vger.kernel.org
Subject: mlx5 AF_XDP busy polling
Date: Fri, 23 Dec 2022 15:16:32 +0100 [thread overview]
Message-ID: <85adfa75-e6c4-b225-651b-39feaebd93c0@polito.it> (raw)
Hello everyone,
I'm not able to make AF_XDP busy polling work correctly on a ConnectX-4
NIC. Whenever I run the xdpsock application in busy polling mode (-B
flag), in either l2fwd or rx-drop mode, the NIC keeps generating
interrupts and processing rate is very low. I'm on kernel 5.13.
Is this a known problem?
By looking at the code I might have a possible explanation for this
behavior:
- To perform a busy loop on the socket, a valid napi id must be stored
in the sk_napi_id field of the socket structure
(https://elixir.bootlin.com/linux/latest/source/include/net/busy_poll.h#L109)
- The sk_napi_id field of the socket is populated when the first packet
is redirected to the socket, and the value is taken from the rxq
associated to the packet xdp_buff
(https://elixir.bootlin.com/linux/latest/source/include/net/busy_poll.h#L173)
- mlx5 appears to always assign the napi_id 0 to xsk queues, that is not
a valid napi_id
(https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c#L74)
Does this make sense?
Thank you,
Federico
reply other threads:[~2022-12-23 14:16 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:
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=85adfa75-e6c4-b225-651b-39feaebd93c0@polito.it \
--to=federico.parola@polito.it \
--cc=xdp-newbies@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).