vlib: refactor checksum offload support 64/29664/10
authorMohsin Kazmi <sykazmi@cisco.com>
Wed, 10 Feb 2021 10:26:24 +0000 (11:26 +0100)
committerDamjan Marion <dmarion@me.com>
Mon, 15 Feb 2021 20:32:56 +0000 (20:32 +0000)
commit6809538e646bf86c000dc1faba60b0a4157ad898
tree18a228b96226932381f15e44b4972636de1c7fe1
parent99c6dc6a7a36c0be95da9afb3ad8830b24754d4e
vlib: refactor checksum offload support

Type: refactor

This patch refactors the offload flags in vlib_buffer_t.
There are two main reasons behind this refactoring.
First, offload flags are insufficient to represent outer
and inner headers offloads. Second, room for these flags
in first cacheline of vlib_buffer_t is also limited.

This patch introduces a generic offload flag in first
cacheline. And detailed offload flags in 2nd cacheline
of the structure for performance optimization.

Change-Id: Icc363a142fb9208ec7113ab5bbfc8230181f6004
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
34 files changed:
extras/pg/checksum_offload.pg
src/plugins/avf/output.c
src/plugins/dpdk/device/device.c
src/plugins/gtpu/gtpu_decap.c
src/plugins/lisp/lisp-cp/packets.c
src/plugins/vmxnet3/input.c
src/plugins/wireguard/wireguard_input.c
src/vnet/buffer.c
src/vnet/buffer.h
src/vnet/devices/af_packet/node.c
src/vnet/devices/virtio/device.c
src/vnet/devices/virtio/node.c
src/vnet/devices/virtio/vhost_user_input.c
src/vnet/devices/virtio/vhost_user_output.c
src/vnet/gso/gro_func.h
src/vnet/gso/node.c
src/vnet/interface_format.c
src/vnet/interface_funcs.h
src/vnet/interface_output.c
src/vnet/interface_output.h
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip4_inlines.h
src/vnet/ip/ip6_forward.c
src/vnet/ip/ip_frag.c
src/vnet/ipsec/ipsec_output.c
src/vnet/pg/cli.c
src/vnet/pg/input.c
src/vnet/pg/pg.h
src/vnet/tcp/tcp_output.c
src/vnet/udp/udp_inlines.h
src/vnet/vxlan-gbp/encap.c
src/vnet/vxlan/encap.c
test/test_offload.py
test/test_pcap.py