linux/tools
Daniel Borkmann b1d9fc41aa bpf: add napi_id read access to __sk_buff
Add napi_id access to __sk_buff for socket filter program types, tc
program types and other bpf_convert_ctx_access() users. Having access
to skb->napi_id is useful for per RX queue listener siloing, f.e.
in combination with SO_ATTACH_REUSEPORT_EBPF and when busy polling is
used, meaning SO_REUSEPORT enabled listeners can then select the
corresponding socket at SYN time already [1]. The skb is marked via
skb_mark_napi_id() early in the receive path (e.g., napi_gro_receive()).

Currently, sockets can only use SO_INCOMING_NAPI_ID from 6d4339028b
("net: Introduce SO_INCOMING_NAPI_ID") as a socket option to look up
the NAPI ID associated with the queue for steering, which requires a
prior sk_mark_napi_id() after the socket was looked up.

Semantics for the __sk_buff napi_id access are similar, meaning if
skb->napi_id is < MIN_NAPI_ID (e.g. outgoing packets using sender_cpu),
then an invalid napi_id of 0 is returned to the program, otherwise a
valid non-zero napi_id.

  [1] http://netdevconf.org/2.1/slides/apr6/dumazet-BUSY-POLLING-Netdev-2.1.pdf

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-21 13:53:27 -04:00
..
accounting
arch Merge branch 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 14:37:08 -08:00
build perf build: Add special fixdep cleaning rule 2017-02-17 16:04:38 -03:00
cgroup
firewire
gpio
hv tools: hv: Add clean up function for Ubuntu config 2017-03-06 17:10:40 -08:00
iio
include bpf: add napi_id read access to __sk_buff 2017-04-21 13:53:27 -04:00
kvm/kvm_stat
laptop
leds
lguest scripts/spelling.txt: add "overide" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
lib tools/lib/bpf: expose bpf_program__set_type() 2017-04-01 12:45:57 -07:00
net tools: bpf_jit_disasm: Add option to dump JIT image to a file. 2017-04-13 13:04:03 -04:00
nfsd
objtool objtool: Fix another GCC jump table detection issue 2017-03-07 08:42:55 +01:00
pcmcia
perf perf/urgent annotate fix for s390: 2017-04-11 21:41:39 +02:00
power cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores 2017-04-13 14:51:10 +02:00
scripts
spi
testing bpf: add napi_id read access to __sk_buff 2017-04-21 13:53:27 -04:00
thermal/tmon
time
usb
virtio
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile