diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2019-12-24 23:00:49 +0100 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-01-02 12:49:59 +0000 |
commit | a82f590c03bb2f49ca7322adf5ef04e7e3fbe4c9 (patch) | |
tree | 1c729c5d020667c406c3be2076334b9bca2c2d75 /src/vnet | |
parent | 775d5b1e226717f591fffab80d35ea07c90a680f (diff) |
gso: fix the number of buffers required for segmentation
Ticket: VPPSUPP-51
Type: fix
Change-Id: I34d4237eb0644705ce0f523fdd0d6b70308e8bcd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/interface_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |