]> git.proxmox.com Git - mirror_ovs.git/commit
datapath-windows: Account for VLAN tag in tunnel Decap
authorShashank Ram <rams@vmware.com>
Mon, 20 Nov 2017 23:06:14 +0000 (15:06 -0800)
committerAlin Gabriel Serdean <aserdean@ovn.org>
Tue, 28 Nov 2017 12:46:57 +0000 (14:46 +0200)
commita9e6958101d082dbbdc096d01a803ab3a3eca549
treef1ab1f649e5d086dc979eb8214da33379fec0b2e
parent8a7903c632ef940bcacaa7da7330e871912a6985
datapath-windows: Account for VLAN tag in tunnel Decap

Decap functions for tunneling protocols do not compute
the packet header offsets correctly when there is a VLAN
tag in the L2 header. This results in incorrect checksum
computation causing the packet to be dropped.

This patch adds support to account for the VLAN tag in the
packet if its present, and makes use of the OvsExtractLayers()
function to correctly compute the header offsets for different
layers.

Testing done:
- Tested Geneve, STT, Vxlan and Gre and verified that there
  are no regressions.
- Verified that packets with VLAN tags are correctly handled
  in the decap code of all tunneling protocols. Previously,
  this would result in packet drops due to invalid checksums
  being computed.
- Verified that non-VLAN tagged packets are handled correctly.

Signed-off-by: Shashank Ram <rams@vmware.com>
Acked-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
datapath-windows/ovsext/Geneve.c
datapath-windows/ovsext/Geneve.h
datapath-windows/ovsext/Gre.c
datapath-windows/ovsext/Gre.h
datapath-windows/ovsext/Offload.c
datapath-windows/ovsext/Offload.h
datapath-windows/ovsext/Stt.c
datapath-windows/ovsext/Stt.h
datapath-windows/ovsext/Vxlan.c
datapath-windows/ovsext/Vxlan.h