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_forward.c | |
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_forward.c')
-rwxr-xr-x | src/vnet/ip/ip4_forward.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index 8dd927d4afd..4a9e7919140 100755 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -2457,7 +2457,8 @@ ip4_rewrite_inline (vlib_main_t * vm, } /* Verify checksum. */ - ASSERT (ip0->checksum == ip4_header_checksum (ip0)); + ASSERT ((ip0->checksum == ip4_header_checksum (ip0)) || + (p0->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM)); } else { @@ -2492,7 +2493,8 @@ ip4_rewrite_inline (vlib_main_t * vm, } /* Verify checksum. */ - ASSERT (ip1->checksum == ip4_header_checksum (ip1)); + ASSERT ((ip1->checksum == ip4_header_checksum (ip1)) || + (p1->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM)); } else { @@ -2630,7 +2632,8 @@ ip4_rewrite_inline (vlib_main_t * vm, ip0->ttl = ttl0; - ASSERT (ip0->checksum == ip4_header_checksum (ip0)); + ASSERT ((ip0->checksum == ip4_header_checksum (ip0)) || + (p0->flags | VNET_BUFFER_F_OFFLOAD_IP_CKSUM)); if (PREDICT_FALSE (ttl0 <= 0)) { |