[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9p8YqGgW6Js-M_87-PD29q0ywZ8co-0bimy_DoKjruOFQ@mail.gmail.com>
Date: Mon, 27 Apr 2020 14:57:29 -0600
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Netdev <netdev@...r.kernel.org>,
Adhipati Blambangan <adhipati@...a.io>,
David Ahern <dsahern@...il.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH net v3] net: xdp: account for layer 3 packets in generic
skb handler
On Mon, Apr 27, 2020 at 2:53 PM Jakub Kicinski <kuba@...nel.org> wrote:
> Is this going to work correctly with XDP_TX? presumably wireguard
> doesn't want the ethernet L2 on egress, either? And what about
> redirects?
I'll probably need to augment this patch to handle XDP_TX. I'm not
sure how redirects work, but I'm guessing I'll need to add the
pseudoheader there too? Or are the semantics there even weirder?
>
> I'm not sure we can paper over the L2 differences between interfaces.
> Isn't user supposed to know what interface the program is attached to?
> I believe that's the case for cls_bpf ingress, right?
That was my initial intuition too (see my v1), but Toke said that XDP
prefers having L2 everywhere, which is what motivated the L2-emulation
route that this v3 patch takes. The advantage of my v1 approach is
that it's closer to the truth and likely performs slightly better. The
advantage of the v3 approach is that existing XDP programs don't need
to worry about differences. I don't have a preference either way, and
I'm happy to implement either approach. Let me know what you guys
prefer.
Jason
Powered by blists - more mailing lists