vxlan: Fixed checksum caclculation offset

VXLAN uses csum_offload for IPv6 packets.

But without gso node we have csum calculated only for inner
packet.
This patch adds support for outer header csum calculation.
Checksum for inner packet should be calculated before
interface-output node (for example in vxlan node).

Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Ica68429ede4426293769207cd83c791ebe72fe56
This commit is contained in:
Vladimir Isaev
2020-05-21 16:34:17 +03:00
committed by John Lo
parent e362151804
commit 698eb87a8e
11 changed files with 86 additions and 79 deletions

View File

@ -80,6 +80,8 @@ class TestVxlanGpe(BridgeDomain, VppTestCase):
# Verify UDP destination port is VXLAN-GPE 4790, source UDP port
# could be arbitrary.
self.assertEqual(pkt[UDP].dport, type(self).dport)
# Verify UDP checksum
self.assert_udp_checksum_valid(pkt)
# Verify VNI
self.assertEqual(pkt[VXLAN].vni, vni)