diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-10-21 12:46:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-22 17:05:52 -0400 |
commit | 2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e (patch) | |
tree | a58da7082e4dcfea4b7782e72aec65920cfd5905 /kernel/trace | |
parent | a10b91b8b81c29b87ff5a6d58c1402898337b956 (diff) | |
download | linux-stable-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.tar.gz linux-stable-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.tar.bz2 linux-stable-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 'kernel/trace')
-rw-r--r-- | kernel/trace/bpf_trace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 5dcb99281259..fa77311dadb2 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -422,6 +422,8 @@ static const struct bpf_func_proto *tracing_func_proto(enum bpf_func_id func_id) return bpf_get_trace_printk_proto(); case BPF_FUNC_get_smp_processor_id: return &bpf_get_smp_processor_id_proto; + case BPF_FUNC_get_numa_node_id: + return &bpf_get_numa_node_id_proto; case BPF_FUNC_perf_event_read: return &bpf_perf_event_read_proto; case BPF_FUNC_probe_write_user: |