Skip to content

Helper function bpf_get_local_storage

v4.19

Definition

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

Get the pointer to the local storage area. The type and the size of the local storage is defined by the map argument. The flags meaning is specific for each map type, and has to be 0 for cgroup local storage.

Depending on the BPF program type, a local storage area can be shared between multiple instances of the BPF program, running simultaneously.

A user should care about the synchronization by himself. For example, by using the BPF_ATOMIC instructions to alter the shared data.

Returns

A pointer to the local storage area.

static void *(* const bpf_get_local_storage)(void *map, __u64 flags) = (void *) 81;

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