diff options
author | Srikanth A <srakula@cisco.com> | 2019-10-02 17:48:58 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2019-10-10 16:37:40 +0000 |
commit | 02833ff3294f4abbd8e3d52b38446e0f8f533ffc (patch) | |
tree | e2e9de14d3939938e502347723006f7bb374a02d /src/vnet/ip/ip6.h | |
parent | 8a047ed741072bdb8d93b0841473eae06ae3c9d0 (diff) |
tcp: custom checksum calculations for Ipv4/Ipv6
Type: feature
Based on the configuration, we can disable checksum offload capability
and calculate checksum while pushing the TCP & IP header.
This saves some cycles when VPP stack is used in legacy hardware devices.
Signed-off-by: Srikanth A <srakula@cisco.com>
Change-Id: Ic1b3fcf3040917e47ee65263694ebf7437ac5668
(cherry picked from commit 3642782a2748503f5b5ccf89d1575c1d489948ef)
Diffstat (limited to 'src/vnet/ip/ip6.h')
-rw-r--r-- | src/vnet/ip/ip6.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/ip/ip6.h b/src/vnet/ip/ip6.h index 810fd70ff0c..94c5080a0aa 100644 --- a/src/vnet/ip/ip6.h +++ b/src/vnet/ip/ip6.h @@ -683,7 +683,8 @@ vlib_buffer_push_ip6 (vlib_main_t * vm, vlib_buffer_t * b, sizeof (ip6h->src_address)); clib_memcpy_fast (ip6h->dst_address.as_u8, dst->as_u8, sizeof (ip6h->src_address)); - b->flags |= VNET_BUFFER_F_IS_IP6; + vnet_buffer (b)->l3_hdr_offset = (u8 *) ip6h - b->data; + b->flags |= VNET_BUFFER_F_IS_IP6 | VNET_BUFFER_F_L3_HDR_OFFSET_VALID; return ip6h; } |