summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorDaniel Borkmann2016-10-21 12:46:33 +0200
committerDavid S. Miller2016-10-22 23:05:52 +0200
commit2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e (patch)
treea58da7082e4dcfea4b7782e72aec65920cfd5905 /include/uapi/linux/bpf.h
parentMerge branch 'udpmem' (diff)
downloadkernel-qcow2-linux-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.tar.gz
kernel-qcow2-linux-2d0e30c30f84d08dc16f0f2af41f1b8a85f0755e.tar.xz
kernel-qcow2-linux-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 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index f09c70b97eca..374ef582ae18 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -426,6 +426,12 @@ enum bpf_func_id {
*/
BPF_FUNC_set_hash_invalid,
+ /**
+ * bpf_get_numa_node_id()
+ * Returns the id of the current NUMA node.
+ */
+ BPF_FUNC_get_numa_node_id,
+
__BPF_FUNC_MAX_ID,
};