On Thu, Jul 30, 2020 at 7:55 PM Toshiaki Makita <[email protected]> wrote: > > From: William Tu <[email protected]> > > Now netdev-afxdp always forwards all packets to userspace because > it is using libbpf's default XDP program, see 'xsk_load_xdp_prog'. > There are some cases when users want to keep packets in kernel instead > of sending to userspace, for example, management traffic such as SSH > should be processed in kernel. > > The patch enables loading the user-provided XDP program by > $ovs-vsctl -- set int afxdp-p0 options:xdp-obj=<path/to/xdp/obj> > > So users can implement their filtering logic or traffic steering idea > in their XDP program, and rest of the traffic passes to AF_XDP socket > handled by OVS. > > Note: kernel in AF_XDP CI test is updated to 5.5 because libbpf from 5.3 > does not have newly used APIs like "bpf_program__get_type".
Thanks for figuring the right version. > > Signed-off-by: William Tu <[email protected]> > Co-Authored-by: Toshiaki Makita <[email protected]> > Signed-off-by: Toshiaki Makita <[email protected]> > --- > .travis.yml | 2 +- > Documentation/intro/install/afxdp.rst | 59 ++++++++++ > NEWS | 2 + > lib/netdev-afxdp.c | 155 ++++++++++++++++++++++++-- > lib/netdev-linux-private.h | 3 + > 5 files changed, 213 insertions(+), 8 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index 527240a67..26b55a3e6 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -40,7 +40,7 @@ env: > - TESTSUITE=1 LIBS=-ljemalloc > - KERNEL_LIST="5.5 4.20 4.19 4.18 4.17 4.16" > - KERNEL_LIST="4.15 4.14 4.9 4.4 3.19 3.16" > - - AFXDP=1 KERNEL=5.3 > + - AFXDP=1 KERNEL=5.5 > - M32=1 OPTS="--disable-ssl" > - DPDK=1 OPTS="--enable-shared" > - DPDK_SHARED=1 We'll need to rebase this patch to latest master. Otherwise the patch looks good to me, tested OK on my system. William _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
