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>
This commit is contained in:
parent
a10b91b8b8
commit
2d0e30c30f
6 changed files with 24 additions and 0 deletions
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue