tcp: make syn-rcvd timeout configurable
[vpp.git] / src / vppinfra / linux / sysfs.h
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 #include <vppinfra/bitmap.h>
21
22 clib_error_t *clib_sysfs_write (char *file_name, char *fmt, ...);
23
24 clib_error_t *clib_sysfs_read (char *file_name, char *fmt, ...);
25
26 clib_error_t *clib_sysfs_set_nr_hugepages (int numa_node,
27                                            int log2_page_size, int nr);
28 clib_error_t *clib_sysfs_get_nr_hugepages (int numa_node,
29                                            int log2_page_size, int *v);
30 clib_error_t *clib_sysfs_get_free_hugepages (int numa_node,
31                                              int log2_page_size, int *v);
32 clib_error_t *clib_sysfs_get_surplus_hugepages (int numa_node,
33                                                 int log2_page_size, int *v);
34 clib_error_t *clib_sysfs_prealloc_hugepages (int numa_node,
35                                              int log2_page_size, int nr);
36
37 uword *clib_sysfs_read_bitmap (char *fmt, ...);
38
39 #endif /* included_linux_sysfs_h */
40
41 /*
42  * fd.io coding-style-patch-verification: ON
43  *
44  * Local Variables:
45  * eval: (c-set-style "gnu")
46  * End:
47  */