aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/unix.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2024-02-12 19:44:58 +0000
committerMohammed HAWARI <momohawari@gmail.com>2024-03-18 16:01:35 +0000
commit3eb6cbec50a5cbe4c3465d60ba6aea7bf2845cd1 (patch)
tree0f45044087400911e213048c1967ac96a9f8ea29 /src/vppinfra/unix.h
parent8799bf6ca6b78321049bbc397256dd8b3884d829 (diff)
vppinfra: os agnostic api for getting CPU information
Avoid direct sysfs reads when possible... Type: improvement Change-Id: I2b84cd18f3da47925d068951f24b79b5b6e20bb1 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/unix.h')
-rw-r--r--src/vppinfra/unix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vppinfra/unix.h b/src/vppinfra/unix.h
index b43043a567b..651f9bb99e0 100644
--- a/src/vppinfra/unix.h
+++ b/src/vppinfra/unix.h
@@ -59,6 +59,15 @@ clib_bitmap_t *os_get_online_cpu_core_bitmap ();
/* Retrieve bitmap of online cpu nodes (sockets) */
clib_bitmap_t *os_get_online_cpu_node_bitmap ();
+/* Retrieve bitmap of cpus with memory */
+clib_bitmap_t *os_get_cpu_with_memory_bitmap ();
+
+/* Retrieve bitmap of cpus on specific node */
+clib_bitmap_t *os_get_cpu_on_node_bitmap (int node);
+
+/* Retrieve physical core id of specific cpu, -1 if not available */
+int os_get_cpu_phys_core_id (int cpu);
+
#endif /* included_clib_unix_h */
/*