* [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
@ 2012-07-26 9:20 Eric Dumazet
2012-07-27 0:29 ` Vijay Subramanian
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2012-07-26 9:20 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, Vijay Subramanian
From: Eric Dumazet <edumazet@google.com>
linux-3.6-rc1 supports SK_MEMINFO_BACKLOG with commit d594e987c6f54
(sock_diag: add SK_MEMINFO_BACKLOG)
ss command can display it if provided by the kernel.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
---
include/linux/sock_diag.h | 1 +
misc/ss.c | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 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..d8429cc 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1337,8 +1337,9 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*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)",
+ 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",
skmeminfo[SK_MEMINFO_RMEM_ALLOC],
skmeminfo[SK_MEMINFO_RCVBUF],
skmeminfo[SK_MEMINFO_WMEM_ALLOC],
@@ -1346,7 +1347,13 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
skmeminfo[SK_MEMINFO_FWD_ALLOC],
skmeminfo[SK_MEMINFO_WMEM_QUEUED],
skmeminfo[SK_MEMINFO_OPTMEM]);
- }else if (tb[INET_DIAG_MEMINFO]) {
+
+ if (RTA_PAYLOAD(tb[INET_DIAG_SKMEMINFO]) >=
+ (SK_MEMINFO_BACKLOG + 1) * sizeof(__u32))
+ printf(",bl%u", skmeminfo[SK_MEMINFO_BACKLOG]);
+
+ printf(")");
+ } else if (tb[INET_DIAG_MEMINFO]) {
const struct inet_diag_meminfo *minfo
= RTA_DATA(tb[INET_DIAG_MEMINFO]);
printf(" mem:(r%u,w%u,f%u,t%u)",
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
2012-07-26 9:20 [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG Eric Dumazet
@ 2012-07-27 0:29 ` Vijay Subramanian
2012-07-27 17:08 ` Stephen Hemminger
2012-08-02 0:06 ` Stephen Hemminger
0 siblings, 2 replies; 6+ messages in thread
From: Vijay Subramanian @ 2012-07-27 0:29 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Stephen Hemminger, netdev
On 26 July 2012 02:20, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> linux-3.6-rc1 supports SK_MEMINFO_BACKLOG with commit d594e987c6f54
> (sock_diag: add SK_MEMINFO_BACKLOG)
>
> ss command can display it if provided by the kernel.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
Thanks Eric. I see now how you fixed this.
Tested-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Vijay
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
2012-07-27 0:29 ` Vijay Subramanian
@ 2012-07-27 17:08 ` Stephen Hemminger
2012-07-27 17:11 ` Eric Dumazet
2012-08-02 0:06 ` Stephen Hemminger
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2012-07-27 17:08 UTC (permalink / raw)
To: Vijay Subramanian; +Cc: Eric Dumazet, netdev
I am holding this until after 3.5 iproute2 is released.
Still want to get a couple more features in 3.5 iproute2, the work Pavel is
doing on save/restore cleanup, and the bridge fdb stuff.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
2012-07-27 17:08 ` Stephen Hemminger
@ 2012-07-27 17:11 ` Eric Dumazet
2012-08-02 6:24 ` Shan Wei
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2012-07-27 17:11 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Vijay Subramanian, netdev
On Fri, 2012-07-27 at 10:08 -0700, Stephen Hemminger wrote:
> I am holding this until after 3.5 iproute2 is released.
>
> Still want to get a couple more features in 3.5 iproute2, the work Pavel is
> doing on save/restore cleanup, and the bridge fdb stuff.
>
By the way, it seems "ss -u" still uses /proc/net/udp , and not
inet_diag ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
2012-07-27 0:29 ` Vijay Subramanian
2012-07-27 17:08 ` Stephen Hemminger
@ 2012-08-02 0:06 ` Stephen Hemminger
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2012-08-02 0:06 UTC (permalink / raw)
To: Vijay Subramanian; +Cc: Eric Dumazet, netdev
On Thu, 26 Jul 2012 17:29:26 -0700
Vijay Subramanian <subramanian.vijay@gmail.com> wrote:
> On 26 July 2012 02:20, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > From: Eric Dumazet <edumazet@google.com>
> >
> > linux-3.6-rc1 supports SK_MEMINFO_BACKLOG with commit d594e987c6f54
> > (sock_diag: add SK_MEMINFO_BACKLOG)
> >
> > ss command can display it if provided by the kernel.
> >
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
>
>
> Thanks Eric. I see now how you fixed this.
>
> Tested-by: Vijay Subramanian <subramanian.vijay@gmail.com>
>
> Vijay
Applied (after 3.5.0 release).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG
2012-07-27 17:11 ` Eric Dumazet
@ 2012-08-02 6:24 ` Shan Wei
0 siblings, 0 replies; 6+ messages in thread
From: Shan Wei @ 2012-08-02 6:24 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Stephen Hemminger, Vijay Subramanian, netdev
Eric Dumazet said, at 2012/7/28 1:11:
>
> By the way, it seems "ss -u" still uses /proc/net/udp , and not
> inet_diag ?
Yes, UDP doesn't use inet_diag.
Can you provide a patch, we are willing to see it?
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-02 6:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 9:20 [PATCH iproute2] ss: report SK_MEMINFO_BACKLOG Eric Dumazet
2012-07-27 0:29 ` Vijay Subramanian
2012-07-27 17:08 ` Stephen Hemminger
2012-07-27 17:11 ` Eric Dumazet
2012-08-02 6:24 ` Shan Wei
2012-08-02 0:06 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).