]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add bpf_set_hash helper for tc progs
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 10 Jun 2017 22:50:47 +0000 (00:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2017 23:05:47 +0000 (19:05 -0400)
commit592cb5ee14b382b206b368ed0ef8c7e539c8da21
treed8fc58484a521feb4eeb19bbb332e00148efe51e
parentade3c4d57b9093caaff030aab07cfe3d925b2dea
bpf: add bpf_set_hash helper for tc progs

Allow for tc BPF programs to set a skb->hash, apart from clearing
and triggering a recalc that we have right now. It allows for BPF
to implement a custom hashing routine for skb_get_hash().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c
tools/include/uapi/linux/bpf.h