* [PATCH iproute2] ss: add SK_MEMINFO_DROPS display
@ 2016-04-21 12:19 Eric Dumazet
2016-04-22 17:21 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2016-04-21 12:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
SK_MEMINFO_DROPS is added in linux-4.7 for TCP, UDP and SCTP
skmem will display the socket drop count using d prefix as in :
$ ss -tm src :22 | more
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 52 10.246.7.151:ssh 172.20.10.101:50759
skmem:(r0,rb8388608,t0,tb8388608,f1792,w2304,o0,bl0,d0)
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/linux/sock_diag.h | 1 +
misc/ss.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index dafcb89..901231e 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -20,6 +20,7 @@ enum {
SK_MEMINFO_WMEM_QUEUED,
SK_MEMINFO_OPTMEM,
SK_MEMINFO_BACKLOG,
+ SK_MEMINFO_DROPS,
SK_MEMINFO_VARS,
};
diff --git a/misc/ss.c b/misc/ss.c
index deefc96..3258584 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1905,6 +1905,10 @@ static void print_skmeminfo(struct rtattr *tb[], int attrtype)
(SK_MEMINFO_BACKLOG + 1) * sizeof(__u32))
printf(",bl%u", skmeminfo[SK_MEMINFO_BACKLOG]);
+ if (RTA_PAYLOAD(tb[attrtype]) >=
+ (SK_MEMINFO_DROPS + 1) * sizeof(__u32))
+ printf(",d%u", skmeminfo[SK_MEMINFO_DROPS]);
+
printf(")");
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] ss: add SK_MEMINFO_DROPS display
2016-04-21 12:19 [PATCH iproute2] ss: add SK_MEMINFO_DROPS display Eric Dumazet
@ 2016-04-22 17:21 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2016-04-22 17:21 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
On Thu, 21 Apr 2016 05:19:04 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> SK_MEMINFO_DROPS is added in linux-4.7 for TCP, UDP and SCTP
>
> skmem will display the socket drop count using d prefix as in :
>
> $ ss -tm src :22 | more
> State Recv-Q Send-Q Local Address:Port Peer Address:Port
> ESTAB 0 52 10.246.7.151:ssh 172.20.10.101:50759
> skmem:(r0,rb8388608,t0,tb8388608,f1792,w2304,o0,bl0,d0)
Applied to net-next, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-22 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 12:19 [PATCH iproute2] ss: add SK_MEMINFO_DROPS display Eric Dumazet
2016-04-22 17:21 ` 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).