netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: revert to old definition of `before'
@ 2007-01-04 12:54 Gerrit Renker
  2007-01-04 20:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-01-04 12:54 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Hi Dave,

as per earlier email, can you please revert the definition of the
TCP `before' relation: there is code which implicitly depends on it.

Furthermore, this definition appears in textbooks such as Stevens
and therefore, even if the newer definition may have nicer properties,
it is safer to stick with the old one.

--------------------> Patch <-------------------------------------
[TCP]: Use old definition of before

This reverts the new (unambiguous) definition of the TCP `before'
relation. As pointed out in an example by Herbert Xu, there is 
existing code which implicitly requires the old definition in order
to work correctly.


Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---

diff --git a/include/net/tcp.h b/include/net/tcp.h
index b7d8317..cd8fa0c 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -242,7 +242,7 @@ extern int tcp_memory_pressure;
 
 static inline int before(__u32 seq1, __u32 seq2)
 {
-        return (__s32)(seq2-seq1) > 0;
+        return (__s32)(seq1-seq2) < 0;
 }
 #define after(seq2, seq1) 	before(seq1, seq2)
 

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

* Re: [PATCH] tcp: revert to old definition of `before'
  2007-01-04 12:54 [PATCH] tcp: revert to old definition of `before' Gerrit Renker
@ 2007-01-04 20:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-01-04 20:25 UTC (permalink / raw)
  To: gerrit; +Cc: netdev

From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Thu, 4 Jan 2007 12:54:54 +0000

> Hi Dave,
> 
> as per earlier email, can you please revert the definition of the
> TCP `before' relation: there is code which implicitly depends on it.
> 
> Furthermore, this definition appears in textbooks such as Stevens
> and therefore, even if the newer definition may have nicer properties,
> it is safer to stick with the old one.

No problem, patch applied, thanks Gerrit.

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

end of thread, other threads:[~2007-01-04 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04 12:54 [PATCH] tcp: revert to old definition of `before' Gerrit Renker
2007-01-04 20:25 ` 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).