netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] tcp: revert to old definition of `before'
Date: Thu, 4 Jan 2007 12:54:54 +0000	[thread overview]
Message-ID: <200701041254.55007@strip-the-willow> (raw)

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)
 

             reply	other threads:[~2007-01-04 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 12:54 Gerrit Renker [this message]
2007-01-04 20:25 ` [PATCH] tcp: revert to old definition of `before' David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701041254.55007@strip-the-willow \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).