aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-04-05 16:09:17 -0700
committersteven luong <sluong@cisco.com>2020-04-29 03:51:30 +0000
commit31325df5e95283733f8b7590bc01e527b196ff3a (patch)
tree36eb281549e9a7cc9f28821a79b77b3d3a61d84f
parent1a78a8da6f710a524ef5d7e70965edc28db8acae (diff)
virtio: vhost checksum problem for ipv6
When checksum is enable for IPv6, it erroneously set the flag VNET_BUFFER_F_OFFLOAD_IP_CKSUM. That flag is meant for ip4 packets only. Type: fix Ticket: VPP-1857 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Id03b2937bfa34e2a9b50a36aafe0700bad7fb95e (cherry picked from commit f78294d8468f156e066e7e69aab3a1b285810c3a) (cherry picked from commit 82b62bbf58bc3d1143a359d8f58f7be2f473cddd)
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 1c3e1806cb5..86ab3bff8a6 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -275,14 +275,14 @@ vhost_user_handle_rx_offload (vlib_buffer_t * b0, u8 * b0_data,
vnet_buffer (b0)->l4_hdr_offset = hdr->csum_start;
b0->flags |= (VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
- VNET_BUFFER_F_L4_HDR_OFFSET_VALID |
- VNET_BUFFER_F_OFFLOAD_IP_CKSUM);
+ VNET_BUFFER_F_L4_HDR_OFFSET_VALID);
if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP4))
{
ip4_header_t *ip4 = (ip4_header_t *) (b0_data + l2hdr_sz);
l4_proto = ip4->protocol;
- b0->flags |= VNET_BUFFER_F_IS_IP4;
+ b0->flags |= (VNET_BUFFER_F_IS_IP4 |
+ VNET_BUFFER_F_OFFLOAD_IP_CKSUM);
}
else if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP6))
{