]> git.baikalelectronics.ru Git - kernel.git/commit
flow_dissector: switch kernel context to struct bpf_flow_dissector
authorStanislav Fomichev <sdf@google.com>
Mon, 22 Apr 2019 15:55:44 +0000 (08:55 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Apr 2019 16:36:33 +0000 (18:36 +0200)
commit9442d4ae413a5a5a490d811be105da6b684b0083
tree66e9a7497cc7c7444866bda214ea14bd6b66f1ae
parent6338db978d0bd9d6ec2f4be9a279e63b104706d9
flow_dissector: switch kernel context to struct bpf_flow_dissector

struct bpf_flow_dissector has a small subset of sk_buff fields that
flow dissector BPF program is allowed to access and an optional
pointer to real skb. Real skb is used only in bpf_skb_load_bytes
helper to read non-linear data.

The real motivation for this is to be able to call flow dissector
from eth_get_headlen context where we don't have an skb and need
to dissect raw bytes.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/skbuff.h
include/net/flow_dissector.h
include/net/sch_generic.h
net/bpf/test_run.c
net/core/filter.c
net/core/flow_dissector.c