diff options
author | Florin Coras <fcoras@cisco.com> | 2020-12-02 21:14:56 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2021-02-26 21:58:12 +0000 |
commit | 30fdf39628c095ed4a5d607079c1b18294050c56 (patch) | |
tree | 36f2c9a87fe9565f974437339e6a85c18cefd598 /src/vnet/udp/udp.c | |
parent | 4f0ac7e833fffe8fec659037efe0928d1bba0677 (diff) |
udp: avoid locking connected udp sessions on rx
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I52aa2322980b51cfc0b282fb37d7f63d30777dee
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r-- | src/vnet/udp/udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c index 1d05e02b2ab..00d9ec104dd 100644 --- a/src/vnet/udp/udp.c +++ b/src/vnet/udp/udp.c @@ -124,6 +124,7 @@ void udp_connection_free (udp_connection_t * uc) { u32 thread_index = uc->c_thread_index; + clib_spinlock_free (&uc->rx_lock); if (CLIB_DEBUG) clib_memset (uc, 0xFA, sizeof (*uc)); pool_put (udp_main.connections[thread_index], uc); @@ -222,6 +223,7 @@ udp_session_unbind (u32 listener_index) listener = udp_listener_get (listener_index); udp_connection_unregister_port (clib_net_to_host_u16 (listener->c_lcl_port), listener->c_is_ip4); + clib_spinlock_free (&listener->rx_lock); pool_put (um->listener_pool, listener); return 0; } |