diff options
author | Florin Coras <fcoras@cisco.com> | 2018-12-02 13:36:00 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-12-03 15:49:27 +0000 |
commit | adc74d7b3da5a48cd346ce14694415e7c5c307bb (patch) | |
tree | 52168b4b95aa1c76e0814c2290beb4a4883ceced /src/vcl/vcl_bapi.c | |
parent | b4a7a7dcf81f85ca3a22c791fb57d7eddc111661 (diff) |
svm: use explicit svm fifo segment main for slaves
Change-Id: Id39d64bf1b49345a3dc31c63360569212aba6865
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_bapi.c')
-rw-r--r-- | src/vcl/vcl_bapi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c index c6e7fdf369d..cd3aaaa3d4e 100644 --- a/src/vcl/vcl_bapi.c +++ b/src/vcl/vcl_bapi.c @@ -75,7 +75,7 @@ vcl_segment_attach (u64 segment_handle, char *name, ssvm_segment_type_t type, if (type == SSVM_SEGMENT_MEMFD) a->memfd_fd = fd; - if ((rv = svm_fifo_segment_attach (a))) + if ((rv = svm_fifo_segment_attach (&vcm->segment_main, a))) { clib_warning ("svm_fifo_segment_attach ('%s') failed", name); return rv; @@ -88,14 +88,15 @@ vcl_segment_attach (u64 segment_handle, char *name, ssvm_segment_type_t type, static void vcl_segment_detach (u64 segment_handle) { + svm_fifo_segment_main_t *sm = &vcm->segment_main; svm_fifo_segment_private_t *segment; u32 segment_index; segment_index = vcl_segment_table_lookup (segment_handle); if (segment_index == (u32) ~ 0) return; - segment = svm_fifo_segment_get_segment (segment_index); - svm_fifo_segment_delete (segment); + segment = svm_fifo_segment_get_segment (sm, segment_index); + svm_fifo_segment_delete (sm, segment); vcl_segment_table_del (segment_handle); } |