X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fssvm.c;h=59a5d228957fd6dea257ad6101370eb8e7d9f141;hb=c5df8c71c;hp=7fa9b2587297fb3688d2a65a80feccde60f146a7;hpb=a5ab5034f4b50fc5a19ccf8910c91613e6a52f5a;p=vpp.git diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c index 7fa9b258729..59a5d228957 100644 --- a/src/svm/ssvm.c +++ b/src/svm/ssvm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Cisco and/or its affiliates. + * Copyright (c) 2015-2019 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -80,7 +80,7 @@ ssvm_master_init_shm (ssvm_private_t * ssvm) return SSVM_API_ERROR_SET_SIZE; } - page_size = clib_mem_vm_get_page_size (ssvm_fd); + page_size = clib_mem_get_fd_page_size (ssvm_fd); if (ssvm->requested_va) { requested_va = ssvm->requested_va; @@ -177,7 +177,7 @@ map_it: return SSVM_API_ERROR_SLAVE_TIMEOUT; re_map_it: - ssvm->requested_va = (u64) sh->ssvm_va; + ssvm->requested_va = sh->ssvm_va; ssvm->ssvm_size = sh->ssvm_size; munmap (sh, MMAP_PAGESIZE); @@ -290,7 +290,7 @@ ssvm_slave_init_memfd (ssvm_private_t * memfd) memfd->i_am_master = 0; - page_size = clib_mem_vm_get_page_size (memfd->fd); + page_size = clib_mem_get_fd_page_size (memfd->fd); if (!page_size) { clib_unix_warning ("page size unknown"); @@ -381,7 +381,7 @@ ssvm_master_init_private (ssvm_private_t * ssvm) sh = clib_mem_alloc_aligned (sizeof (*sh), CLIB_CACHE_LINE_BYTES); ssvm->sh = sh; - memset (sh, 0, sizeof (*sh)); + clib_memset (sh, 0, sizeof (*sh)); sh->heap = heap; sh->type = SSVM_SEGMENT_PRIVATE;