summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-07-24 17:40:28 -0700
committerDave Barach <openvpp@barachs.net>2017-07-30 15:04:26 +0000
commit68810624f84467503482b82662c980e8f0e36deb (patch)
treee2365cc66a5b6d28700e6b167e0e7038fdafbda0 /src/vnet/udp/udp.c
parent03a6213fb5022d37ea92f974a1814db1c70bcbdf (diff)
Make tcp active open data structures thread safe
- Cleanup half-open connections and timers on the right thread - Ensure half-open connection and transport endpoint pools are thread safe - Enqueue TX events to the correct vpp thread in the builtin client - Use transport proto in transport connections instead of session type Change-Id: Id13239a206afbff6f34a38afa510fe014e4b2049 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r--src/vnet/udp/udp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index ff76a82e4a4..fedf2cc0224 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -34,7 +34,7 @@ udp_session_bind_ip4 (u32 session_index, transport_endpoint_t * lcl)
memset (listener, 0, sizeof (udp_connection_t));
listener->c_lcl_port = clib_host_to_net_u16 (lcl->port);
listener->c_lcl_ip4.as_u32 = lcl->ip.ip4.as_u32;
- listener->c_proto = SESSION_TYPE_IP4_UDP;
+ listener->c_transport_proto = TRANSPORT_PROTO_UDP;
udp_register_dst_port (um->vlib_main, lcl->port, udp4_uri_input_node.index,
1 /* is_ipv4 */ );
return 0;
@@ -49,7 +49,7 @@ udp_session_bind_ip6 (u32 session_index, transport_endpoint_t * lcl)
pool_get (um->udp_listeners, listener);
listener->c_lcl_port = clib_host_to_net_u16 (lcl->port);
clib_memcpy (&listener->c_lcl_ip6, &lcl->ip.ip6, sizeof (ip6_address_t));
- listener->c_proto = SESSION_TYPE_IP6_UDP;
+ listener->c_transport_proto = TRANSPORT_PROTO_UDP;
udp_register_dst_port (um->vlib_main, lcl->port,
udp4_uri_input_node.index, 0 /* is_ipv4 */ );
return 0;
@@ -318,8 +318,8 @@ udp_init (vlib_main_t * vm)
/* Register as transport with URI */
- session_register_transport (SESSION_TYPE_IP4_UDP, &udp4_proto);
- session_register_transport (SESSION_TYPE_IP6_UDP, &udp6_proto);
+ session_register_transport (TRANSPORT_PROTO_UDP, 1, &udp4_proto);
+ session_register_transport (TRANSPORT_PROTO_UDP, 0, &udp6_proto);
/*
* Initialize data structures