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>
This commit is contained in:

committed by
Beno�t Ganne

parent
2921e02341
commit
4b6614030f
@ -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)))
|
||||
|
Reference in New Issue
Block a user