summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-05 03:20:25 -0800
committerDave Barach <openvpp@barachs.net>2018-01-09 18:33:08 +0000
commite86a8edd3c14fb41ace2a12efd17bc7772bf623f (patch)
tree480219864cadd743fdb95c21379aeaf88a985e23 /src/vnet/tcp/builtin_server.c
parent4363ad6c96b5641fca1b16c5a6ec22e2364adcfd (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_server.c')
-rw-r--r--src/vnet/tcp/builtin_server.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c
index 26cbfe77727..eafef8227e2 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -23,8 +23,8 @@ typedef struct
/*
* Server app parameters
*/
- unix_shared_memory_queue_t **vpp_queue;
- unix_shared_memory_queue_t *vl_input_queue; /**< Sever's event queue */
+ svm_queue_t **vpp_queue;
+ svm_queue_t *vl_input_queue; /**< Sever's event queue */
u32 app_index; /**< Server app index */
u32 my_client_index; /**< API client handle */
@@ -186,14 +186,14 @@ builtin_server_rx_callback (stream_session_t * s)
/* Program self-tap to retry */
if (svm_fifo_set_event (rx_fifo))
{
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
evt.fifo = rx_fifo;
evt.event_type = FIFO_EVENT_BUILTIN_RX;
q = bsm->vpp_queue[thread_index];
if (PREDICT_FALSE (q->cursize == q->maxsize))
clib_warning ("out of event queue space");
- else if (unix_shared_memory_queue_add (q, (u8 *) & evt, 0))
+ else if (svm_queue_add (q, (u8 *) & evt, 0))
clib_warning ("failed to enqueue self-tap");
if (bsm->rx_retries[thread_index][s->session_index] == 500000)
@@ -231,9 +231,8 @@ builtin_server_rx_callback (stream_session_t * s)
evt.fifo = tx_fifo;
evt.event_type = FIFO_EVENT_APP_TX;
- if (unix_shared_memory_queue_add (bsm->vpp_queue[s->thread_index],
- (u8 *) & evt,
- 0 /* do wait for mutex */ ))
+ if (svm_queue_add (bsm->vpp_queue[s->thread_index],
+ (u8 *) & evt, 0 /* do wait for mutex */ ))
clib_warning ("failed to enqueue tx evt");
}