datapath: Fix vxlan gso with vlan.
authorPravin B Shelar <pshelar@nicira.com>
Tue, 1 Oct 2013 15:24:55 +0000 (08:24 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Mon, 30 Sep 2013 02:47:15 +0000 (19:47 -0700)
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@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/linux/compat/vxlan.c

index d774b6c..325b19d 100644 (file)
@@ -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;