diff options
author | Florin Coras <fcoras@cisco.com> | 2018-07-27 05:45:06 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-07-31 11:36:54 +0000 |
commit | 460dce6e2d017cc7b2151fd0fa61d464570489d7 (patch) | |
tree | 19e944702f8b7fcb659a8166f50a03ee5eba9a7a /src/vcl/vcl_bapi.c | |
parent | e939bf1b508e1fae6929dd8cf0f3effdc2c12549 (diff) |
vcl: add read/write udp support
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_bapi.c')
-rw-r--r-- | src/vcl/vcl_bapi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c index 0201cd82966..311df64528c 100644 --- a/src/vcl/vcl_bapi.c +++ b/src/vcl/vcl_bapi.c @@ -132,6 +132,7 @@ vl_api_map_another_segment_t_handler (vl_api_map_another_segment_t * mp) svm_fifo_segment_create_args_t *a = &_a; int rv; + vcm->mounting_segment = 1; memset (a, 0, sizeof (*a)); a->segment_name = (char *) mp->segment_name; a->segment_size = mp->segment_size; @@ -147,6 +148,7 @@ vl_api_map_another_segment_t_handler (vl_api_map_another_segment_t * mp) VDBG (1, "VCL<%d>: mapped new segment '%s' size %d", getpid (), mp->segment_name, mp->segment_size); + vcm->mounting_segment = 0; } static void @@ -356,6 +358,18 @@ done: vppcom_session_table_add_listener (mp->handle, session_index); session->session_state = STATE_LISTEN; + if (session->is_dgram) + { + svm_fifo_t *rx_fifo, *tx_fifo; + session->vpp_evt_q = uword_to_pointer (mp->vpp_evt_q, svm_msg_q_t *); + rx_fifo = uword_to_pointer (mp->rx_fifo, svm_fifo_t *); + rx_fifo->client_session_index = session_index; + tx_fifo = uword_to_pointer (mp->tx_fifo, svm_fifo_t *); + tx_fifo->client_session_index = session_index; + session->rx_fifo = rx_fifo; + session->tx_fifo = tx_fifo; + } + VDBG (1, "VCL<%d>: vpp handle 0x%llx, sid %u: bind succeeded!", getpid (), mp->handle, mp->context); done_unlock: |