aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.h
diff options
context:
space:
mode:
authorhsandid <halsandi@cisco.com>2024-03-25 17:51:31 +0100
committerDamjan Marion <dmarion@0xa5.net>2024-03-29 16:29:44 +0000
commit71c32a898941e32b5d4f865b50fbe775560c582d (patch)
treeebddae6023dcdb8912fde7a32febfc19ee294f98 /src/vlib/threads.h
parent3e147f08efc82c1c9d131bd03ee2efd493775570 (diff)
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 <halsandi@cisco.com>
Diffstat (limited to 'src/vlib/threads.h')
-rw-r--r--src/vlib/threads.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index ac0c1d5d266..3072d0e67dd 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -255,6 +255,8 @@ typedef struct
int use_pthreads;
+ int use_main_core_auto;
+
/* Number of vlib_main / vnet_main clones */
u32 n_vlib_mains;
@@ -282,6 +284,9 @@ typedef struct
/* Bitmap of available CPU sockets (NUMA nodes) */
uword *cpu_socket_bitmap;
+ /* Bitmap of CPU affinity for VPP process */
+ uword *cpu_affinity_bitmap;
+
/* Worker handoff queues */
vlib_frame_queue_main_t *frame_queue_mains;