From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Subject: Re: iproute2 tools for 2.6.31
Date: Fri, 11 Sep 2009 09:48:07 +0200 [thread overview]
Message-ID: <4AAA00B7.9030904@gmail.com> (raw)
In-Reply-To: <20090910120416.6fd03d1f@s6510>
Stephen Hemminger a écrit :
> I am putting together release for 2.6.31 based tools.
> The only open issue is how to deal with the error handling in commands
> that do monitoring filtering. Right now leaning towards the two socket
> solution.
>
> So if you have anything else that you have been waiting for,
> please drop me a note.
>
One thing that is IMHO strange is the output of sk information
on 64 bits (x86_64 for example)
# ss -e dst 55.225.18.6
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 55.225.18.96:9273 55.225.18.6:37405 timer:(keepalive,20min,0) ino:57807651 sk:36e40c80ffff8100
True sk pointer is ffff8100ffff8100, not 36e40c80ffff8100
ss/misc.c
printf(" sk:%08x", r->id.idiag_cookie[0]);
if (r->id.idiag_cookie[1] != 0)
printf("%08x", r->id.idiag_cookie[1]);
while kernel does :
r->id.idiag_cookie[0] = (u32)(unsigned long)sk;
r->id.idiag_cookie[1] = (u32)(((unsigned long)sk >> 31) >> 1);
What do you think of following patch ?
[PATCH] ss: correct display of sk pointer
On 64bit arches, sk pointer was 32/32 reversed.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/misc/ss.c b/misc/ss.c
index 651fe3b..2447186 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1393,9 +1393,10 @@ static int tcp_show_sock(struct nlmsghdr *nlh, struct filter *f)
if (r->idiag_uid)
printf(" uid:%u", (unsigned)r->idiag_uid);
printf(" ino:%u", r->idiag_inode);
- printf(" sk:%08x", r->id.idiag_cookie[0]);
+ printf(" sk:");
if (r->id.idiag_cookie[1] != 0)
printf("%08x", r->id.idiag_cookie[1]);
+ printf("%08x", r->id.idiag_cookie[0]);
}
if (show_mem || show_tcpinfo) {
printf("\n\t");
next prev parent reply other threads:[~2009-09-11 7:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 19:04 iproute2 tools for 2.6.31 Stephen Hemminger
2009-09-11 7:48 ` Eric Dumazet [this message]
2009-09-11 7:51 ` Eric Dumazet
2009-09-11 8:32 ` [PATCH iproute2] ss: adds a space before congestion string Eric Dumazet
2009-09-11 15:07 ` Stephen Hemminger
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=4AAA00B7.9030904@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).