Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242626
b: refs/heads/master
c: 67d4120
h: refs/heads/master
v: v3
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Mar 23, 2011
1 parent 76443f2 commit 038a19d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7bff75b087e7a355838a32efe61707cfa73c194
refs/heads/master: 67d4120a1793138bc9f4a6eb61d0fc5298ed97e0
12 changes: 7 additions & 5 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2659,7 +2659,7 @@ static void DBGUNDO(struct sock *sk, const char *msg)
#define DBGUNDO(x...) do { } while (0)
#endif

static void tcp_undo_cwr(struct sock *sk, const int undo)
static void tcp_undo_cwr(struct sock *sk, const int undo_ssthresh)
{
struct tcp_sock *tp = tcp_sk(sk);

Expand All @@ -2671,14 +2671,13 @@ static void tcp_undo_cwr(struct sock *sk, const int undo)
else
tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh << 1);

if (undo && tp->prior_ssthresh > tp->snd_ssthresh) {
if (undo_ssthresh && tp->prior_ssthresh > tp->snd_ssthresh) {
tp->snd_ssthresh = tp->prior_ssthresh;
TCP_ECN_withdraw_cwr(tp);
}
} else {
tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh);
}
tcp_moderate_cwnd(tp);
tp->snd_cwnd_stamp = tcp_time_stamp;
}

Expand Down Expand Up @@ -2822,8 +2821,11 @@ static int tcp_try_undo_loss(struct sock *sk)
static inline void tcp_complete_cwr(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
tp->snd_cwnd_stamp = tcp_time_stamp;
/* Do not moderate cwnd if it's already undone in cwr or recovery */
if (tp->undo_marker && tp->snd_cwnd > tp->snd_ssthresh) {
tp->snd_cwnd = tp->snd_ssthresh;
tp->snd_cwnd_stamp = tcp_time_stamp;
}
tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR);
}

Expand Down

0 comments on commit 038a19d

Please sign in to comment.