diff options
author | Damjan Marion <damarion@cisco.com> | 2024-02-29 16:14:27 +0100 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2024-03-04 08:53:08 +0000 |
commit | 4b6614030f384f7c8d847360cacf5c7f7560c6be (patch) | |
tree | b560c46a2cda2bf6b16e147a52a70ed83c3ce1ce /src/vlib/buffer.c | |
parent | 2921e0234185f615d7530343b340573e2cb5caec (diff) |
vppinfra: add os_get_online_cpu_core() and os_get_online_cpu_node()
Type: improvement
Change-Id: I6f99f09c7724ce656a4f41a1d5f9c88d74c00faf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r-- | src/vlib/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c index b5200ba5029..e1dcf7ed827 100644 --- a/src/vlib/buffer.c +++ b/src/vlib/buffer.c @@ -44,6 +44,8 @@ */ #include <vppinfra/linux/sysfs.h> +#include <vppinfra/bitmap.h> +#include <vppinfra/unix.h> #include <vlib/vlib.h> #include <vlib/unix/unix.h> #include <vlib/stats/stats.h> @@ -840,9 +842,7 @@ vlib_buffer_main_init (struct vlib_main_t * vm) clib_spinlock_init (&bm->buffer_known_hash_lockp); - if ((err = clib_sysfs_read ("/sys/devices/system/node/online", "%U", - unformat_bitmap_list, &bmp))) - clib_error_free (err); + bmp = os_get_online_cpu_node_bitmap (); if ((err = clib_sysfs_read ("/sys/devices/system/node/has_memory", "%U", unformat_bitmap_list, &bmp_has_memory))) |