]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipv6: sr: Use HMAC-SHA1 and HMAC-SHA256 library functions
authorEric Biggers <ebiggers@kernel.org>
Sun, 24 Aug 2025 01:36:43 +0000 (21:36 -0400)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 Aug 2025 01:11:29 +0000 (18:11 -0700)
commit095928e7d80186c524013a5b5d54889fa2ec1eaa
tree894ac3ad95444d9e029b735e6726eac1f334390a
parentf19434dd414e3a1d08ccfbc8f73b5201023aad9d
ipv6: sr: Use HMAC-SHA1 and HMAC-SHA256 library functions

Use the HMAC-SHA1 and HMAC-SHA256 library functions instead of
crypto_shash.  This is simpler and faster.  Pre-allocating per-CPU hash
transformation objects and descriptors is no longer needed, and a
microbenchmark on x86_64 shows seg6_hmac_compute() (with HMAC-SHA256)
dropping from ~2494 cycles to ~1978 cycles, a 20% improvement.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20250824013644.71928-2-ebiggers@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/seg6_hmac.h
net/ipv6/Kconfig
net/ipv6/seg6.c
net/ipv6/seg6_hmac.c