diff options
author | Florin Coras <fcoras@cisco.com> | 2018-01-14 12:25:50 -0800 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-01-15 16:39:12 +0000 |
commit | 4d9b9d8e74f12a26404ccdd8baf46c61b44584db (patch) | |
tree | 2c9e0314664fca52722431f14928e1b3fd0017fb /src/vlibmemory/socket_api.c | |
parent | 149a1433b0e6301a34989f5e8c7ebed3fa5bf74e (diff) |
svm: refactor memfd and remove ssvm_eth
Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibmemory/socket_api.c')
-rw-r--r-- | src/vlibmemory/socket_api.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c index 3d505359d3b..9c099b9b0b7 100644 --- a/src/vlibmemory/socket_api.c +++ b/src/vlibmemory/socket_api.c @@ -25,7 +25,7 @@ #include <sys/stat.h> #include <vppinfra/byte_order.h> -#include <svm/memfd.h> +#include <svm/ssvm.h> #include <vlibmemory/api.h> #include <vlibmemory/vl_memory_msg_enum.h> @@ -528,7 +528,7 @@ void vl_api_sock_init_shm_t_handler (vl_api_sock_init_shm_t * mp) { vl_api_sock_init_shm_reply_t *rmp; - memfd_private_t _memfd_private, *memfd = &_memfd_private; + ssvm_private_t _memfd_private, *memfd = &_memfd_private; svm_map_region_args_t _args, *a = &_args; vl_api_registration_t *regp; api_main_t *am = &api_main; @@ -554,12 +554,12 @@ vl_api_sock_init_shm_t_handler (vl_api_sock_init_shm_t * mp) * shmem data structures will be initialized */ memset (memfd, 0, sizeof (*memfd)); - memfd->memfd_size = mp->requested_size; + memfd->ssvm_size = mp->requested_size; memfd->requested_va = 0ULL; memfd->i_am_master = 1; memfd->name = format (0, "%s%c", regp->name, 0); - if ((rv = memfd_master_init (memfd, mp->client_index))) + if ((rv = ssvm_master_init_memfd (memfd, mp->client_index))) goto reply; /* Remember to close this fd when the socket connection goes away */ @@ -569,8 +569,8 @@ vl_api_sock_init_shm_t_handler (vl_api_sock_init_shm_t * mp) * Create a plausible svm_region in the memfd backed segment */ memset (a, 0, sizeof (*a)); - a->baseva = memfd->sh->memfd_va + MMAP_PAGESIZE; - a->size = memfd->memfd_size - MMAP_PAGESIZE; + a->baseva = memfd->sh->ssvm_va + MMAP_PAGESIZE; + a->size = memfd->ssvm_size - MMAP_PAGESIZE; /* $$$$ might want a different config parameter */ a->pvt_heap_size = am->api_pvt_heap_size; a->flags = SVM_FLAGS_MHEAP; @@ -622,7 +622,7 @@ vl_api_memfd_segment_create_t_handler (vl_api_memfd_segment_create_t * mp) { vl_api_memfd_segment_create_reply_t *rmp; clib_file_t *cf; - memfd_private_t _memfd_private, *memfd = &_memfd_private; + ssvm_private_t _memfd_private, *memfd = &_memfd_private; vl_api_registration_t *regp; int rv; @@ -634,13 +634,13 @@ vl_api_memfd_segment_create_t_handler (vl_api_memfd_segment_create_t * mp) } memset (memfd, 0, sizeof (*memfd)); - memfd->memfd_size = mp->requested_size; + memfd->ssvm_size = mp->requested_size; memfd->requested_va = 0ULL; memfd->i_am_master = 1; memfd->name = format (0, "%s%c", regp->name, 0); /* Set up a memfd segment of the requested size */ - if ((rv = memfd_master_init (memfd, mp->client_index))) + if ((rv = ssvm_master_init_memfd (memfd, mp->client_index))) goto reply; /* Remember to close this fd when the socket connection goes away */ |