Re: [PATCHES]: Two TSO refinements

2005-09-02 Thread Alexey Kuznetsov
Hello! > > > + 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? Anyway, I think this ca

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread Herbert Xu
On Thu, Sep 01, 2005 at 09:44:09PM -0700, David S. Miller wrote: > > Ok, how does this look? Thanks Dave, this one looks perfect. -- 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.

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Subject: Re: [PATCHES]: Two TSO refinements Date: Fri, 2 Sep 2005 14:30:26 +1000 > On Thu, Sep 01, 2005 at 09:28:16PM -0700, David S. Miller wrote: > > > > > Therefore, > > > > > > tp->lost_out >= diff >

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread Herbert Xu
On Thu, Sep 01, 2005 at 09:28:16PM -0700, David S. Miller wrote: > > > Therefore, > > > > tp->lost_out >= diff > > I assume the same applies to tp->left_out as well? Yes it does. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Pag

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Fri, 2 Sep 2005 11:08:12 +1000 > 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) >

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread Herbert Xu
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 th

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Fri, 2 Sep 2005 08:11:37 +1000 > On Thu, Sep 01, 2005 at 03:06:47PM -0700, David S. Miller wrote: > > > > - if (TCP_SKB_CB(buff)->sacked&TCPCB_LOST) { > > - tp->lost_out += tcp_skb_pcount(buff); > > - tp->left_out += tcp_skb_pcount(b

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread David S. Miller
Ok, here is the current version of the patch, and what I intend to push to Linus: diff-tree 4980a059ef42741e80e9efa0dabdf520f9ba0c5a (from 6b39374a27eb4be7e9d82145ae270ba02ea90dc8) Author: David S. Miller <[EMAIL PROTECTED]> Date: Thu Sep 1 15:06:18 2005 -0700 [TCP]: Keep TSO enabled even

Re: [PATCHES]: Two TSO refinements

2005-09-01 Thread Herbert Xu
On Thu, Sep 01, 2005 at 03:06:47PM -0700, David S. Miller wrote: > > - if (TCP_SKB_CB(buff)->sacked&TCPCB_LOST) { > - tp->lost_out += tcp_skb_pcount(buff); > - tp->left_out += tcp_skb_pcount(buff); > + tp->packets_out -= diff; > + if (diff > 0) {

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Tue, 23 Aug 2005 12:50:01 +1000 > Sorry, I didn't mean to say that pkt_len is an incorrect cut-off point, > but that it's not a valid value for the MSS. So I'd like to see > > if (tcp_fragment(sk, skb, pkt_len, TCP_SKB_CB(skb)->tso_size)) >

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread Herbert Xu
On Mon, Aug 22, 2005 at 07:44:59PM -0700, David S. Miller wrote: > > It makes perfect sense. In your example, we want a 2*MSS TSO > frame for the "not-SACKed" area, and the tail 1*MSS frame for > the SACKed area. This provides exactly the necessary granularity > in order to record the received SA

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Mon, 22 Aug 2005 22:54:50 +1000 > > + if (pcount > 1 && > > + (after(start_seq, TCP_SKB_CB(skb)->seq) || > > +before(end_seq, TCP_SKB_CB(skb)->end_seq))) { > > + uns

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Mon, 22 Aug 2005 13:04:31 +1000 > You need to update various counters likes packets_out since you're > changing the skb_pcount of a packet that's on the retransmit queue. Good point. We would now have two spots which need to do the packets_out updates,

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread Herbert Xu
David S. Miller <[EMAIL PROTECTED]> wrote: > + if (pcount > 1 && > + (after(start_seq, TCP_SKB_CB(skb)->seq) || > +before(end_seq, TCP_SKB_CB(skb)->end_seq))) { > + unsigned int pkt_len; > + >

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread Herbert Xu
On Sun, Aug 21, 2005 at 08:57:15PM -0700, David S. Miller wrote: > > Thinking about this some more... why would I need to use > anyting other than "SKB"? SKB is where the front part of > the split data is placed, and skb->next contains the > subsequent data. > > So just using "skb" should be fine

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Mon, 22 Aug 2005 14:21:40 +1000 > > A further simplification seems possible, in that all of the > > tp->*_out modifications can be keyed upon the "skb_ever_sent" > > arg to tcp_fragment(). > > Yes this is a good idea. > > > + if (skb_ever_sent) { >

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread David S. Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Mon, 22 Aug 2005 13:04:31 +1000 > > + > > + fack_count += pcount; > > > >in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && > >!before(end_seq, TCP_SKB_CB(skb)->end_seq); >

Re: [PATCHES]: Two TSO refinements

2005-08-22 Thread Herbert Xu
On Sun, Aug 21, 2005 at 11:29:11PM -0700, David S. Miller wrote: > > Ok, this is a full redo of the "do not disable TSO on loss" patch > including all of the refinements and fixes we've discussed so > far. Thanks Dave. > +extern int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int

Re: [PATCHES]: Two TSO refinements

2005-08-21 Thread David S. Miller
From: "David S. Miller" <[EMAIL PROTECTED]> Date: Sun, 21 Aug 2005 16:35:06 -0700 (PDT) > Attached are two patches dealing with two issues I think should be > addressed in 2.6.13 if possible. Sorry, I attached the wrong patches, let's try this instead. diff-tree b94c07bcb646075b82302616c369b1f30

[PATCHES]: Two TSO refinements

2005-08-21 Thread David S. Miller
Attached are two patches dealing with two issues I think should be addressed in 2.6.13 if possible. The first patch is the TSO deferral logic fix from Dmitry Yusupov. I think it's correct since even if no new data is tacked on, we will keep the pipe filled to the end since the percentage-of-wind