FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
sysfs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef included_linux_sysfs_h
17 #define included_linux_sysfs_h
18 
19 #include <vppinfra/error.h>
20 
21 clib_error_t *clib_sysfs_write (char *file_name, char *fmt, ...);
22 
23 clib_error_t *clib_sysfs_read (char *file_name, char *fmt, ...);
24 
25 u8 *clib_sysfs_link_to_name (char *link);
26 
28  int log2_page_size, int nr);
30  int log2_page_size, int *v);
32  int log2_page_size, int *v);
34  int log2_page_size, int *v);
36  int log2_page_size, int nr);
37 
38 uword *clib_sysfs_list_to_bitmap (char *filename);
39 
40 #endif /* included_linux_sysfs_h */
41 
42 /*
43  * fd.io coding-style-patch-verification: ON
44  *
45  * Local Variables:
46  * eval: (c-set-style "gnu")
47  * End:
48  */
clib_sysfs_write
clib_error_t * clib_sysfs_write(char *file_name, char *fmt,...)
Definition: sysfs.c:27
clib_sysfs_link_to_name
u8 * clib_sysfs_link_to_name(char *link)
Definition: sysfs.c:91
clib_sysfs_get_free_hugepages
clib_error_t * clib_sysfs_get_free_hugepages(int numa_node, int log2_page_size, int *v)
Definition: sysfs.c:221
clib_sysfs_read
clib_error_t * clib_sysfs_read(char *file_name, char *fmt,...)
Definition: sysfs.c:51
error.h
clib_sysfs_prealloc_hugepages
clib_error_t * clib_sysfs_prealloc_hugepages(int numa_node, int log2_page_size, int nr)
Definition: sysfs.c:240
uword
u64 uword
Definition: types.h:112
clib_sysfs_list_to_bitmap
uword * clib_sysfs_list_to_bitmap(char *filename)
Definition: sysfs.c:267
fmt
int cJSON_bool fmt
Definition: cJSON.h:160
clib_sysfs_get_nr_hugepages
clib_error_t * clib_sysfs_get_nr_hugepages(int numa_node, int log2_page_size, int *v)
Definition: sysfs.c:227
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
clib_sysfs_set_nr_hugepages
clib_error_t * clib_sysfs_set_nr_hugepages(int numa_node, int log2_page_size, int nr)
Definition: sysfs.c:118
clib_sysfs_get_surplus_hugepages
clib_error_t * clib_sysfs_get_surplus_hugepages(int numa_node, int log2_page_size, int *v)
Definition: sysfs.c:233