From: Stephen Hemminger <stephen@networkplumber.org>
To: Frank Dressler <frank@dressler.pro>
Cc: netdev@vger.kernel.org, dsahern@kernel.org
Subject: Re: [PATCH iproute2-next] ss: build the socket cookie with a single shift
Date: Tue, 24 Nov 2026 13:40:14 -0800 [thread overview]
Message-ID: <20261124134014.6999b835@phoenix.local> (raw)
In-Reply-To: <20261122033657.187703-1-frank@dressler.pro>
On Sun, 22 Nov 2026 03:36:57 +0000
Frank Dressler <frank@dressler.pro> wrote:
> 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
LGTM but I refactored ss into multiple files. So will need fix after rebase
prev parent reply other threads:[~2026-11-24 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 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=20261124134014.6999b835@phoenix.local \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.