summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_input.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-06 21:28:59 +0000
committerDave Barach <openvpp@barachs.net>2020-04-07 14:46:47 +0000
commitba78e2380e86926c7e29bc3538eb7ac4e78699b1 (patch)
treef673f105517a6c63a75574cb597f61b966366570 /src/vnet/udp/udp_input.c
parent59fea5a6a3fafe0a5a0d2f543db53af790013e3a (diff)
udp session: jumbo frames and configurable mtu
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6b750bef5df0f8544e05177ccd480f87a020832d
Diffstat (limited to 'src/vnet/udp/udp_input.c')
-rw-r--r--src/vnet/udp/udp_input.c10
1 files changed, 9 insertions, 1 deletions
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);