diff options
author | Florin Coras <fcoras@cisco.com> | 2019-02-03 15:26:14 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-02-04 22:00:54 +0000 |
commit | 288eaab5964b9211350acad8d742fae4789577fe (patch) | |
tree | bdc12155958c6fedf4e976791529fc8a6590d70e /src/vnet/session-apps/echo_server.c | |
parent | 8d991d923b52a2692370bfa33902d29ff5d2f826 (diff) |
session: cleanup part 1
Rename core data structures. This will break compatibility for out of
tree builtin apps.
- stream_session_t to session_t
- server_rx/tx_fifo to rx/tx_fifo
- stream_session.h to session_types.h
- update copyright
Change-Id: I414097c6e28bcbea866fbf13b8773c7db3f49325
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps/echo_server.c')
-rw-r--r-- | src/vnet/session-apps/echo_server.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c index c0fdb131603..0229da35624 100644 --- a/src/vnet/session-apps/echo_server.c +++ b/src/vnet/session-apps/echo_server.c @@ -55,7 +55,7 @@ typedef struct echo_server_main_t echo_server_main; int -echo_server_session_accept_callback (stream_session_t * s) +echo_server_session_accept_callback (session_t * s) { echo_server_main_t *esm = &echo_server_main; @@ -70,7 +70,7 @@ echo_server_session_accept_callback (stream_session_t * s) } void -echo_server_session_disconnect_callback (stream_session_t * s) +echo_server_session_disconnect_callback (session_t * s) { echo_server_main_t *esm = &echo_server_main; vnet_disconnect_args_t _a = { 0 }, *a = &_a; @@ -81,7 +81,7 @@ echo_server_session_disconnect_callback (stream_session_t * s) } void -echo_server_session_reset_callback (stream_session_t * s) +echo_server_session_reset_callback (session_t * s) { echo_server_main_t *esm = &echo_server_main; vnet_disconnect_args_t _a = { 0 }, *a = &_a; @@ -93,7 +93,7 @@ echo_server_session_reset_callback (stream_session_t * s) int echo_server_session_connected_callback (u32 app_index, u32 api_context, - stream_session_t * s, u8 is_fail) + session_t * s, u8 is_fail) { clib_warning ("called..."); return -1; @@ -135,15 +135,15 @@ test_bytes (echo_server_main_t * esm, int actual_transfer) * If no-echo, just drop the data and be done with it. */ int -echo_server_builtin_server_rx_callback_no_echo (stream_session_t * s) +echo_server_builtin_server_rx_callback_no_echo (session_t * s) { - svm_fifo_t *rx_fifo = s->server_rx_fifo; + svm_fifo_t *rx_fifo = s->rx_fifo; svm_fifo_dequeue_drop (rx_fifo, svm_fifo_max_dequeue (rx_fifo)); return 0; } int -echo_server_rx_callback (stream_session_t * s) +echo_server_rx_callback (session_t * s) { u32 n_written, max_dequeue, max_enqueue, max_transfer; int actual_transfer; @@ -154,8 +154,8 @@ echo_server_rx_callback (stream_session_t * s) ASSERT (s->thread_index == thread_index); - rx_fifo = s->server_rx_fifo; - tx_fifo = s->server_tx_fifo; + rx_fifo = s->rx_fifo; + tx_fifo = s->tx_fifo; ASSERT (rx_fifo->master_thread_index == thread_index); ASSERT (tx_fifo->master_thread_index == thread_index); |