netdev
[Top] [All Lists]

Re: [PATCH 2.6]: Fix suboptimal fragment sizing for last fragment

To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 2.6]: Fix suboptimal fragment sizing for last fragment
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Sep 2004 09:15:57 +1000
Cc: davem@xxxxxxxxxx, kaber@xxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040903.104050.29603454.yoshfuji@xxxxxxxxxxxxxx>
References: <4137681D.3000902@xxxxxxxxx> <20040902144436.2c8c1337.davem@xxxxxxxxxx> <20040902220343.GA3250@xxxxxxxxxxxxxxxxxxx> <20040903.104050.29603454.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Fri, Sep 03, 2004 at 10:40:50AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
>
> @@ -1026,18 +1033,22 @@
>  
>       while (size > 0) {
>               int i;
> -             if ((len = mtu - skb->len) <= 0) {
> +
> +             /* Check if the remaining data fits into current packet. */
> +             len = mtu - skb->len;
> +             if (len > size)
> +                     len = maxfraglen - skb->len;

I think that should be len < size, right?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>