[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8kUXR9BLk9Uzw1i@gondor.apana.org.au>
Date: Thu, 19 Jan 2023 17:58:53 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Dmitry Safonov <dima@...sta.com>
Cc: linux-kernel@...r.kernel.org, David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Andy Lutomirski <luto@...capital.net>,
Bob Gilligan <gilligan@...sta.com>,
Dmitry Safonov <0x7f454c46@...il.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Leonard Crestez <cdleonard@...il.com>,
Paolo Abeni <pabeni@...hat.com>,
Salam Noureddine <noureddine@...sta.com>,
netdev@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: Re: [PATCH v4 2/4] crypto/net/tcp: Use crypto_pool for TCP-MD5
On Wed, Jan 18, 2023 at 09:41:09PM +0000, Dmitry Safonov wrote:
> Use crypto_pool API that was designed with tcp_md5sig_pool in mind.
> The conversion to use crypto_pool will allow:
> - to reuse ahash_request(s) for different users
> - to allocate only one per-CPU scratch buffer rather than a new one for
> each user
> - to have a common API for net/ users that need ahash on RX/TX fast path
>
> Signed-off-by: Dmitry Safonov <dima@...sta.com>
> ---
> include/net/tcp.h | 24 +++------
> net/ipv4/Kconfig | 1 +
> net/ipv4/tcp.c | 104 ++++++++++-----------------------------
> net/ipv4/tcp_ipv4.c | 100 +++++++++++++++++++++----------------
> net/ipv4/tcp_minisocks.c | 21 +++++---
> net/ipv6/tcp_ipv6.c | 61 +++++++++++------------
> 6 files changed, 135 insertions(+), 176 deletions(-)
I think the best option for the legacy tcp md5 code is to move
md5 over to lib/crypto like sha1 and invoke it that way.
Going through the generic Crypto API when you use a single algorithm
in synchronous mode is pointless.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists