From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
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: Fri, 18 Mar 2022 20:54:51 +0100 [thread overview]
Message-ID: <YjTji4qgDbrXg4D+@lore-desk> (raw)
In-Reply-To: <20220318123323.75973f84@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
On Mar 18, Jakub Kicinski wrote:
> On Fri, 18 Mar 2022 20:19:29 +0100 Lorenzo Bianconi wrote:
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index ba69ddf85af6..92d560e648ab 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -4737,7 +4737,7 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
> > * native XDP provides, thus we need to do it here as well.
> > */
> > if (skb_cloned(skb) || skb_is_nonlinear(skb) ||
> > - skb_headroom(skb) < XDP_PACKET_HEADROOM) {
> > + skb_headroom(skb) < XDP_PACKET_HEADROOM_MIN) {
> > int hroom = XDP_PACKET_HEADROOM - skb_headroom(skb);
> > int troom = skb->tail + skb->data_len - skb->end;
> >
>
> 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.
>
> 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 :)
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-03-18 19:55 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 [this message]
2022-03-18 21:01 ` Jakub Kicinski
2022-03-21 12:17 ` Lorenzo Bianconi
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=YjTji4qgDbrXg4D+@lore-desk \
--to=lorenzo.bianconi@redhat.com \
--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@kernel.org \
--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).