@@ -64,12 +64,6 @@
#define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */
-/* VXLAN protocol header */
-struct vxlanhdr {
- __be32 vx_flags;
- __be32 vx_vni;
-};
-
/* UDP port for VXLAN traffic.
* The IANA assigned port is 4789, but the Linux default is 8472
* for compatibility with early adopters.
@@ -1125,8 +1119,8 @@ static void vxlan_rcv(struct vxlan_sock *vs,
* leave the CHECKSUM_UNNECESSARY, the device checksummed it
* for us. Otherwise force the upper layers to verify it.
*/
- if (skb->ip_summed != CHECKSUM_UNNECESSARY || !skb->encapsulation ||
- !(vxlan->dev->features & NETIF_F_RXCSUM))
+ if ((skb->ip_summed != CHECKSUM_UNNECESSARY && skb->ip_summed != CHECKSUM_PARTIAL) ||
+ !skb->encapsulation || !(vxlan->dev->features & NETIF_F_RXCSUM))
skb->ip_summed = CHECKSUM_NONE;
skb->encapsulation = 0;
@@ -5,6 +5,12 @@
#include <linux/netdevice.h>
#include <linux/udp.h>
+/* VXLAN protocol header */
+struct vxlanhdr {
+ __be32 vx_flags;
+ __be32 vx_vni;
+};
+
#define VNI_HASH_BITS 10
#define VNI_HASH_SIZE (1<<VNI_HASH_BITS)
As a pre-step for supporting vxlan with the GRO stack, move the vxlan header structure definition to common header file and enhance the vxlan code not to alter the ip_summed field for RX skb's marked with CHECKSUM_PARTIAL, as done by the TCP GRO code. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> --- drivers/net/vxlan.c | 10 ++-------- include/net/vxlan.h | 6 ++++++ 2 files changed, 8 insertions(+), 8 deletions(-)