Re: [PATCH v3 bpf-next 2/9] selftests/bpf: normalize SEC("classifier") usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 27, 2021 at 9:12 AM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Mon, Sep 27, 2021 at 8:14 AM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote:
> >
> > On 9/23/21 1:41 AM, Andrii Nakryiko wrote:
> > > Convert all SEC("classifier*") uses to strict SEC("classifier") with no
> > > extra characters. In reference_tracking selftests also drop the usage of
> > > broken bpf_program__load(). Along the way switch from ambiguous searching by
> > > program title (section name) to non-ambiguous searching by name in some
> > > selftests, getting closer to completely removing
> > > bpf_object__find_program_by_title().
> > >
> > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> > [...]
> > > diff --git a/tools/testing/selftests/bpf/progs/test_tc_peer.c b/tools/testing/selftests/bpf/progs/test_tc_peer.c
> > > index fe818cd5f010..7d0256d7db82 100644
> > > --- a/tools/testing/selftests/bpf/progs/test_tc_peer.c
> > > +++ b/tools/testing/selftests/bpf/progs/test_tc_peer.c
> > > @@ -16,31 +16,31 @@ volatile const __u32 IFINDEX_DST;
> > >   static const __u8 src_mac[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55};
> > >   static const __u8 dst_mac[] = {0x00, 0x22, 0x33, 0x44, 0x55, 0x66};
> > >
> > > -SEC("classifier/chk_egress")
> > > +SEC("classifier")
> >
> > Can be a follow-up, but lets just deprecate the whole "classifier" terminology
> > for libbpf since tc BPF programs do significantly more than just that since long
> > time and it's otherwise just a confusing UX. The whole "classifier" / "action"
> > terminology is just remains from legacy tc. See also libbpf.h's 'TC related API'
> > where there is no notion of "classifier". Given you have SEC("xdp"), lets name
> > all these in here SEC("tc"), and for compat we can keep the old "classifier" name
> > as a hidden option in libbpf if we have to.
>
> That's a great idea. SEC("tc") makes much more sense.
> Let's do it as part of this series, so the same lines don't need to be
> touched twice.

Sounds good, I'll send a new revision.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux