Skip to content

Map type BPF_MAP_TYPE_REUSEPORT_SOCKARRAY

v4.19

This is a special purpose map type which holds references to sockets with the SO_REUSEPORT option set.

Usage

This map is used together with the bpf_sk_select_reuseport helper function to select a socket from a reuse port socket group to handle traffic.

Attributes

The value_size can be 4 or 8 and the key_size must always be 4.

Syscall commands

The following syscall commands work with this map type:

Helper functions

Flags

BPF_F_NUMA_NODE

v4.14

When set, the numa_node attribute is respected during map creation.

BPF_F_RDONLY

v4.15

Setting this flag will make it so the map can only be read via the syscall interface, but not written to.

For details please check the generic description.

BPF_F_WRONLY

v4.15

Setting this flag will make it so the map can only be written to via the syscall interface, but not read from.

BPF_F_RDONLY_PROG

v5.2

Setting this flag will make it so the map can only be read via helper functions, but not written to.

For details please check the generic description.

BPF_F_WRONLY_PROG

v5.2

Setting this flag will make it so the map can only be written to via helper functions, but not read from.

For details please check the generic description.