Skip to content

Helper function bpf_get_numa_node_id

v4.10

Definition

Copyright (c) 2015 The Libbpf Authors. All rights reserved.

Return the id of the current NUMA node. The primary use case for this helper is the selection of sockets for the local NUMA node, when the program is attached to sockets using the SO_ATTACH_REUSEPORT_EBPF option (see also socket(7)), but the helper is also available to other eBPF program types, similarly to bpf_get_smp_processor_id().

Returns

The id of current NUMA node.

static long (* const bpf_get_numa_node_id)(void) = (void *) 42;

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

This helper call can be used in the following program types:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome