diff options
author | Florin Coras <fcoras@cisco.com> | 2018-01-05 03:20:25 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-01-09 18:33:08 +0000 |
commit | e86a8edd3c14fb41ace2a12efd17bc7772bf623f (patch) | |
tree | 480219864cadd743fdb95c21379aeaf88a985e23 /src/vlibapi/api_common.h | |
parent | 4363ad6c96b5641fca1b16c5a6ec22e2364adcfd (diff) |
api: refactor vlibmemory
- separate client/server code for both memory and socket apis
- separate memory api code from generic vlib api code
- move unix_shared_memory_fifo to svm and rename to svm_fifo_t
- overall declutter
Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibapi/api_common.h')
-rw-r--r-- | src/vlibapi/api_common.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vlibapi/api_common.h b/src/vlibapi/api_common.h index 56b036d7f07..055164812de 100644 --- a/src/vlibapi/api_common.h +++ b/src/vlibapi/api_common.h @@ -26,7 +26,7 @@ #include <vppinfra/clib_error.h> #include <svm/svm_common.h> -#include <vlibmemory/unix_shared_memory_queue.h> +#include <svm/queue.h> /** API registration types */ @@ -56,7 +56,7 @@ typedef struct vl_api_registration_ int unanswered_pings; /** shared memory only: pointer to client input queue */ - unix_shared_memory_queue_t *vl_input_queue; + svm_queue_t *vl_input_queue; svm_region_t *vlib_rp; void *shmem_hdr; @@ -133,7 +133,7 @@ typedef struct /** Message header structure */ typedef struct msgbuf_ { - unix_shared_memory_queue_t *q; /**< message allocated in this shmem ring */ + svm_queue_t *q; /**< message allocated in this shmem ring */ u32 data_len; /**< message length not including header */ u32 gc_mark_timestamp; /**< message garbage collector mark TS */ u8 data[0]; /**< actual message begins here */ @@ -155,7 +155,7 @@ void vl_msg_api_set_handlers (int msg_id, char *msg_name, void vl_msg_api_clean_handlers (int msg_id); void vl_msg_api_config (vl_msg_api_msg_config_t *); void vl_msg_api_set_cleanup_handler (int msg_id, void *fp); -void vl_msg_api_queue_handler (unix_shared_memory_queue_t * q); +void vl_msg_api_queue_handler (svm_queue_t * q); void vl_msg_api_barrier_sync (void) __attribute__ ((weak)); void vl_msg_api_barrier_release (void) __attribute__ ((weak)); @@ -176,7 +176,7 @@ int vl_msg_api_pd_handler (void *mp, int rv); void vl_msg_api_set_first_available_msg_id (u16 first_avail); u16 vl_msg_api_get_msg_ids (const char *name, int n); -u32 vl_api_get_msg_index (u8 * name_and_crc); +u32 vl_msg_api_get_msg_index (u8 * name_and_crc); typedef clib_error_t *(vl_msg_api_init_function_t) (u32 client_index); @@ -297,7 +297,7 @@ typedef struct u64 api_pvt_heap_size; /** Peer input queue pointer */ - unix_shared_memory_queue_t *vl_input_queue; + svm_queue_t *vl_input_queue; /** * All VLIB-side message handlers use my_client_index to identify |