diff options
author | Yuchung Cheng <ycheng@google.com> | 2015-10-16 21:57:44 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-21 07:00:45 -0700 |
commit | 77c631273dc1305a89698929decafa6e43bea645 (patch) | |
tree | 0b787f4e263d28a3a9f19f03c6ee4ae517435828 /net/ipv4/tcp_input.c | |
parent | af82f4e84866ecd360a53f770d6217637116e6c1 (diff) | |
download | op-kernel-dev-77c631273dc1305a89698929decafa6e43bea645.zip op-kernel-dev-77c631273dc1305a89698929decafa6e43bea645.tar.gz |
tcp: add tcp_tsopt_ecr_before helper
a helper to prepare the main RACK patch
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5a77689..1e97e73 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2250,14 +2250,19 @@ static inline void tcp_moderate_cwnd(struct tcp_sock *tp) tp->snd_cwnd_stamp = tcp_time_stamp; } +static bool tcp_tsopt_ecr_before(const struct tcp_sock *tp, u32 when) +{ + return tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && + before(tp->rx_opt.rcv_tsecr, when); +} + /* Nothing was retransmitted or returned timestamp is less * than timestamp of the first retransmission. */ static inline bool tcp_packet_delayed(const struct tcp_sock *tp) { return !tp->retrans_stamp || - (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && - before(tp->rx_opt.rcv_tsecr, tp->retrans_stamp)); + tcp_tsopt_ecr_before(tp, tp->retrans_stamp); } /* Undo procedures. */ |