Skip to contentSkip to conversation

net-next-2.6: SYN retransmits: Rename threshold variable

PATCH In review Damian Lukowski 2 participants 3 messages Sep 28, 2010 – Oct 1, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net-next-2.6: SYN retransmits: Rename threshold variable

This preparatory patch renames the threshold variable in retransmits_timed_out() for proper code style.

---
 net/ipv4/tcp_timer.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
net/ipv4/tcp_timer.c +5 -5
index baea4a1..98cbc60 100644
@@ -141,7 +141,7 @@ static bool retransmits_timed_out(struct sock *sk,
 				  unsigned int boundary,
 				  unsigned int timeout)
 {
-	unsigned int linear_backoff_thresh, start_ts;
+	unsigned int backoff_thresh, start_ts;
 
 	if (!inet_csk(sk)->icsk_retransmits)
 		return false;
@@ -152,13 +152,13 @@ static bool retransmits_timed_out(struct sock *sk,
 		start_ts = tcp_sk(sk)->retrans_stamp;
 
 	if (likely(timeout == 0)) {
-		linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
+		backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN);
 
-		if (boundary <= linear_backoff_thresh)
+		if (boundary <= backoff_thresh)
 			timeout = ((2 << boundary) - 1) * TCP_RTO_MIN;
 		else
-			timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN +
-				(boundary - linear_backoff_thresh) * TCP_RTO_MAX;
+			timeout = ((2 << backoff_thresh) - 1) * TCP_RTO_MIN +
+				  (boundary - backoff_thresh) * TCP_RTO_MAX;
 	}
 	return (tcp_time_stamp - start_ts) >= timeout;
 }
Signature · 1 line
1.7.2.2
maintainer
#1 lore raw

Damian please don't do things like this.

When we make a change in net-2.6, that change is going to propagate into net-next-2.6 the next time I do a merge.

And in this case here, the addition of the "syn_set" boolean argument to retransmits_timed_out() will happen at that point.

So if anything, you should build on top of the bug fix we put into net-2.6 instead of duplicating the change.

Adding the same change in two different ways to net-2.6 and net-next-2.6 makes the merge a pain in the neck for me and just makes things look real confusing.

I'm not applying these two patches, please ask me to merge net-2.6 into net-next-2.6 and this way you can code them relative to that.

Thanks!

#2 lore raw

Am Donnerstag, den 30.09.2010, 17:23 -0700 schrieb David Miller:

Quoted 1 line

Damian please don't do things like this.

No problem. It was just for preventing the merge conflict Stephen experienced, as I've seen that parameters have changed in net-next-2.6 already.

Damian

Quoted 17 lines

When we make a change in net-2.6, that change is going to propagate into net-next-2.6 the next time I do a merge.

And in this case here, the addition of the "syn_set" boolean argument to retransmits_timed_out() will happen at that point.

So if anything, you should build on top of the bug fix we put into net-2.6 instead of duplicating the change.

Adding the same change in two different ways to net-2.6 and net-next-2.6 makes the merge a pain in the neck for me and just makes things look real confusing.

I'm not applying these two patches, please ask me to merge net-2.6 into net-next-2.6 and this way you can code them relative to that.

Thanks!