diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/inet_connection_sock.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 5fbe6568c3cf..848e85cb5c61 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
| @@ -242,6 +242,15 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what, | |||
| 242 | #endif | 242 | #endif |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | static inline unsigned long | ||
| 246 | inet_csk_rto_backoff(const struct inet_connection_sock *icsk, | ||
| 247 | unsigned long max_when) | ||
| 248 | { | ||
| 249 | u64 when = (u64)icsk->icsk_rto << icsk->icsk_backoff; | ||
| 250 | |||
| 251 | return (unsigned long)min_t(u64, when, max_when); | ||
| 252 | } | ||
| 253 | |||
| 245 | struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); | 254 | struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); |
| 246 | 255 | ||
| 247 | struct request_sock *inet_csk_search_req(const struct sock *sk, | 256 | struct request_sock *inet_csk_search_req(const struct sock *sk, |
