[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170828172202.mhwqfssg6xgssi52@ast-mbp>
Date: Mon, 28 Aug 2017 10:22:04 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: ast@...nel.org, daniel@...earbox.net, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [net-next PATCH 1/9] bpf: convert sockmap field attach_bpf_fd2
to type
On Mon, Aug 28, 2017 at 07:10:04AM -0700, John Fastabend wrote:
> In the initial sockmap API we provided strparser and verdict programs
> using a single attach command by extending the attach API with a the
> attach_bpf_fd2 field.
>
> However, if we add other programs in the future we will be adding a
> field for every new possible type, attach_bpf_fd(3,4,..). This
> seems a bit clumsy for an API. So lets push the programs using two
> new type fields.
>
> BPF_SK_SKB_STREAM_PARSER
> BPF_SK_SKB_STREAM_VERDICT
>
> This has the advantage of having a readable name and can easily be
> extended in the future.
>
> Updates to samples and sockmap included here also generalize tests
> slightly to support upcoming patch for multiple map support.
>
> Signed-off-by: John Fastabend <john.fastabend@...il.com>
> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
> Suggested-by: Alexei Starovoitov <ast@...nel.org>
lgtm
Acked-by: Alexei Starovoitov <ast@...nel.org>
Powered by blists - more mailing lists