netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it
@ 2007-03-28 13:31 Ilpo Järvinen
  2007-03-28 19:07 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2007-03-28 13:31 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 899 bytes --]

Stupid error from my side. Even though now that I noticed this,
I hoped it would have been an optimization but no, the counter
hint is then incorrect. Thus clearing is necessary for now (I
still suspect though that this path is never executed).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 net/ipv4/tcp_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7a59ffe..c855791 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1763,7 +1763,7 @@ static void tcp_verify_retransmit_hint(s
 	    !(TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_RETRANS) &&
 	    before(TCP_SKB_CB(skb)->seq,
 	    TCP_SKB_CB(tp->retransmit_skb_hint)->seq))
-		tp->retransmit_skb_hint = skb;
+		tp->retransmit_skb_hint = NULL;
 }
 
 /* Forward walk starting from until a not timedout skb is encountered, timeout
-- 
1.4.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it
  2007-03-28 13:31 [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it Ilpo Järvinen
@ 2007-03-28 19:07 ` David Miller
  2007-03-28 19:14   ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2007-03-28 19:07 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: netdev

From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Wed, 28 Mar 2007 16:31:50 +0300 (EEST)

> Stupid error from my side. Even though now that I noticed this,
> I hoped it would have been an optimization but no, the counter
> hint is then incorrect. Thus clearing is necessary for now (I
> still suspect though that this path is never executed).
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

Better safe than sorry :-)

We can start putting more aggressive assertions around if you'd
like to get some invariants like that validated.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it
  2007-03-28 19:07 ` David Miller
@ 2007-03-28 19:14   ` David Miller
  2007-03-28 19:29     ` Ilpo Järvinen
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2007-03-28 19:14 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: netdev

From: David Miller <davem@davemloft.net>
Date: Wed, 28 Mar 2007 12:07:09 -0700 (PDT)

> From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
> Date: Wed, 28 Mar 2007 16:31:50 +0300 (EEST)
> 
> > Stupid error from my side. Even though now that I noticed this,
> > I hoped it would have been an optimization but no, the counter
> > hint is then incorrect. Thus clearing is necessary for now (I
> > still suspect though that this path is never executed).
> > 
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> 
> Better safe than sorry :-)
> 
> We can start putting more aggressive assertions around if you'd
> like to get some invariants like that validated.

In case it's not clear I did apply this patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it
  2007-03-28 19:14   ` David Miller
@ 2007-03-28 19:29     ` Ilpo Järvinen
  2007-03-28 19:39       ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2007-03-28 19:29 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1245 bytes --]

On Wed, 28 Mar 2007, David Miller wrote:

> From: David Miller <davem@davemloft.net>
> Date: Wed, 28 Mar 2007 12:07:09 -0700 (PDT)
> 
> > From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
> > Date: Wed, 28 Mar 2007 16:31:50 +0300 (EEST)
> > 
> > > Stupid error from my side. Even though now that I noticed this,
> > > I hoped it would have been an optimization but no, the counter
> > > hint is then incorrect. Thus clearing is necessary for now (I
> > > still suspect though that this path is never executed).
> > > 
> > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> > 
> > Better safe than sorry :-)
> > 
> > We can start putting more aggressive assertions around if you'd
> > like to get some invariants like that validated.
> 
> In case it's not clear I did apply this patch.

I think more this on Friday, maybe WARN_ON could be placed there so that 
no harm is being done if it ever get there, probably a candidate for 
unlikely, if this is really needed. Anyway, applying the NULL this patch 
does no harm (it was supposed to be that way right from the
beginning)... :-)

...but lets keep in mind that the actual goal is, of course, to get rid of 
the hint altogether, rather than doing these clearing things... :-)

-- 
 i.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it
  2007-03-28 19:29     ` Ilpo Järvinen
@ 2007-03-28 19:39       ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2007-03-28 19:39 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: netdev

From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Wed, 28 Mar 2007 22:29:05 +0300 (EEST)

> ...but lets keep in mind that the actual goal is, of course, to get rid of 
> the hint altogether, rather than doing these clearing things... :-)

Of course.

The retranmit and forward SKB hints should be easy to kill.
In the worst case we can use the cached SACK sequence numbers
and perhaps one auxiliary sequence number hint to guide the
RB tree search for SKBs to retransmit.

A space intensive, and therefore not very appealing, scheme
is to have a linked list of SKBs which have been marked lost.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-28 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 13:31 [PATCH] [TCP]: Rexmit hint must be cleared instead of setting it Ilpo Järvinen
2007-03-28 19:07 ` David Miller
2007-03-28 19:14   ` David Miller
2007-03-28 19:29     ` Ilpo Järvinen
2007-03-28 19:39       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).