[ovs-dev] [PATCH] datapath: Fix vxlan gso with vlan.
Pravin B Shelar
pshelar at nicira.com
Tue Oct 1 15:24:55 UTC 2013
To use ovs-gso-compatibility we need to record inner skb offset.
In case of vxlan it is done before vlan header is pushed which
gives wrong inner packet to ovs-gso.
Following patch reset skb offsets after inner skb is completely built.
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
datapath/linux/compat/vxlan.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 4f7671b..09d0fd7 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -219,8 +219,6 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
int min_headroom;
int err;
- skb_reset_inner_headers(skb);
-
min_headroom = LL_RESERVED_SPACE(rt_dst(rt).dev) + rt_dst(rt).header_len
+ VXLAN_HLEN + sizeof(struct iphdr)
+ (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0);
@@ -239,6 +237,8 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
vlan_set_tci(skb, 0);
}
+ skb_reset_inner_headers(skb);
+
vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
vxh->vx_flags = htonl(VXLAN_FLAGS);
vxh->vx_vni = vni;
--
1.7.1
More information about the dev
mailing list