aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet
diff options
context:
space:
mode:
authorJakub Grajciar <Jakub.Grajciar@pantheon.tech>2017-11-14 14:56:05 +0100
committerJakub Grajciar <Jakub.Grajciar@pantheon.tech>2017-11-14 14:56:05 +0100
commitfa600c9169c0d7104af7a9be12a0471a8a8c8262 (patch)
treec6e3dab0c83c1324539e15fa8d099fb472b22122 /src/vnet/devices/af_packet
parent227867f5d3fb1b1dacbaf2f426812417b72ef03a (diff)
vnet: af_packet mark l3 offload cksum
Change-Id: I42ee5898e1f775692811eebab11bcfe458f1ec63 Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
Diffstat (limited to 'src/vnet/devices/af_packet')
-rw-r--r--src/vnet/devices/af_packet/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index b627cfcb036..556d7489725 100644
--- a/src/vnet/devices/af_packet/node.c
+++ b/src/vnet/devices/af_packet/node.c
@@ -115,7 +115,8 @@ mark_tcp_udp_cksum_calc (vlib_buffer_t * b)
{
ip4_header_t *ip4 =
(vlib_buffer_get_current (b) + sizeof (ethernet_header_t));
- b->flags |= VNET_BUFFER_F_IS_IP4;
+ b->flags |= VNET_BUFFER_F_IS_IP4 | VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
+ ip4->checksum = 0;
if (ip4->protocol == IP_PROTOCOL_TCP)
{
b->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;