From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, Frank Dressler <frank@dressler.pro>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 2/2] ss: build the socket cookie with a single shift
Date: Tue, 24 Nov 2026 17:48:27 -0800 [thread overview]
Message-ID: <20261125014929.338108-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20261125014929.338108-1-stephen@networkplumber.org>
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
prev parent reply other threads:[~2026-11-25 1:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 1:48 [PATCH v2 1/2] ss: move to its own directory and split up ss.c Stephen Hemminger
2026-11-25 1:48 ` Stephen Hemminger [this message]
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=20261125014929.338108-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=frank@dressler.pro \
--cc=netdev@vger.kernel.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