lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 20 Jan 2009 16:00:47 -0700
From:	"Tantilov, Emil S" <emil.s.tantilov@...el.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"David S. Miller" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: ixgbe: Replace LRO with GRO

Herbert Xu wrote:
> On Sat, Jan 17, 2009 at 08:52:56PM +1100, Herbert Xu wrote:
>> 
>>>> However, it is not very clear what is causing this loss.  BTW,
>>>> did you apply the fix b0059b50b70dc3a908bea4ece2f9494a22200018
>>>> (gro: Fix page ref count for skbs freed normally) on both sides?
>>>> That one is required to make igb or ixgbe work properly.
>>> Ah - doesn't seem like I have this fix. Jeff will have to pull this
>>> in our test tree. 
>> 
>> OK, although this bug should only manifest itself if aggregation
>> occurs, which apparently isn't the case according to the dump.
> 
> Doh, it looks like the bug fix itself was broken.  In fact, I
> think you do have the fix as it results in exactly what you were
> seeing.
> 
> Please apply this on top of it.
> 
> gro: Fix merging of paged packets
> 
> The previous fix to paged packets broke the merging because it
> reset the skb->len before we added it to the merged packet.  This
> wasn't detected because it simply resulted in the truncation of
> the packet while the missing bit is subsequently retransmitted.
> 
> The fix is to store skb->len before we clobber it.
> 
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
> 
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 65eac77..9127c47 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -2588,8 +2588,9 @@ int skb_gro_receive(struct sk_buff **head,
>  	struct sk_buff *skb) struct sk_buff *nskb;
>  	unsigned int headroom;
>  	unsigned int hlen = p->data - skb_mac_header(p);
> +	unsigned int len = skb->len;
> 
> -	if (hlen + p->len + skb->len >= 65536)
> +	if (hlen + p->len + len >= 65536)
>  		return -E2BIG;
> 
>  	if (skb_shinfo(p)->frag_list)
> @@ -2651,9 +2652,9 @@ merge:
> 
>  done:
>  	NAPI_GRO_CB(p)->count++;
> -	p->data_len += skb->len;
> -	p->truesize += skb->len;
> -	p->len += skb->len;
> +	p->data_len += len;
> +	p->truesize += len;
> +	p->len += len;
> 
>  	NAPI_GRO_CB(skb)->same_flow = 1;
>  	return 0;
> 
> Cheers,


With this patch applied I am no longer seeing the packet loss. I will run some more tests to make sure nothing else is broken, but looks like the original issue is resolved.

Sorry for the late response BTW - I was out on vacation and was only able to do limited testing over the weekend.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ