lkml.org 
[lkml]   [2021]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH bpf-next] net-bpf: bpf_skb_change_proto() - add support for ipv6 fragments
On Tue, Nov 23, 2021 at 3:06 PM Maciej Żenczykowski
<zenczykowski@gmail.com> wrote:
>
> From: Maciej Żenczykowski <maze@google.com>
>
> IPv4 fragments (20 byte IPv4 header) need to be translated to/from
> IPv6 fragments (40 byte IPv6 header with additional 8 byte IPv6
> fragmentation header).
>
> This allows this to be done by adding an extra flag BPF_F_IPV6_FRAGMENT
> to bpf_skb_change_proto().
>
> I think this is already technically achievable via the use of
> bpf_skb_adjust_room() which was added in v4.12 commit 2be7e212d541,
> but this is far easier to use and eliminates the need to call two
> helper functions, so it's also faster.
>
> Cc: Lorenzo Colitti <lorenzo@google.com>
> Signed-off-by: Maciej Żenczykowski <maze@google.com>

Please add a selftest to exercise the new flag.

Thanks,
Song

\
 
 \ /
  Last update: 2021-11-27 04:42    [W:0.029 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site