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/vnet/tcp/builtin_http_server.c | |
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/vnet/tcp/builtin_http_server.c')
-rw-r--r-- | src/vnet/tcp/builtin_http_server.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vnet/tcp/builtin_http_server.c b/src/vnet/tcp/builtin_http_server.c index 6e1cd8e770e..356cfd86b91 100644 --- a/src/vnet/tcp/builtin_http_server.c +++ b/src/vnet/tcp/builtin_http_server.c @@ -32,7 +32,7 @@ typedef struct typedef struct { u8 **rx_buf; - unix_shared_memory_queue_t **vpp_queue; + svm_queue_t **vpp_queue; u64 byte_index; uword *handler_by_get_request; @@ -40,7 +40,7 @@ typedef struct u32 *free_http_cli_process_node_indices; /* Sever's event queue */ - unix_shared_memory_queue_t *vl_input_queue; + svm_queue_t *vl_input_queue; /* API client handle */ u32 my_client_index; @@ -175,9 +175,8 @@ send_data (stream_session_t * s, u8 * data) evt.fifo = s->server_tx_fifo; evt.event_type = FIFO_EVENT_APP_TX; - unix_shared_memory_queue_add (hsm->vpp_queue[s->thread_index], - (u8 *) & evt, - 0 /* do wait for mutex */ ); + svm_queue_add (hsm->vpp_queue[s->thread_index], + (u8 *) & evt, 0 /* do wait for mutex */ ); } delay = 10e-3; } @@ -377,7 +376,7 @@ http_server_rx_callback (stream_session_t * s) evt.rpc_args.fp = alloc_http_process_callback; evt.rpc_args.arg = args; evt.event_type = FIFO_EVENT_RPC; - unix_shared_memory_queue_add + svm_queue_add (session_manager_get_vpp_event_queue (0 /* main thread */ ), (u8 *) & evt, 0 /* do wait for mutex */ ); } |