CNDP  22.08.0
cne_system.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2019-2022 Intel Corporation
3  */
4 
5 #ifndef _CNE_SYSTEM_H_
6 #define _CNE_SYSTEM_H_
7 
13 #include <sys/syscall.h>
14 #include <stdint.h> // for uint16_t, uint64_t
15 
16 #include <cne_common.h> // for CNDP_API
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define CNE_LCORE_INVALID 0xFFFF
23 
32 CNDP_API unsigned cne_core_id(unsigned lcore_id);
33 
40 CNDP_API unsigned int cne_max_lcores(void);
41 
48 CNDP_API int cne_max_numa_nodes(void);
49 
56 CNDP_API int cne_lcore_id(void);
57 
66 CNDP_API int cne_lcore_id_by_thread(int thread_idx);
67 
77 CNDP_API unsigned int cne_socket_id(unsigned lcore_id);
78 
85 CNDP_API unsigned int cne_socket_id_self(void);
86 
95 CNDP_API uint16_t cne_device_socket_id(char *netdev);
96 
107 CNDP_API unsigned int cne_socket_count(void);
108 
115 CNDP_API uint64_t cne_get_timer_hz(void);
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* _CNE_SYSTEM_H_ */
CNDP_API int cne_lcore_id(void)
CNDP_API unsigned int cne_max_lcores(void)
CNDP_API unsigned int cne_socket_id_self(void)
CNDP_API int cne_lcore_id_by_thread(int thread_idx)
CNDP_API int cne_max_numa_nodes(void)
CNDP_API uint16_t cne_device_socket_id(char *netdev)
CNDP_API unsigned int cne_socket_count(void)
CNDP_API unsigned cne_core_id(unsigned lcore_id)
CNDP_API uint64_t cne_get_timer_hz(void)
CNDP_API unsigned int cne_socket_id(unsigned lcore_id)