[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEKGpzi5qz14TWm4ZSmk8zWcw_z2f9iM+dW10Tu6evJg60aa_g@mail.gmail.com>
Date: Thu, 7 Nov 2019 13:44:48 +0900
From: "Daniel T. Lee" <danieltimlee@...il.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andriin@...com>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH,bpf-next v2 2/2] samples: bpf: update map definition to
new syntax BTF-defined map
On Thu, Nov 7, 2019 at 11:53 AM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Wed, Nov 6, 2019 at 4:52 PM Daniel T. Lee <danieltimlee@...il.com> wrote:
> >
> > Since, the new syntax of BTF-defined map has been introduced,
> > the syntax for using maps under samples directory are mixed up.
> > For example, some are already using the new syntax, and some are using
> > existing syntax by calling them as 'legacy'.
> >
> > As stated at commit abd29c931459 ("libbpf: allow specifying map
> > definitions using BTF"), the BTF-defined map has more compatablility
> > with extending supported map definition features.
> >
> > The commit doesn't replace all of the map to new BTF-defined map,
> > because some of the samples still use bpf_load instead of libbpf, which
> > can't properly create BTF-defined map.
> >
> > This will only updates the samples which uses libbpf API for loading bpf
> > program. (ex. bpf_prog_load_xattr)
> >
> > Signed-off-by: Daniel T. Lee <danieltimlee@...il.com>
> > ---
> > Changes in v2:
> > - stick to __type() instead of __uint({key,value}_size) where possible
> >
> > samples/bpf/sockex1_kern.c | 12 ++--
> > samples/bpf/sockex2_kern.c | 12 ++--
> > samples/bpf/xdp1_kern.c | 12 ++--
> > samples/bpf/xdp2_kern.c | 12 ++--
> > samples/bpf/xdp_adjust_tail_kern.c | 12 ++--
> > samples/bpf/xdp_fwd_kern.c | 13 ++--
> > samples/bpf/xdp_redirect_cpu_kern.c | 108 ++++++++++++++--------------
> > samples/bpf/xdp_redirect_kern.c | 24 +++----
> > samples/bpf/xdp_redirect_map_kern.c | 24 +++----
> > samples/bpf/xdp_router_ipv4_kern.c | 64 ++++++++---------
> > samples/bpf/xdp_rxq_info_kern.c | 37 +++++-----
> > samples/bpf/xdp_tx_iptunnel_kern.c | 26 +++----
> > 12 files changed, 178 insertions(+), 178 deletions(-)
>
> Heh, 1-to-1 insertions/deletions, no excuse to use old syntax ;)
>
> Thanks for completing conversion!
>
> Acked-by: Andrii Nakryiko <andriin@...com>
>
> [...]
Thank you for your time and effort for the review.
Thanks,
Daniel
Powered by blists - more mailing lists