Skip to content

Helper function bpf_get_smp_processor_id

v4.1

Definition

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

Get the SMP (symmetric multiprocessing) processor id. Note that all programs run with migration disabled, which means that the SMP processor id is stable during all the execution of the program.

Returns

The SMP id of the processor running the program.

static __u32 (* const bpf_get_smp_processor_id)(void) = (void *) 8;

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