X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport-gre.c;h=bd6d4a3c283e8d8ac54f8ff3a789c152445f23a0;hb=9dca7bd50a93eeb26fb7e47ddb896de22f782e7b;hp=b7afd8f7778f19607fa319cf6467dfbf9fa9be9c;hpb=f4267e344a9373a4efefff8f8f5b85f532d223e1;p=openvswitch diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c index b7afd8f7..bd6d4a3c 100644 --- a/datapath/vport-gre.c +++ b/datapath/vport-gre.c @@ -735,7 +735,7 @@ handle_csum_offload(struct sk_buff *skb) } } -/* Called with rcu_read_lock and bottom-halves disabled. */ +/* Called with rcu_read_lock. */ static void gre_err(struct sk_buff *skb, u32 info) { @@ -847,7 +847,7 @@ out: skb->protocol = htons(ETH_P_IP); } -/* Called with rcu_read_lock and bottom-halves disabled. */ +/* Called with rcu_read_lock. */ static int gre_rcv(struct sk_buff *skb) { @@ -1087,7 +1087,9 @@ gre_send(struct vport *vport, struct sk_buff *skb) * the segments. This is particularly beneficial on Xen where we get * lots of GSO pskbs. Conversely, we delay copying if it is just to * get our own writable clone because GSO may do the copy for us. */ - max_headroom = LL_RESERVED_SPACE(rt->u.dst.dev) + mutable->tunnel_hlen; + max_headroom = LL_RESERVED_SPACE(rt->u.dst.dev) + rt->u.dst.header_len + + mutable->tunnel_hlen; + if (skb_headroom(skb) < max_headroom) { skb = check_headroom(skb, max_headroom); if (unlikely(IS_ERR(skb))) {