diff options
author | Florin Coras <fcoras@cisco.com> | 2019-03-01 12:41:21 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-03-02 23:39:51 +0000 |
commit | f6c4313b6aa7746fe97afd398ce68c2efbef0600 (patch) | |
tree | 72b551a33adf3ae6017ca792c2f4c3a5f05c2477 /src/vnet/session-apps | |
parent | 5fd3210be3a043c12c598df3d75dbe0aa606bfe5 (diff) |
session: cleanup session event types
Change-Id: I87bdf705341dd760f0be907a663aa64140977d39
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps')
-rw-r--r-- | src/vnet/session-apps/echo_client.c | 6 | ||||
-rw-r--r-- | src/vnet/session-apps/echo_server.c | 7 | ||||
-rw-r--r-- | src/vnet/session-apps/http_server.c | 2 | ||||
-rw-r--r-- | src/vnet/session-apps/proxy.c | 6 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c index cb93e81054c..44e6ffce842 100644 --- a/src/vnet/session-apps/echo_client.c +++ b/src/vnet/session-apps/echo_client.c @@ -63,7 +63,7 @@ send_data_chunk (echo_client_main_t * ecm, eclient_session_t * s) rv = clib_min (svm_fifo_max_enqueue (f), bytes_this_chunk); svm_fifo_enqueue_nocopy (f, rv); session_send_io_evt_to_thread_custom (f, s->thread_index, - FIFO_EVENT_APP_TX); + SESSION_IO_EVT_TX); } else rv = app_send_stream (&s->data, test_data + test_buf_offset, @@ -96,7 +96,7 @@ send_data_chunk (echo_client_main_t * ecm, eclient_session_t * s) svm_fifo_enqueue_nowait (f, sizeof (hdr), (u8 *) & hdr); svm_fifo_enqueue_nocopy (f, rv); session_send_io_evt_to_thread_custom (f, s->thread_index, - FIFO_EVENT_APP_TX); + SESSION_IO_EVT_TX); } else rv = app_send_dgram (&s->data, test_data + test_buf_offset, @@ -481,7 +481,7 @@ echo_clients_rx_callback (session_t * s) if (svm_fifo_max_dequeue (s->rx_fifo)) { if (svm_fifo_set_event (s->rx_fifo)) - session_send_io_evt_to_thread (s->rx_fifo, FIFO_EVENT_BUILTIN_RX); + session_send_io_evt_to_thread (s->rx_fifo, SESSION_IO_EVT_BUILTIN_RX); } return 0; } diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c index f9d3d93c4e7..1d99ff17a0f 100644 --- a/src/vnet/session-apps/echo_server.c +++ b/src/vnet/session-apps/echo_server.c @@ -195,7 +195,8 @@ echo_server_rx_callback (session_t * s) /* Program self-tap to retry */ if (svm_fifo_set_event (rx_fifo)) { - if (session_send_io_evt_to_thread (rx_fifo, FIFO_EVENT_BUILTIN_RX)) + if (session_send_io_evt_to_thread (rx_fifo, + SESSION_IO_EVT_BUILTIN_RX)) clib_warning ("failed to enqueue self-tap"); vec_validate (esm->rx_retries[s->thread_index], s->session_index); @@ -239,14 +240,14 @@ echo_server_rx_callback (session_t * s) n_written = app_send_stream_raw (tx_fifo, esm->vpp_queue[thread_index], esm->rx_buf[thread_index], - actual_transfer, FIFO_EVENT_APP_TX, 0); + actual_transfer, SESSION_IO_EVT_TX, 0); } else { n_written = app_send_dgram_raw (tx_fifo, &at, esm->vpp_queue[s->thread_index], esm->rx_buf[thread_index], - actual_transfer, FIFO_EVENT_APP_TX, 0); + actual_transfer, SESSION_IO_EVT_TX, 0); } if (n_written != max_transfer) diff --git a/src/vnet/session-apps/http_server.c b/src/vnet/session-apps/http_server.c index 2dfb6a485b8..f702b741f95 100644 --- a/src/vnet/session-apps/http_server.c +++ b/src/vnet/session-apps/http_server.c @@ -571,7 +571,7 @@ close_session: postpone: (void) svm_fifo_set_event (hs->rx_fifo); - session_send_io_evt_to_thread (hs->rx_fifo, FIFO_EVENT_BUILTIN_RX); + session_send_io_evt_to_thread (hs->rx_fifo, SESSION_IO_EVT_BUILTIN_RX); return 0; wait_for_data: diff --git a/src/vnet/session-apps/proxy.c b/src/vnet/session-apps/proxy.c index ba7b05784fa..92a3910efbf 100644 --- a/src/vnet/session-apps/proxy.c +++ b/src/vnet/session-apps/proxy.c @@ -214,7 +214,7 @@ proxy_rx_callback (session_t * s) u32 ao_thread_index = active_open_tx_fifo->master_thread_index; if (session_send_io_evt_to_thread_custom (active_open_tx_fifo, ao_thread_index, - FIFO_EVENT_APP_TX)) + SESSION_IO_EVT_TX)) clib_warning ("failed to enqueue tx evt"); } } @@ -320,7 +320,7 @@ active_open_connected_callback (u32 app_index, u32 opaque, */ ASSERT (s->thread_index == thread_index); if (svm_fifo_set_event (s->tx_fifo)) - session_send_io_evt_to_thread (s->tx_fifo, FIFO_EVENT_APP_TX); + session_send_io_evt_to_thread (s->tx_fifo, SESSION_IO_EVT_TX); return 0; } @@ -358,7 +358,7 @@ active_open_rx_callback (session_t * s) u8 thread_index = proxy_tx_fifo->master_thread_index; return session_send_io_evt_to_thread_custom (proxy_tx_fifo, thread_index, - FIFO_EVENT_APP_TX); + SESSION_IO_EVT_TX); } return 0; |