aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/udp/udp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index b36ef562169..d2a2b6323f0 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -23,7 +23,7 @@
udp_main_t udp_main;
static void
-udp_connection_register_port (vlib_main_t * vm, u16 lcl_port, u8 is_ip4)
+udp_connection_register_port (u16 lcl_port, u8 is_ip4)
{
udp_main_t *um = &udp_main;
udp_dst_port_info_t *pi;
@@ -166,7 +166,6 @@ static u32
udp_session_bind (u32 session_index, transport_endpoint_cfg_t *lcl)
{
udp_main_t *um = vnet_get_udp_main ();
- vlib_main_t *vm = vlib_get_main ();
transport_endpoint_cfg_t *lcl_ext;
udp_connection_t *listener;
u16 lcl_port_ho;
@@ -207,7 +206,7 @@ udp_session_bind (u32 session_index, transport_endpoint_cfg_t *lcl)
listener->c_flags |= TRANSPORT_CONNECTION_F_CLESS;
clib_spinlock_init (&listener->rx_lock);
- udp_connection_register_port (vm, lcl_port_ho, lcl->is_ip4);
+ udp_connection_register_port (lcl_port_ho, lcl->is_ip4);
return listener->c_c_index;
}
@@ -349,11 +348,10 @@ udp_session_send_params (transport_connection_t * tconn,
static int
udp_open_connection (transport_endpoint_cfg_t * rmt)
{
- vlib_main_t *vm = vlib_get_main ();
- u32 thread_index = vm->thread_index;
udp_main_t *um = &udp_main;
ip46_address_t lcl_addr;
udp_connection_t *uc;
+ u32 thread_index;
u16 lcl_port;
int rv;
@@ -398,7 +396,7 @@ udp_open_connection (transport_endpoint_cfg_t * rmt)
conn_alloc:
- udp_connection_register_port (vm, lcl_port, rmt->is_ip4);
+ udp_connection_register_port (lcl_port, rmt->is_ip4);
/* We don't poll main thread if we have workers */
thread_index = transport_cl_thread ();