From a82f590c03bb2f49ca7322adf5ef04e7e3fbe4c9 Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Tue, 24 Dec 2019 23:00:49 +0100 Subject: [PATCH] gso: fix the number of buffers required for segmentation Ticket: VPPSUPP-51 Type: fix Change-Id: I34d4237eb0644705ce0f523fdd0d6b70308e8bcd Signed-off-by: Mohsin Kazmi --- src/vnet/interface_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c index 2aa363608c4..ec92c38edc6 100644 --- a/src/vnet/interface_output.c +++ b/src/vnet/interface_output.c @@ -237,7 +237,8 @@ tso_alloc_tx_bufs (vlib_main_t * vm, u16 gso_size) { u16 size = - clib_min (gso_size, vlib_buffer_get_default_data_size (vm) - l234_sz); + clib_min (gso_size, vlib_buffer_get_default_data_size (vm) - l234_sz + - b0->current_data); /* rounded-up division */ u16 n_bufs = (n_bytes_b0 - l234_sz + (size - 1)) / size;