mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 12:20:52 +07:00
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: Kenjiro Nakayama <nakayamakenjiro@gmail.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6ff01dbb11
commit
1536e2857b
@ -2916,6 +2916,14 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
|
||||
case TCP_USER_TIMEOUT:
|
||||
val = jiffies_to_msecs(icsk->icsk_user_timeout);
|
||||
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:
|
||||
val = tcp_time_stamp + tp->tsoffset;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user