From: Pravin B Shelar Date: Tue, 1 Oct 2013 15:24:55 +0000 (-0700) Subject: datapath: Fix vxlan gso with vlan. X-Git-Tag: v2.0~14 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;ds=sidebyside;h=831c0a1f3500135737f0631ef3cfa0425142f925;p=cascardo%2Fovs.git datapath: Fix vxlan gso with vlan. 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 Acked-by: Jesse Gross --- diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c index d774b6c3c..325b19d4f 100644 --- a/datapath/linux/compat/vxlan.c +++ b/datapath/linux/compat/vxlan.c @@ -219,8 +219,6 @@ int vxlan_xmit_skb(struct net *net, 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 net *net, 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;