[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQKiVgASLJLkSuKzG5=9_2fWtFO67D__xF5rV_PGBKr0cw@mail.gmail.com>
Date: Fri, 22 Mar 2019 09:11:27 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Network Development <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alan Maguire <alan.maguire@...cle.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH bpf-next v2 09/13] bpf: add bpf_skb_adjust_room encap flags
On Fri, Mar 22, 2019 at 8:48 AM Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
>
> On Fri, Mar 22, 2019 at 11:44 AM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
> >
> > On Fri, Mar 22, 2019 at 8:15 AM Willem de Bruijn
> > <willemdebruijn.kernel@...il.com> wrote:
> > >
> > > +#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 (1ULL << 1)
> > > +#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 (1ULL << 2)
> > > +#define BPF_F_ADJ_ROOM_ENCAP_L3_MASK (BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 | \
> > > + BPF_F_ADJ_ROOM_ENCAP_L3_IPV6)
> >
> > mask is still in uapi...
>
> That's only the L3 MASK, which captures ipv4 or ipv6. I don't see that
> being expanded.
and what's the use of it for user space?
packet is either ipv4 or ipv6.
passing two flags will be rejected:
if (flags & BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 &&
+ flags & BPF_F_ADJ_ROOM_ENCAP_L3_IPV6)
+ return -EINVAL;
Powered by blists - more mailing lists