Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Stephen Hemminger
Wed, 25 Nov 2026 01:48
[PATCH v2 2/2] ss: build the socket cookie with a single shift
Author: Stephen Hemminger
Date: Wed, 25 Nov 2026 01:48
Date: Wed, 25 Nov 2026 01:48
29 lines
11690 bytes
11690 bytes
From: Frank Dressler <frank@dressler.pro>
The split shift was necessary only while the code used unsigned long.
2e7e805d0aac ("ss: better 32bit support") changed it to unsigned long long.
Signed-off-by: Frank Dressler <frank@dressler.pro>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v2 - handle post ss split up
ss/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ss/sock.c b/ss/sock.c
index ca243f18..879af555 100644
--- a/ss/sock.c
+++ b/ss/sock.c
@@ -12,7 +12,7 @@
unsigned long long cookie_sk_get(const uint32_t *cookie)
{
- return (((unsigned long long)cookie[1] << 31) << 1) | cookie[0];
+ return ((unsigned long long)cookie[1] << 32) | cookie[0];
}
static const char *unix_netid_name(int type)
--
2.53.0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads