From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
bpf@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net,
ast@kernel.org, daniel@iogearbox.net, brouer@redhat.com,
pabeni@redhat.com, toke@redhat.com, andrii@kernel.org,
nbd@nbd.name
Subject: Re: [PATCH bpf-next] net: xdp: introduce XDP_PACKET_HEADROOM_MIN for veth and generic-xdp
Date: Mon, 21 Mar 2022 13:17:51 +0100 [thread overview]
Message-ID: <Yjhs73opbYZtALO9@lore-desk> (raw)
In-Reply-To: <20220318140153.592ac996@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]
> On Fri, 18 Mar 2022 20:54:51 +0100 Lorenzo Bianconi wrote:
> > > IIUC the initial purpose of SKB mode was to be able to test or
> > > experiment with XDP "until drivers add support". If that's still
> > > the case the semantics of XDP SKB should be as close to ideal
> > > XDP implementation as possible.
> >
> > XDP in skb-mode is useful if we want to perform a XDP_REDIRECT from
> > an ethernet driver into a wlan device since mac80211 requires a skb.
>
> Ack, I understand the use case is real, but given that the TC
> alternative exists we can apply more scrutiny to the trade offs.
> IMO production use of XDP skb mode would be a mistake, the thing
> is a layering violation by nature. Our time is better spent making
> TC / XDP code portability effortless.
ack, got your point, but I guess there is still a value running the same xdp
program instead of switching to a tc one if the driver does not support
native xdp. Anyway I am fine dropping this patch.
>
> > > We had a knob for specifying needed headroom, is that thing not
> > > working / not a potentially cleaner direction?
> > >
> >
> > which one do you mean? I guess it would be useful :)
>
> We have ndo_set_rx_headroom and dev->needed_headroom.
> Sorry for brevity, I'm on the move today, referring to things
> from memory :)
:)
Do you mean set dev->needed_headroom based on XDP_HEADROOM if the device is
running in xdp mode, right? I guess this is doable for veth, but what is
the right value for generic-xdp? Am I missing something?
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-03-21 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 19:19 [PATCH bpf-next] net: xdp: introduce XDP_PACKET_HEADROOM_MIN for veth and generic-xdp Lorenzo Bianconi
2022-03-18 19:33 ` Jakub Kicinski
2022-03-18 19:54 ` Lorenzo Bianconi
2022-03-18 21:01 ` Jakub Kicinski
2022-03-21 12:17 ` Lorenzo Bianconi [this message]
2022-03-21 18:39 ` Jakub Kicinski
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=Yjhs73opbYZtALO9@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.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).