Re: [PATCH bpf-next] selftests/bpf: add lwt ip encap tests to test_progs

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

 



On Tue, Jun 14, 2022 at 9:59 AM Eyal Birger <eyal.birger@xxxxxxxxx> wrote:
>
> On Fri, Jun 10, 2022 at 12:37 AM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote:
> >
> > Hi Eyal,
> >
> > On 6/7/22 3:31 PM, Eyal Birger wrote:
> > > Port test_lwt_ip_encap.sh tests onto test_progs.
> > >
> > > In addition, this commit adds "egress_md" tests which test a similar
> > > flow as egress tests only they use gre devices in collect_md mode
> > > for encapsulation and set the tunnel key using bpf_set_tunnel_key().
> > >
> > > This introduces minor changes to test_lwt_ip_encap.{sh,c} for consistency
> > > with the new tests:
> > >
> > > - GRE key must exist as bpf_set_tunnel_key() explicitly sets the
> > >    TUNNEL_KEY flag
> > >
> > > - Source address for GRE traffic is set to IP*_5 instead of IP*_1 since
> > >    GRE traffic is sent via veth5 so its address is selected when using
> > >    bpf_set_tunnel_key()
> > >
> > > Note: currently these programs use the legacy section name convention
> > > as iproute2 lwt configuration does not support providing function names.
> > >
> > > Signed-off-by: Eyal Birger <eyal.birger@xxxxxxxxx>
> > > ---
> > >   .../selftests/bpf/prog_tests/lwt_ip_encap.c   | 582 ++++++++++++++++++
> > >   .../selftests/bpf/progs/test_lwt_ip_encap.c   |  51 +-
> > >   .../selftests/bpf/test_lwt_ip_encap.sh        |   6 +-
> > >   3 files changed, 633 insertions(+), 6 deletions(-)
> > >   create mode 100644 tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
> > >
> > > diff --git a/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c b/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
> > > new file mode 100644
> > > index 000000000000..e1b6f3ce6045
> > > --- /dev/null
> > > +++ b/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
> > > @@ -0,0 +1,582 @@
> > [...]
> >
> > Thanks a lot for porting the test into test_progs! Looks like the BPF CI currently
> > bails out here:
> >
> > https://github.com/kernel-patches/bpf/runs/6812283921?check_suite_focus=true
> >
> > Andrii, looks like we might be missing CONFIG_NET_VRF in vmtest config-latest.*?
>
> Hi Andrii,
>
> What's the next step - should I submit a PR to libbpf on Github for adding
> CONFIG_NET_VRF?

Yes, please, for [0] and [1]:

 [0] https://github.com/libbpf/libbpf
 [1] https://github.com/kernel-patches/vmtest

>
> Eyal.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux