aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2016-10-21 12:46:33 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-22 17:05:52 -0400
commit2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e (patch)
treea58da7082e4dcfea4b7782e72aec65920cfd5905 /net/core/filter.c
parentMerge branch 'udpmem' (diff)
downloadlinux-dev-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.tar.xz
linux-dev-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.zip
bpf: add helper for retrieving current numa node id
Use case is mainly for soreuseport to select sockets for the local numa node, but since generic, lets also add this for other networking and tracing program types. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 00351cdf7d0c..cd9e2ba66b0e 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2492,6 +2492,8 @@ sk_filter_func_proto(enum bpf_func_id func_id)
return &bpf_get_prandom_u32_proto;
case BPF_FUNC_get_smp_processor_id:
return &bpf_get_raw_smp_processor_id_proto;
+ case BPF_FUNC_get_numa_node_id:
+ return &bpf_get_numa_node_id_proto;
case BPF_FUNC_tail_call:
return &bpf_tail_call_proto;
case BPF_FUNC_ktime_get_ns: