bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Benoit Ganne (bganne)" <bganne@cisco.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: RE: AF_XDP poll() / sendmsg() race + headroom changes
Date: Wed, 12 May 2021 08:26:55 +0000	[thread overview]
Message-ID: <DM6PR11MB3660A5132EB554ED746C8C92C1529@DM6PR11MB3660.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAJ8uoz16WLwqP+=dtphm7KWh=c9QYiU25k33hNrAg8ciaGe9vw@mail.gmail.com>

Hi Magnus,

>> I am the maintainer of the AF_XDP driver for VPP, an open-source
>> userspace networking stack, and I ran into an issue recently with kernels
>> < 5.6 (including LTS kernel 5.4 which is shipped in eg. Ubuntu 20.04 LTS):
>> it seems like one cannot call poll() and sendmsg() concurrently on the
>> same AF_XDP socket. Is this a supported usecase?
[...]
>> I hit a 2nd issue with kernel >= 5.9, where the headroom on rx for copy
>> mode has grown from 0 to XDP_PACKET_HEADROOM (256-bytes).
[...]

> Hi Benoit. Thank you for reporting, I will take a look at this and get
> back to you. Next time, please add me and Björn on the to line so that
> you get a quicker response.

Thanks! Sure I will in the future.
If I may, an ideal scenario would be:
 1) the concurrent rx/tx usecase is officially supported, and 11cc2d21499cabe7e7964389634ed1de3ee91d33 should be backported to LTS
 2) had a way to detect different version of AF_XDP (through an ioctl() or getsockopt() or...) so that I can detect more easily what I should do at init time. Eg. managing both headroom (0 and 256) for copy mode is not very difficult if I can detect it easily

Best
ben

  reply	other threads:[~2021-05-12  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 17:44 AF_XDP poll() / sendmsg() race + headroom changes Benoit Ganne (bganne)
2021-05-12  5:35 ` Magnus Karlsson
2021-05-12  8:26   ` Benoit Ganne (bganne) [this message]
2021-05-12 10:02     ` Magnus Karlsson

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=DM6PR11MB3660A5132EB554ED746C8C92C1529@DM6PR11MB3660.namprd11.prod.outlook.com \
    --to=bganne@cisco.com \
    --cc=bpf@vger.kernel.org \
    --cc=magnus.karlsson@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).