From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vijay Subramanian <subramanian.vijay@gmail.com>
Cc: netdev@vger.kernel.org, Stephen Hemminger <shemminger@vyatta.com>
Subject: Re: [PATCH IPROUTE2] ss: Add support for sk_meminfo_backlog
Date: Thu, 07 Jun 2012 06:20:44 +0200 [thread overview]
Message-ID: <1339042844.26966.75.camel@edumazet-glaptop> (raw)
In-Reply-To: <1339024292-4361-1-git-send-email-subramanian.vijay@gmail.com>
On Wed, 2012-06-06 at 16:11 -0700, Vijay Subramanian wrote:
> This adds the ability to print the backlog length of sockets that is provided by
> recent Linux kernels since commit (d594e987c6 sock_diag: add
> SK_MEMINFO_BACKLOG).
>
> Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
> ---
> include/linux/sock_diag.h | 1 +
> misc/ss.c | 5 +++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
> index 39e4b1c..ac9db19 100644
> --- a/include/linux/sock_diag.h
> +++ b/include/linux/sock_diag.h
> @@ -18,6 +18,7 @@ enum {
> SK_MEMINFO_FWD_ALLOC,
> SK_MEMINFO_WMEM_QUEUED,
> SK_MEMINFO_OPTMEM,
> + SK_MEMINFO_BACKLOG,
>
> SK_MEMINFO_VARS,
> };
> diff --git a/misc/ss.c b/misc/ss.c
> index cf529ef..ea14e2b 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -1338,14 +1338,15 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
>
> if (tb[INET_DIAG_SKMEMINFO]) {
> const __u32 *skmeminfo = RTA_DATA(tb[INET_DIAG_SKMEMINFO]);
> - printf(" skmem:(r%u,rb%u,t%u,tb%u,f%u,w%u,o%u)",
> + printf(" skmem:(r%u,rb%u,t%u,tb%u,f%u,w%u,o%u,bl%u)",
> skmeminfo[SK_MEMINFO_RMEM_ALLOC],
> skmeminfo[SK_MEMINFO_RCVBUF],
> skmeminfo[SK_MEMINFO_WMEM_ALLOC],
> skmeminfo[SK_MEMINFO_SNDBUF],
> skmeminfo[SK_MEMINFO_FWD_ALLOC],
> skmeminfo[SK_MEMINFO_WMEM_QUEUED],
> - skmeminfo[SK_MEMINFO_OPTMEM]);
> + skmeminfo[SK_MEMINFO_OPTMEM],
> + skmeminfo[SK_MEMINFO_BACKLOG]);
> }else if (tb[INET_DIAG_MEMINFO]) {
> const struct inet_diag_meminfo *minfo
> = RTA_DATA(tb[INET_DIAG_MEMINFO]);
This is not the right way to handle this.
I already have a patch and was waiting the appropriate time to submit
it.
Thanks
next prev parent reply other threads:[~2012-06-07 4:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 23:11 [PATCH IPROUTE2] ss: Add support for sk_meminfo_backlog Vijay Subramanian
2012-06-06 23:23 ` Stephen Hemminger
2012-06-07 4:20 ` Eric Dumazet [this message]
2012-06-07 5:18 ` Vijay Subramanian
2012-06-07 5:32 ` Eric Dumazet
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=1339042844.26966.75.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=subramanian.vijay@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox