[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHmME9qzVc-3ZzC-Bhxyb5TG85jkEicM+T+-nNU7_ez6+vS8RA@mail.gmail.com>
Date: Thu, 20 Aug 2020 22:29:26 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, thomas@...kpuppet.org,
adhipati@...a.io, dsahern@...il.com, toke@...hat.com,
kuba@...nel.org, alexei.starovoitov@...il.com, brouer@...hat.com,
john.fastabend@...il.com, daniel@...earbox.net
Subject: Re: [PATCH net v6] net: xdp: account for layer 3 packets in generic
skb handler
On 8/20/20, David Miller <davem@...emloft.net> wrote:
> From: "Jason A. Donenfeld" <Jason@...c4.com>
> Date: Thu, 20 Aug 2020 11:13:49 +0200
>
>> It seems like if an eBPF program pushes on a VLAN tag or changes the
>> protocol or does any other modification, it will be treated in exactly
>> the same way as the L2 packet above by the remaining parts of the
>> networking stack.
>
> What will update the skb metadata if the XDP program changes the
> wireguard header(s)?
>
XDP runs after decryption/decapsulation, in the netif_rx path, which
means there is no wireguard header at that point. All the wireguard
crypto/udp/header stuff is all inside the driver itself, and the rest
of the stack just deals in terms of plain vanilla L3 ipv4/ipv6
packets.
The skb->protocol metadata is handled by the fake ethernet header.
Is there other metadata I should keep in mind? WireGuard doesn't play
with skb_metadata_*, for example. (Though it may implicitly reach a
skb_metadata_clear via pskb_expand path.)
Powered by blists - more mailing lists