From: Baruch Even <[EMAIL PROTECTED]> Date: Thu, 1 Feb 2007 09:22:52 +0200
> * David Miller <[EMAIL PROTECTED]> [070131 22:52]: > > We should never see a SACK block from sequence zero to zero, > > which would be an empty SACK block. > > That would work as well at the cost of extra writing to memory for each > ack packet. Though I won't guess what is worse, the extra memory used or > the extra writing. Good point. The recv_sack_cache is 32-bytes, so sits in at most 2 cache lines. The writes are consequetive and in order so would compress into cpu store buffers. But it's definitely not free. :-) > > Something like the following? > > > > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > > index c26076f..84cd722 100644 > > --- a/net/ipv4/tcp_input.c > > +++ b/net/ipv4/tcp_input.c > > @@ -999,6 +1001,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct > > sk_buff *ack_skb, u32 prior_snd_ > > return 0; > > } > > } > > + for (; i <= 4; i++) { > > That won't work though, the <= should be <, I've actually used > ARRAY_SIZE just to be on the safe side. Thanks for catching that. - 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