From: Frank Dressler <frank@dressler.pro>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, stephen@networkplumber.org
Subject: [PATCH iproute2-next] ss: build the socket cookie with a single shift
Date: Sun, 22 Nov 2026 03:36:57 +0000 [thread overview]
Message-ID: <20261122033657.187703-1-frank@dressler.pro> (raw)
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
next reply other threads:[~2026-11-22 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 3:36 Frank Dressler [this message]
2026-11-24 21:40 ` [PATCH iproute2-next] ss: build the socket cookie with a single shift 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=20261122033657.187703-1-frank@dressler.pro \
--to=frank@dressler.pro \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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