Netdev List
 help / color / mirror / Atom feed
From: Damian Lukowski <damian@tvk.rwth-aachen.de>
To: Netdev <netdev@vger.kernel.org>
Subject: [PATCH 3/3][v2] tcp: fix ICMP-RTO war: Code beautification
Date: Fri, 29 Jan 2010 23:16:05 +0100	[thread overview]
Message-ID: <4B635E25.8080502@tvk.rwth-aachen.de> (raw)

Rearranged functions and removed function prototype.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
---
 include/net/tcp.h |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index ff6cbaa..2a9ced8 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -528,7 +528,17 @@ static inline void tcp_bound_rto(const struct sock *sk)
 		inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
 }
 
-static inline u32 tcp_rto_min(struct sock *sk);
+/* Compute the actual rto_min value */
+static inline u32 tcp_rto_min(struct sock *sk)
+{
+	struct dst_entry *dst = __sk_dst_get(sk);
+	u32 rto_min = TCP_RTO_MIN;
+
+	if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
+		rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
+	return rto_min;
+}
+
 static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
 {
 	u32 rto = (tp->srtt >> 3) + tp->rttvar;
@@ -559,17 +569,6 @@ static inline void tcp_fast_path_check(struct sock *sk)
 		tcp_fast_path_on(tp);
 }
 
-/* Compute the actual rto_min value */
-static inline u32 tcp_rto_min(struct sock *sk)
-{
-	struct dst_entry *dst = __sk_dst_get(sk);
-	u32 rto_min = TCP_RTO_MIN;
-
-	if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
-		rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
-	return rto_min;
-}
-
 /* Compute the actual receive window we are currently advertising.
  * Rcv_nxt can be after the window if our peer push more data
  * than the offered window.
-- 
1.6.4.4


                 reply	other threads:[~2010-01-29 22:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4B635E25.8080502@tvk.rwth-aachen.de \
    --to=damian@tvk.rwth-aachen.de \
    --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