diff mbox

vxlan/veth performance issues on net.git + latest kernels

Message ID 1386538601.30495.305.camel@edumazet-glaptop2.roam.corp.google.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Dec. 8, 2013, 9:36 p.m. UTC
On Sun, 2013-12-08 at 12:50 -0800, Eric Dumazet wrote:
> On Sun, 2013-12-08 at 16:30 +0200, Mike Rapoport wrote:
> >  
> > It was something *very* hacky:
> 
> > 		if (skb->len < 64000)
> > 			skb_shinfo(skb)->gso_size = skb->len;
> > 		else
> > 			skb_shinfo(skb)->gso_size = 64000;
> 
> This sounds like an 16bit overflow somewhere.
> 
> This reminds the issue we fix in commit 50bceae9bd356
> ("tcp: Reallocate headroom if it would overflow csum_start")
> 
> You might try to reduce the 0xFFFF to something smaller.

Also try following debugging patch :

 	skb->network_header   += off;



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 2718fed53d8c..d6fcb6272d37 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -913,8 +913,12 @@  EXPORT_SYMBOL(skb_clone);
 static void skb_headers_offset_update(struct sk_buff *skb, int off)
 {
 	/* Only adjust this if it actually is csum_start rather than csum */
-	if (skb->ip_summed == CHECKSUM_PARTIAL)
-		skb->csum_start += off;
+	if (skb->ip_summed == CHECKSUM_PARTIAL) {
+		u32 val = (u32)skb->csum_start + off;
+
+		WARN_ON_ONCE(val > 0xFFFF);
+		skb->csum_start = val;
+	}
 	/* {transport,network,mac}_header and tail are relative to skb->head
*/
 	skb->transport_header += off;