summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2019-06-19 12:09:51 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-06-21 12:25:24 +0000
commit5c588504218357bd60b79501ccf8721ff65bced3 (patch)
tree6a680acf96753ef0bd242ca0731861510a14a5fc /src
parent03e099f935a5be25ce5d6833e5fba0ec75386573 (diff)
interface: fix the incorrect sizes/offsets in the tso segmentation
The copying of the first segment copied too small amount of data. The copying of the second and subsequent segments used the wrong data offset - for the case of GSO enabled it starts from 12 bytes earlier. Change-Id: I3adc532c175babc1ca1e121c7e12e6cafbdb9974 Type: fix Ticket: VPP-1700 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 4f740c8f0085c0cd576744c00bf50a9d9b111470)
Diffstat (limited to 'src')
-rw-r--r--src/vnet/interface_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index bb97493a756..b2b6fff014f 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -351,7 +351,7 @@ tso_segment_buffer (vlib_main_t * vm, vnet_interface_per_thread_data_t * ptd,
vlib_buffer_t *b0 = vlib_get_buffer (vm, ptd->split_buffers[0]);
tso_init_buf_from_template_base (b0, sb0, default_bflags,
- l4_hdr_sz + first_data_size);
+ l234_sz + first_data_size);
u32 total_src_left = n_bytes_b0 - l234_sz - first_data_size;
if (total_src_left)
@@ -409,7 +409,7 @@ tso_segment_buffer (vlib_main_t * vm, vnet_interface_per_thread_data_t * ptd,
csbi0 = next_bi;
csb0 = vlib_get_buffer (vm, csbi0);
src_left = csb0->current_length;
- src_ptr = csb0->data;
+ src_ptr = vlib_buffer_get_current (csb0);
}
else
{