Commit 1536e285 authored by Kenjiro Nakayama's avatar Kenjiro Nakayama Committed by David S. Miller

tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner

This patch adds a TCP_FASTOPEN socket option to get a max backlog on its
listener to getsockopt().
Signed-off-by: default avatarKenjiro Nakayama <nakayamakenjiro@gmail.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ff01dbb
...@@ -2916,6 +2916,14 @@ static int do_tcp_getsockopt(struct sock *sk, int level, ...@@ -2916,6 +2916,14 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
case TCP_USER_TIMEOUT: case TCP_USER_TIMEOUT:
val = jiffies_to_msecs(icsk->icsk_user_timeout); val = jiffies_to_msecs(icsk->icsk_user_timeout);
break; break;
case TCP_FASTOPEN:
if (icsk->icsk_accept_queue.fastopenq != NULL)
val = icsk->icsk_accept_queue.fastopenq->max_qlen;
else
val = 0;
break;
case TCP_TIMESTAMP: case TCP_TIMESTAMP:
val = tcp_time_stamp + tp->tsoffset; val = tcp_time_stamp + tp->tsoffset;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment