summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-08-28 16:12:21 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-28 20:13:22 +0200
commit08848246639218ae58acdf3321bc7b693062f31c (patch)
tree6cb85b33cdf900fbafc5894ecd16718b49c2b16d /net
parentbpf: sockmap indicate sock events to listeners (diff)
downloadlinux-08848246639218ae58acdf3321bc7b693062f31c.tar.xz
linux-08848246639218ae58acdf3321bc7b693062f31c.zip
bpf: sockmap requires STREAM_PARSER add Kconfig entry
SOCKMAP uses strparser code (compiled with Kconfig option CONFIG_STREAM_PARSER) to run the parser BPF program. Without this config option set sockmap wont be compiled. However, at the moment the only way to pull in the strparser code is to enable KCM. To resolve this create a BPF specific config option to pull only the strparser piece in that sockmap needs. This also allows folks who want to use BPF/syscall/maps but don't need sockmap to easily opt out. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 7d57ef34b79c..17ca213e1f85 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -301,6 +301,18 @@ config BPF_JIT
/proc/sys/net/core/bpf_jit_harden (optional)
/proc/sys/net/core/bpf_jit_kallsyms (optional)
+config BPF_STREAM_PARSER
+ bool "enable BPF STREAM_PARSER"
+ depends on BPF_SYSCALL
+ select STREAM_PARSER
+ ---help---
+ Enabling this allows a stream parser to be used with
+ BPF_MAP_TYPE_SOCKMAP.
+
+ BPF_MAP_TYPE_SOCKMAP provides a map type to use with network sockets.
+ It can be used to enforce socket policy, implement socket redirects,
+ etc.
+
config NET_FLOW_LIMIT
bool
depends on RPS