Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2-next] ss: build the socket cookie with a single shift
@ 2026-11-22  3:36 Frank Dressler
  2026-11-24 21:40 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Dressler @ 2026-11-22  3:36 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, stephen

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>
---
 misc/ss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/ss.c b/misc/ss.c
index f4160f59b1ea..5107d42ac229 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -795,7 +795,7 @@ next:
 
 static 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];
 }
 
 /* Names indexed by a value from the kernel, which may be out of range */

base-commit: 9eee7bb80f98a0789639ccdb0d68a667962e16d6
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-24 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22  3:36 [PATCH iproute2-next] ss: build the socket cookie with a single shift Frank Dressler
2026-11-24 21:40 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox