Skip to contentSkip to conversation

iproute2 tools for 2.6.31

PATCH In review Stephen Hemminger 2 participants 5 messages Sep 10, 2009 – Sep 11, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 8 lines · Stephen Hemminger

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.

---

misc/ss.c +2 -1
index 651fe3b..2447186 100644
@@ -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");
#2 lore raw
Quoted 10 lines · Eric Dumazet
Quoted 8 lines · Stephen Hemminger

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.

Quoted 9 lines

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

Oops I meant ffff810036e40c80, sorry for the copy/paste error ;)

Quoted 41 lines

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.

---

misc/ss.c +2 -1
index 651fe3b..2447186 100644
@@ -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");
#3 lore raw

PATCH 1/1 ss: adds a space before congestion string

In reply to Stephen Hemminger
Quoted 7 lines · Stephen Hemminger

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.

Another patch would be nice too :

ss -io

ESTAB 0 0 55.225.18.16:52668 55.225.18.187:49531

         sackbic wscale:2,6 rto:219 rtt:19.75/16.5 ato:40 cwnd:4 send 2.4Mbps rcv_space:5840

Note the 'sackbic' string, instead of sack bic ?

Thanks

[PATCH] ss: adds a space before congestion string

---

misc/ss.c +1 -1
index 651fe3b..9396468 100644
@@ -1302,7 +1302,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
 		}
 
 		if (tb[INET_DIAG_CONG])
-			printf("%s", (char *) RTA_DATA(tb[INET_DIAG_CONG]));
+			printf(" %s", (char *) RTA_DATA(tb[INET_DIAG_CONG]));
 
 		if (info->tcpi_options & TCPI_OPT_WSCALE)
 			printf(" wscale:%d,%d", info->tcpi_snd_wscale,
#4 lore raw

Re: [PATCH iproute2] ss: adds a space before congestion string

On Fri, 11 Sep 2009 10:32:29 +0200
Eric Dumazet <[email protected]> wrote:

Both ss patches applied.