From ba78e2380e86926c7e29bc3538eb7ac4e78699b1 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 6 Apr 2020 21:28:59 +0000 Subject: udp session: jumbo frames and configurable mtu Type: improvement Signed-off-by: Florin Coras Change-Id: I6b750bef5df0f8544e05177ccd480f87a020832d --- src/vnet/udp/udp_input.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/vnet/udp/udp_input.c') diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c index 4b22cbef54d..1e1c60b419f 100644 --- a/src/vnet/udp/udp_input.c +++ b/src/vnet/udp/udp_input.c @@ -208,6 +208,7 @@ udp46_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, child0->c_rmt_port = udp0->src_port; child0->c_is_ip4 = is_ip4; child0->c_fib_index = tc0->fib_index; + child0->mss = uc0->mss; child0->flags |= UDP_CONN_F_CONNECTED; if (session_stream_accept (&child0->connection, @@ -238,7 +239,14 @@ udp46_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, error0 = UDP_ERROR_FIFO_FULL; goto trace0; } - hdr0.data_length = b0->current_length = data_len; + + hdr0.data_length = data_len; + if (PREDICT_TRUE (!(b0->flags & VLIB_BUFFER_NEXT_PRESENT))) + b0->current_length = data_len; + else + b0->total_length_not_including_first_buffer = data_len + - b0->current_length; + hdr0.data_offset = 0; ip_set (&hdr0.lcl_ip, lcl_addr, is_ip4); ip_set (&hdr0.rmt_ip, rmt_addr, is_ip4); -- cgit 1.2.3-korg