[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ea71bcb29f67_a372ad3a5ecc5b864@john-XPS-13-9370.notmuch>
Date: Mon, 27 Apr 2020 10:52:11 -0700
From: John Fastabend <john.fastabend@...il.com>
To: John Fastabend <john.fastabend@...il.com>,
David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org,
prashantbhole.linux@...il.com, jasowang@...hat.com,
brouer@...hat.com, toke@...hat.com, toshiaki.makita1@...il.com,
daniel@...earbox.net, john.fastabend@...il.com, ast@...nel.org,
kafai@...com, songliubraving@...com, yhs@...com, andriin@...com,
dsahern@...il.com, David Ahern <dahern@...italocean.com>
Subject: RE: [PATCH v3 bpf-next 13/15] selftest: Add test for xdp_egress
John Fastabend wrote:
> David Ahern wrote:
> > From: David Ahern <dahern@...italocean.com>
> >
> > Add selftest for xdp_egress. Add xdp_drop program to veth connecting
> > a namespace to drop packets and break connectivity.
> >
> > Signed-off-by: David Ahern <dahern@...italocean.com>
> > ---
>
> [...]
>
> > +################################################################################
> > +# main
> > +
> > +if [ $(id -u) -ne 0 ]; then
> > + echo "selftests: $TESTNAME [SKIP] Need root privileges"
> > + exit $ksft_skip
> > +fi
> > +
> > +if ! ip link set dev lo xdp off > /dev/null 2>&1; then
> > + echo "selftests: $TESTNAME [SKIP] Could not run test without the ip xdp support"
> > + exit $ksft_skip
> > +fi
> > +
> > +if [ -z "$BPF_FS" ]; then
> > + echo "selftests: $TESTNAME [SKIP] Could not run test without bpffs mounted"
> > + exit $ksft_skip
> > +fi
> > +
> > +if ! bpftool version > /dev/null 2>&1; then
> > + echo "selftests: $TESTNAME [SKIP] Could not run test without bpftool"
> > + exit $ksft_skip
> > +fi
>
> This is consistent with test_xdp_veth.sh so it is probably ok for this series
> but I think it would be nice to go back and make these fail on errors. Or at
> least fail on bpffs mount. Seems other tests fail on bpffs mount failures so
> would be OK I think.
>
> Otherwise LGTM.
Also would be nice to have a test case for the xdp redirect into tx case. I think
this is only going to test the skb path?
Thanks,
John
Powered by blists - more mailing lists