From 71c32a898941e32b5d4f865b50fbe775560c582d Mon Sep 17 00:00:00 2001 From: hsandid Date: Mon, 25 Mar 2024 17:51:31 +0100 Subject: vlib: improve automatic core pinning Type: feature Auto core pinning now fetches vpp cpu affinity list using pthread api. This enables us to do core-pinning in environments where the host cpu list does not necessarily align with cpus available to vpp Change-Id: Ife8c2a2351c08c5c6c4fdf7c729eeff2697bc39a Signed-off-by: hsandid --- src/vppinfra/unix.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vppinfra/unix.h') diff --git a/src/vppinfra/unix.h b/src/vppinfra/unix.h index 651f9bb99e0..3ad57b05e72 100644 --- a/src/vppinfra/unix.h +++ b/src/vppinfra/unix.h @@ -56,6 +56,9 @@ clib_error_t *unix_proc_file_contents (char *file, u8 ** result); /* Retrieve bitmap of online cpu cures */ clib_bitmap_t *os_get_online_cpu_core_bitmap (); +/* Retrieve bitmap of cpus vpp has affinity to */ +clib_bitmap_t *os_get_cpu_affinity_bitmap (int pid); + /* Retrieve bitmap of online cpu nodes (sockets) */ clib_bitmap_t *os_get_online_cpu_node_bitmap (); -- cgit 1.2.3-korg