]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: support setting the RX queue index
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 9 May 2018 02:37:07 +0000 (19:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 9 May 2018 16:04:37 +0000 (18:04 +0200)
commite632adefabe22dcd889d25028caf7d4ae0cc2996
treeaea09cd89f6cf39af298dc83b9bf75dc8f3735b0
parent10bd6e59bcb346c3be25467f97fa390e9d23f134
nfp: bpf: support setting the RX queue index

BPF has access to all internal FW datapath structures.  Including
the structure containing RX queue selection.  With little coordination
with the datapath we can let the offloaded BPF select the RX queue.
We just need a way to tell the datapath that queue selection has already
been done and it shouldn't overwrite it.  Define a bit to tell datapath
BPF already selected a queue (QSEL_SET), if the selected queue is not
enabled (>= number of enabled queues) datapath will perform normal RSS.

BPF queue selection on the NIC can be used to replace standard
datapath RSS with fully programmable BPF/XDP RSS.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/fw.h
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/bpf/verifier.c
drivers/net/ethernet/netronome/nfp/nfp_asm.h