summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip4_forward.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-06-29 09:30:15 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-07-18 17:05:01 +0000
commit2c0a4f407f565d8dd33ff3a9fada346860d30ad2 (patch)
treefeef8e57bc4f7b434715bd04c9be218ce215bdd0 /src/vnet/ip/ip4_forward.c
parent758137a7b70806dc9ec7a28fbe1bc01bc7df2586 (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-xsrc/vnet/ip/ip4_forward.c9
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))
{