[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241115180908.1d2c2108@kernel.org>
Date: Fri, 15 Nov 2024 18:09:08 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Steffen Klassert <steffen.klassert@...unet.com>
Cc: David Miller <davem@...emloft.net>, Herbert Xu
<herbert@...dor.apana.org.au>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 01/11] xfrm: Add support for per cpu xfrm state
handling.
On Fri, 15 Nov 2024 09:33:33 +0100 Steffen Klassert wrote:
> + /* We need the cpu id just as a lookup key,
> + * we don't require it to be stable.
> + */
> + pcpu_id = get_cpu();
> + put_cpu();
Why not smp_processor_id() ?
> + if (attrs[XFRMA_SA_PCPU]) {
> + x->pcpu_num = nla_get_u32(attrs[XFRMA_SA_PCPU]);
> + if (x->pcpu_num >= num_possible_cpus())
> + goto error;
> + }
cpu ids can be sparse, shouldn't it be checking if the CPU is online ?
Powered by blists - more mailing lists