summaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-07-17 11:02:20 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-07-19 15:40:02 +0000
commit8ac1d6d05f2a0d6759284d4eeb5079644a5c8c86 (patch)
treef5105f805c0c7e1ee57fe8ade14f9292bda253ec /src/vcl
parent4f74e9ef34d2bf22c70b78f91613cfd43f9a7bd4 (diff)
session: Use parent_handle instead of transport_opts
Type: feature This is mostly used for quic in the case of a stream creation (i.e. connect on an already established QUIC session). We want do default parent_handle to INVALID to be able to distinguish it from parent_handle = 0 Change-Id: Id5ac0b0155a3c44e51334231b711e4fd87a96a10 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_bapi.c2
-rw-r--r--src/vcl/vcl_private.h2
-rw-r--r--src/vcl/vppcom.c4
-rw-r--r--src/vcl/vppcom.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c
index 7abb45b6330..2bfc7c73f92 100644
--- a/src/vcl/vcl_bapi.c
+++ b/src/vcl/vcl_bapi.c
@@ -517,7 +517,7 @@ vppcom_send_connect_sock (vcl_session_t * session)
cmp->context = session->session_index;
cmp->wrk_index = wrk->vpp_wrk_index;
cmp->is_ip4 = session->transport.is_ip4;
- cmp->transport_opts = session->transport_opts;
+ cmp->parent_handle = session->parent_handle;
clib_memcpy_fast (cmp->ip, &session->transport.rmt_ip, sizeof (cmp->ip));
cmp->port = session->transport.rmt_port;
cmp->proto = session->session_type;
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index d46208cd035..552fdd811ec 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -173,7 +173,7 @@ typedef struct
int n_accepted_sessions;
u8 has_rx_evt;
u32 attr;
- u64 transport_opts;
+ u64 parent_handle;
vppcom_epoll_t vep;
int libc_epfd;
svm_msg_q_t *our_evt_q;
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 3205a812ce4..69d9285ff7e 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1491,7 +1491,7 @@ vppcom_session_connect (uint32_t session_handle, vppcom_endpt_t * server_ep)
clib_memcpy_fast (&session->transport.rmt_ip.ip6, server_ep->ip,
sizeof (ip6_address_t));
session->transport.rmt_port = server_ep->port;
- session->transport_opts = VCL_INVALID_SESSION_HANDLE;
+ session->parent_handle = VCL_INVALID_SESSION_HANDLE;
VDBG (0, "session handle %u: connecting to server %s %U "
"port %d proto %s", session_handle,
@@ -1556,7 +1556,7 @@ vppcom_session_stream_connect (uint32_t session_handle,
session->transport.is_ip4 = parent_session->transport.is_ip4;
session->transport.rmt_ip.ip4.as_u32 = (uint32_t) 1;
session->transport.rmt_port = 0;
- session->transport_opts = parent_session->vpp_handle;
+ session->parent_handle = parent_session->vpp_handle;
VDBG (0, "session handle %u: connecting to session %u [0x%llx]",
session_handle, parent_session_handle, parent_session->vpp_handle);
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index b05eae7150c..90bec310d06 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -105,7 +105,7 @@ typedef struct vppcom_endpt_t_
uint8_t is_ip4;
uint8_t *ip;
uint16_t port;
- uint64_t transport_opts;
+ uint64_t parent_handle;
} vppcom_endpt_t;
typedef uint32_t vcl_session_handle_t;