[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85bdd00e-832f-47de-9822-6c8ae090701d@suse.de>
Date: Wed, 21 May 2025 12:16:08 +0200
From: Hannes Reinecke <hare@...e.de>
To: Eric Biggers <ebiggers@...nel.org>, netdev@...r.kernel.org
Cc: linux-nvme@...ts.infradead.org, linux-sctp@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Sagi Grimberg <sagi@...mberg.me>, Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH v2 08/10] net: add skb_copy_and_crc32c_datagram_iter()
On 5/19/25 19:50, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@...gle.com>
>
> Since skb_copy_and_hash_datagram_iter() is used only with CRC32C, the
> crypto_ahash abstraction provides no value. Add
> skb_copy_and_crc32c_datagram_iter() which just calls crc32c() directly.
>
> This is faster and simpler. It also doesn't have the weird dependency
> issue where skb_copy_and_hash_datagram_iter() depends on
> CONFIG_CRYPTO_HASH=y without that being expressed explicitly in the
> kconfig (presumably because it was too heavyweight for NET to select).
> The new function is conditional on the hidden boolean symbol NET_CRC32C,
> which selects CRC32. So it gets compiled only when something that
> actually needs CRC32C packet checksums is enabled, it has no implicit
> dependency, and it doesn't depend on the heavyweight crypto layer.
>
> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> ---
> include/linux/skbuff.h | 2 ++
> net/core/datagram.c | 33 +++++++++++++++++++++++++++++++++
> 2 files changed, 35 insertions(+)
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Powered by blists - more mailing lists