From: Eric Dumazet <dada1@cosmosbay.com>
To: Rick Jones <rick.jones2@hp.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] include listenq max backlog in /proc/net/tcp and include in tcp_info
Date: Tue, 11 Sep 2007 08:54:15 +0200 [thread overview]
Message-ID: <46E63B97.8030304@cosmosbay.com> (raw)
In-Reply-To: <46E63121.5090607@cosmosbay.com>
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
Eric Dumazet a écrit :
> Sridhar Samudrala a écrit :
>> On Mon, 2007-09-10 at 16:13 -0700, Rick Jones wrote:
>>> Return some useful information such as the maximum listen backlog and
>>> the current listen backlog in the tcp_info structure and have that
>>> match what one can see in /proc/net/tcp and /proc/net/tcp6.
>>
>> If we are also exporting max listen backlog, another place to
>> consider adding this is to tcp_diag_get_info() called via INET_DIAG_INFO.
>> Current listen backlog is returned in inet_diag_msg->idiag_rqueue.
>> max listen backlog can be returned in inet_diag_msg->idiag_wqueue.
>>
>
> I agree, /proc/net/tcp is deprecated nowadays...
>
> Rick, could you add this part in your patch, and add my Sign-off-by ?
>
> Thank you
> Eric
One } was missing, sorry
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 684 bytes --]
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 57c5f0b..f5b6275 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -25,11 +25,13 @@ static void tcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
const struct tcp_sock *tp = tcp_sk(sk);
struct tcp_info *info = _info;
- if (sk->sk_state == TCP_LISTEN)
+ if (sk->sk_state == TCP_LISTEN) {
r->idiag_rqueue = sk->sk_ack_backlog;
- else
+ r->idiag_wqueue = sk->sk_max_ack_backlog;
+ } else {
r->idiag_rqueue = tp->rcv_nxt - tp->copied_seq;
- r->idiag_wqueue = tp->write_seq - tp->snd_una;
+ r->idiag_wqueue = tp->write_seq - tp->snd_una;
+ }
if (info != NULL)
tcp_get_info(sk, info);
}
next prev parent reply other threads:[~2007-09-11 7:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 23:13 [PATCH] include listenq max backlog in /proc/net/tcp and include in tcp_info Rick Jones
2007-09-11 0:39 ` Sridhar Samudrala
2007-09-11 6:09 ` Eric Dumazet
2007-09-11 6:54 ` Eric Dumazet [this message]
2007-09-11 17:00 ` Rick Jones
2007-09-11 17:15 ` Eric Dumazet
2007-09-11 17:35 ` Rick Jones
2007-09-11 17:46 ` Sridhar Samudrala
2007-09-11 18:10 ` Rick Jones
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=46E63B97.8030304@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
--cc=sri@us.ibm.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.