diff options
author | Dave Barach <dave@barachs.net> | 2017-06-29 09:30:15 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-07-18 17:05:01 +0000 |
commit | 2c0a4f407f565d8dd33ff3a9fada346860d30ad2 (patch) | |
tree | feef8e57bc4f7b434715bd04c9be218ce215bdd0 /src/vnet/ip/ip4.h | |
parent | 758137a7b70806dc9ec7a28fbe1bc01bc7df2586 (diff) |
TCP/UDP checksum offload API
Change-Id: I2cb6ce4e29813f6602b14e6e61713fb381fbcef8
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/ip/ip4.h')
-rw-r--r-- | src/vnet/ip/ip4.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h index 71640defb21..19198bcb66b 100644 --- a/src/vnet/ip/ip4.h +++ b/src/vnet/ip/ip4.h @@ -42,6 +42,7 @@ #include <vnet/ip/ip4_packet.h> #include <vnet/ip/lookup.h> +#include <vnet/buffer.h> #include <vnet/feature/feature.h> typedef struct ip4_mfib_t @@ -346,7 +347,8 @@ vlib_buffer_push_ip4 (vlib_main_t * vm, vlib_buffer_t * b, ih->src_address.as_u32 = src->as_u32; ih->dst_address.as_u32 = dst->as_u32; - ih->checksum = ip4_header_checksum (ih); + ih->checksum = 0; + b->flags |= VNET_BUFFER_F_OFFLOAD_IP_CKSUM | VNET_BUFFER_F_IS_IP4; return ih; } #endif /* included_ip_ip4_h */ |