On Thu, Sep 01, 2005 at 05:53:03PM -0700, David S. Miller wrote:
> 
> > > +                         tp->lost_out -= diff;
> > > +                         if ((int)tp->lost_out < 0)
> > > +                                 tp->lost_out = 0;
> > 
> > These checks aren't necessary.
> 
> Are you sure this can't happen if the MSS changes?

Yes, because

        diff = pcount(orig_skb) - (pcount(skb) + pcount(buff))
             <= pcount(orig_skb)

Now if orig_skb is marked as TCPCB_LOST, then by definition

        tp->lost_out >= pcount(orig_skb)

Therefore,

        tp->lost_out >= diff

It's the same reason why we don't check this for packets_out.  fackets_out
is the odd one out because it's determined by the number of packets the
peer has ACKed which doesn't necessarily encompass orig_skb.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to