Re: [PATCH v4 2/4] crypto/net/tcp: Use crypto_pool for TCP-MD5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux