summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-17 13:32:25 +0200
committerDave Barach <openvpp@barachs.net>2020-10-17 21:01:42 +0000
commitdae1c7ed38e9f7a86e66f3674de62778cc981331 (patch)
treec84fd7a94e1249233d5533e15d54bef52582ee4c /src/vppinfra/linux
parentada5bbf3303e8fb6f53ff39e6074ae820457224d (diff)
vppinfra: explicitly export symbols
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/linux')
-rw-r--r--src/vppinfra/linux/mem.c22
-rw-r--r--src/vppinfra/linux/sysfs.c6
2 files changed, 14 insertions, 14 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index f31b456308d..b46988f2172 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -62,7 +62,7 @@
#define MAP_FIXED_NOREPLACE 0x100000
#endif
-uword
+__clib_export uword
clib_mem_get_default_hugepage_size (void)
{
unformat_input_t input;
@@ -163,7 +163,7 @@ done:
munmap (va, page_size);
}
-u64
+__clib_export u64
clib_mem_get_fd_page_size (int fd)
{
struct stat st = { 0 };
@@ -172,14 +172,14 @@ clib_mem_get_fd_page_size (int fd)
return st.st_blksize;
}
-clib_mem_page_sz_t
+__clib_export clib_mem_page_sz_t
clib_mem_get_fd_log2_page_size (int fd)
{
uword page_size = clib_mem_get_fd_page_size (fd);
return page_size ? min_log2 (page_size) : CLIB_MEM_PAGE_SZ_UNKNOWN;
}
-void
+__clib_export void
clib_mem_vm_randomize_va (uword * requested_va,
clib_mem_page_sz_t log2_page_size)
{
@@ -246,7 +246,7 @@ legacy_memfd_create (u8 * name)
return fd;
}
-int
+__clib_export int
clib_mem_vm_create_fd (clib_mem_page_sz_t log2_page_size, char *fmt, ...)
{
clib_mem_main_t *mm = &clib_mem_main;
@@ -370,7 +370,7 @@ clib_mem_vm_reserve (uword start, uword size, clib_mem_page_sz_t log2_page_sz)
return (uword) base + sys_page_sz;
}
-clib_mem_vm_map_hdr_t *
+__clib_export clib_mem_vm_map_hdr_t *
clib_mem_vm_get_next_map_hdr (clib_mem_vm_map_hdr_t * hdr)
{
clib_mem_main_t *mm = &clib_mem_main;
@@ -488,7 +488,7 @@ clib_mem_vm_map_internal (void *base, clib_mem_page_sz_t log2_page_sz,
return base;
}
-int
+__clib_export int
clib_mem_vm_unmap (void *base)
{
clib_mem_main_t *mm = &clib_mem_main;
@@ -526,7 +526,7 @@ clib_mem_vm_unmap (void *base)
return 0;
}
-void
+__clib_export void
clib_mem_get_page_stats (void *start, clib_mem_page_sz_t log2_page_size,
uword n_pages, clib_mem_page_stats_t * stats)
{
@@ -566,7 +566,7 @@ clib_mem_get_page_stats (void *start, clib_mem_page_sz_t log2_page_size,
}
-u64 *
+__clib_export u64 *
clib_mem_vm_get_paddr (void *mem, clib_mem_page_sz_t log2_page_size,
int n_pages)
{
@@ -608,7 +608,7 @@ done:
return r;
}
-int
+__clib_export int
clib_mem_set_numa_affinity (u8 numa_node, int force)
{
clib_mem_main_t *mm = &clib_mem_main;
@@ -643,7 +643,7 @@ error:
return CLIB_MEM_ERROR;
}
-int
+__clib_export int
clib_mem_set_default_numa_affinity ()
{
clib_mem_main_t *mm = &clib_mem_main;
diff --git a/src/vppinfra/linux/sysfs.c b/src/vppinfra/linux/sysfs.c
index c45897fc83b..1157e4fe655 100644
--- a/src/vppinfra/linux/sysfs.c
+++ b/src/vppinfra/linux/sysfs.c
@@ -22,7 +22,7 @@
#include <fcntl.h>
#include <dirent.h>
-clib_error_t *
+__clib_export clib_error_t *
clib_sysfs_write (char *file_name, char *fmt, ...)
{
u8 *s;
@@ -46,7 +46,7 @@ clib_sysfs_write (char *file_name, char *fmt, ...)
return error;
}
-clib_error_t *
+__clib_export clib_error_t *
clib_sysfs_read (char *file_name, char *fmt, ...)
{
unformat_input_t input;
@@ -86,7 +86,7 @@ clib_sysfs_read (char *file_name, char *fmt, ...)
return 0;
}
-u8 *
+__clib_export u8 *
clib_sysfs_link_to_name (char *link)
{
char *p, buffer[64];