diff options
author | Florin Coras <fcoras@cisco.com> | 2017-10-02 00:18:51 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-10-16 21:41:11 +0000 |
commit | 3cbc04bea02fc60471dfe0c671ede3ca42c118c3 (patch) | |
tree | 6128beab7dfb01c6221da2f675078078170e75ac /src/vnet/tcp/builtin_client.c | |
parent | 0cb01bde499979066389975ba81670764914cbc2 (diff) |
udp: refactor udp code
Change-Id: I44d5c9df7c49b8d4d5677c6d319033b2da3e6b80
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/builtin_client.c')
-rw-r--r-- | src/vnet/tcp/builtin_client.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c index 7a0d2ea1744..4258fc43010 100644 --- a/src/vnet/tcp/builtin_client.c +++ b/src/vnet/tcp/builtin_client.c @@ -50,7 +50,6 @@ send_test_chunk (tclient_main_t * tm, session_t * s) int test_buf_offset; u32 bytes_this_chunk; session_fifo_event_t evt; - static int serial_number = 0; svm_fifo_t *txf; int rv; @@ -98,7 +97,6 @@ send_test_chunk (tclient_main_t * tm, session_t * s) /* Fabricate TX event, send to vpp */ evt.fifo = txf; evt.event_type = FIFO_EVENT_APP_TX; - evt.event_id = serial_number++; if (unix_shared_memory_queue_add (tm->vpp_event_queue[txf->master_thread_index], (u8 *) & evt, @@ -248,12 +246,12 @@ builtin_client_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, session_parse_handle (sp->vpp_session_handle, &index, &thread_index); - s = stream_session_get_if_valid (index, thread_index); + s = session_get_if_valid (index, thread_index); if (s) { vnet_disconnect_args_t _a, *a = &_a; - a->handle = stream_session_handle (s); + a->handle = session_handle (s); a->app_index = tm->app_index; vnet_disconnect_session (a); @@ -369,7 +367,7 @@ builtin_session_connected_callback (u32 app_index, u32 api_context, session->server_rx_fifo->client_session_index = session_index; session->server_tx_fifo = s->server_tx_fifo; session->server_tx_fifo->client_session_index = session_index; - session->vpp_session_handle = stream_session_handle (s); + session->vpp_session_handle = session_handle (s); vec_add1 (tm->connection_index_by_thread[thread_index], session_index); __sync_fetch_and_add (&tm->ready_connections, 1); @@ -403,7 +401,7 @@ builtin_session_disconnect_callback (stream_session_t * s) { tclient_main_t *tm = &tclient_main; vnet_disconnect_args_t _a, *a = &_a; - a->handle = stream_session_handle (s); + a->handle = session_handle (s); a->app_index = tm->app_index; vnet_disconnect_session (a); return; |