lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZ3vDvLDQ+Wsj1z2=-exZO-t510JdWXA-1bao-shO4PJg@mail.gmail.com>
Date:   Wed, 27 Apr 2022 12:41:34 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Eyal Birger <eyal.birger@...il.com>
Cc:     Shuah Khan <shuah@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        john fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, posk@...gle.com,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf] selftests/bpf: test setting tunnel key from lwt xmit

On Sun, Apr 24, 2022 at 10:23 AM Eyal Birger <eyal.birger@...il.com> wrote:
>
> On Sun, Apr 24, 2022 at 7:53 PM Eyal Birger <eyal.birger@...il.com> wrote:
> >
> > This commit adds test_egress_md() tests which perform a similar flow as
> > test_egress() only that they use gre devices in collect_md mode and set
> > the tunnel key from lwt bpf xmit.
> >
> > VRF scenarios are not checked since it is currently not possible to set
> > the underlying device or vrf from bpf_set_tunnel_key().
> >
> > This introduces minor changes to the existing setup 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 IPv*_5 instead of IPv*_1 since
> >   GRE traffic is sent via veth5 so its address is selected when using
> >   bpf_set_tunnel_key()
> >
> > Signed-off-by: Eyal Birger <eyal.birger@...il.com>
> > ---
> >  .../selftests/bpf/progs/test_lwt_ip_encap.c   | 51 ++++++++++-
> >  .../selftests/bpf/test_lwt_ip_encap.sh        | 85 ++++++++++++++++++-
> >  2 files changed, 128 insertions(+), 8 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c b/tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c
> > index d6cb986e7533..39c6bd5402ae 100644
> > --- a/tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c
> > +++ b/tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c
>
> Thinking about this some more, I'm not sure if these tests fit better here
> or in test_tunnel.sh.
>
> If the latter is preferred, please drop this patch and I'll submit one for
> test_tunnel.sh.

general preference is to put test into test_progs as those are
regularly and extensively exercised, while test_tunnel.sh is not

>
> Eyal.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ