From: Jakub Kicinski <kuba@kernel.org>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: David Miller <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH 01/11] xfrm: Add support for per cpu xfrm state handling.
Date: Fri, 15 Nov 2024 18:09:08 -0800 [thread overview]
Message-ID: <20241115180908.1d2c2108@kernel.org> (raw)
In-Reply-To: <20241115083343.2340827-2-steffen.klassert@secunet.com>
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 ?
next prev parent reply other threads:[~2024-11-16 2:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 8:33 [PATCH 0/11] pull request (net-next): ipsec-next 2024-11-15 Steffen Klassert
2024-11-15 8:33 ` [PATCH 01/11] xfrm: Add support for per cpu xfrm state handling Steffen Klassert
2024-11-16 2:09 ` Jakub Kicinski [this message]
2024-11-18 6:23 ` Steffen Klassert
2024-11-18 12:00 ` patchwork-bot+netdevbpf
2024-11-15 8:33 ` [PATCH 02/11] xfrm: Cache used outbound xfrm states at the policy Steffen Klassert
2024-11-15 8:33 ` [PATCH 03/11] xfrm: Add an inbound percpu state cache Steffen Klassert
2024-11-15 8:33 ` [PATCH 04/11] xfrm: Restrict percpu SA attribute to specific netlink message types Steffen Klassert
2024-11-15 8:33 ` [PATCH 05/11] xfrm: Convert xfrm_get_tos() to dscp_t Steffen Klassert
2024-11-15 8:33 ` [PATCH 06/11] xfrm: Convert xfrm_bundle_create() " Steffen Klassert
2024-11-15 8:33 ` [PATCH 07/11] xfrm: Convert xfrm_dst_lookup() " Steffen Klassert
2024-11-15 8:33 ` [PATCH 08/11] xfrm: Convert struct xfrm_dst_lookup_params -> tos " Steffen Klassert
2024-11-15 8:33 ` [PATCH 09/11] xfrm: Add error handling when nla_put_u32() returns an error Steffen Klassert
2024-11-15 8:33 ` [PATCH 10/11] xfrm: replace deprecated strncpy with strscpy_pad Steffen Klassert
2024-11-15 8:33 ` [PATCH 11/11] xfrm: Fix acquire state insertion Steffen Klassert
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=20241115180908.1d2c2108@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/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;
as well as URLs for NNTP newsgroup(s).