aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/gso/gro_func.h
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2022-10-06 15:46:24 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-10-06 16:57:30 +0000
commit426f8f239fea0ad28d9e8bf4d712e4ae12ce49e0 (patch)
tree04f50795262d17c989da9948787f0af18aab7e22 /src/vnet/gso/gro_func.h
parent6b8874eb2d47cc46b9c1e0ddd7c95b136625c7c1 (diff)
gso: set the header offsets in gro hdr fixup
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I9d5004f8764b1833e5ca825bc52345e23770c6bc
Diffstat (limited to 'src/vnet/gso/gro_func.h')
-rw-r--r--src/vnet/gso/gro_func.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/gso/gro_func.h b/src/vnet/gso/gro_func.h
index c7649318c43..1f50b28cc20 100644
--- a/src/vnet/gso/gro_func.h
+++ b/src/vnet/gso/gro_func.h
@@ -392,6 +392,7 @@ gro_fixup_header (vlib_main_t *vm, vlib_buffer_t *b0, u32 ack_number, u8 is_l2)
ip4->length =
clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0) -
gho0.l3_hdr_offset);
+ vnet_buffer (b0)->l3_hdr_offset = (u8 *) ip4 - b0->data;
b0->flags |= (VNET_BUFFER_F_GSO | VNET_BUFFER_F_IS_IP4);
vnet_buffer_offload_flags_set (b0, (VNET_BUFFER_OFFLOAD_F_TCP_CKSUM |
VNET_BUFFER_OFFLOAD_F_IP_CKSUM));
@@ -403,12 +404,14 @@ gro_fixup_header (vlib_main_t *vm, vlib_buffer_t *b0, u32 ack_number, u8 is_l2)
ip6->payload_length =
clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0) -
gho0.l4_hdr_offset);
+ vnet_buffer (b0)->l3_hdr_offset = (u8 *) ip6 - b0->data;
b0->flags |= (VNET_BUFFER_F_GSO | VNET_BUFFER_F_IS_IP6);
vnet_buffer_offload_flags_set (b0, VNET_BUFFER_OFFLOAD_F_TCP_CKSUM);
}
tcp_header_t *tcp0 =
(tcp_header_t *) (vlib_buffer_get_current (b0) + gho0.l4_hdr_offset);
+ vnet_buffer (b0)->l4_hdr_offset = (u8 *) tcp0 - b0->data;
tcp0->ack_number = ack_number;
b0->flags &= ~VLIB_BUFFER_IS_TRACED;
}