From: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Neal Cardwell <ncardwell@google.com>,
Netdev <netdev@vger.kernel.org>,
Yuchung Cheng <ycheng@google.com>,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH v3] tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner
Date: Thu, 17 Apr 2014 01:25:01 +0900 [thread overview]
Message-ID: <87a9bljl7m.fsf@gmail.com> (raw)
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>
---
net/ipv4/tcp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4bd6d52..eb1dde3 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -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;
--
1.9.0
next reply other threads:[~2014-04-16 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 16:25 Kenjiro Nakayama [this message]
2014-04-19 0:42 ` [PATCH v3] tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner Neal Cardwell
2014-04-20 22:19 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9bljl7m.fsf@gmail.com \
--to=nakayamakenjiro@gmail.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.