linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Zhihang Shao <zhihang.shao.iscas@gmail.com>
To: Eric Biggers <ebiggers@kernel.org>, linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	x86@kernel.org, Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH 00/11] Wire up CRC-T10DIF library functions to arch-optimized code
Date: Tue, 19 Nov 2024 18:29:45 +0800	[thread overview]
Message-ID: <72406e89-7dee-4063-ad8a-1d63ddc5bfe6@gmail.com> (raw)
In-Reply-To: <20241117002244.105200-1-ebiggers@kernel.org>

On 2024/11/17 8:22, Eric Biggers wrote:

This patchset is also available in git via:

     git fetch 
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git 
crc-t10dif-lib-v1

This patchset updates the kernel's CRC-T10DIF library functions to be
directly optimized for x86, arm, arm64, and powerpc without taking an
unnecessary and inefficient detour through the crypto API.  It follows
the same approach that I'm taking for CRC32 in the patchset
https://lore.kernel.org/linux-crypto/20241103223154.136127-1-ebiggers@kernel.org

This patchset also adds a CRC KUnit test suite that covers multiple CRC
variants, and deletes some older ad-hoc tests that are obsoleted by it.

This patchset has several dependencies including my CRC32 patchset and
patches queued in several trees for 6.13.  It can be retrieved from git
using the command given above.  This is targeting 6.14.

Eric Biggers (11):
   lib/crc-t10dif: stop wrapping the crypto API
   lib/crc-t10dif: add support for arch overrides
   crypto: crct10dif - expose arch-optimized lib function
   x86/crc-t10dif: expose CRC-T10DIF function through lib
   arm/crc-t10dif: expose CRC-T10DIF function through lib
   arm64/crc-t10dif: expose CRC-T10DIF function through lib
   powerpc/crc-t10dif: expose CRC-T10DIF function through lib
   lib/crc_kunit.c: add KUnit test suite for CRC library functions
   lib/crc32test: delete obsolete crc32test.c
   powerpc/crc: delete obsolete crc-vpmsum_test.c
   MAINTAINERS: add entry for CRC library

  MAINTAINERS                                   |  11 +
  arch/arm/Kconfig                              |   1 +
  arch/arm/crypto/Kconfig                       |  11 -
  arch/arm/crypto/Makefile                      |   2 -
  arch/arm/crypto/crct10dif-ce-glue.c           | 124 ---
  arch/arm/lib/Makefile                         |   3 +
  .../crc-t10dif-core.S}                        |   0
  arch/arm/lib/crc-t10dif-glue.c                |  77 ++
  arch/arm64/Kconfig                            |   1 +
  arch/arm64/configs/defconfig                  |   1 -
  arch/arm64/crypto/Kconfig                     |  10 -
  arch/arm64/crypto/Makefile                    |   3 -
  arch/arm64/crypto/crct10dif-ce-glue.c         | 132 ---
  arch/arm64/lib/Makefile                       |   3 +
  .../crc-t10dif-core.S}                        |   0
  arch/arm64/lib/crc-t10dif-glue.c              |  78 ++
  arch/m68k/configs/amiga_defconfig             |   1 -
  arch/m68k/configs/apollo_defconfig            |   1 -
  arch/m68k/configs/atari_defconfig             |   1 -
  arch/m68k/configs/bvme6000_defconfig          |   1 -
  arch/m68k/configs/hp300_defconfig             |   1 -
  arch/m68k/configs/mac_defconfig               |   1 -
  arch/m68k/configs/multi_defconfig             |   1 -
  arch/m68k/configs/mvme147_defconfig           |   1 -
  arch/m68k/configs/mvme16x_defconfig           |   1 -
  arch/m68k/configs/q40_defconfig               |   1 -
  arch/m68k/configs/sun3_defconfig              |   1 -
  arch/m68k/configs/sun3x_defconfig             |   1 -
  arch/powerpc/Kconfig                          |   1 +
  arch/powerpc/configs/powernv_defconfig        |   1 -
  arch/powerpc/configs/ppc64_defconfig          |   2 -
  arch/powerpc/crypto/Kconfig                   |  20 -
  arch/powerpc/crypto/Makefile                  |   3 -
  arch/powerpc/crypto/crc-vpmsum_test.c         | 133 ---
  arch/powerpc/lib/Makefile                     |   3 +
  .../crc-t10dif-glue.c}                        |  69 +-
  .../{crypto => lib}/crct10dif-vpmsum_asm.S    |   2 +-
  arch/s390/configs/debug_defconfig             |   1 -
  arch/x86/Kconfig                              |   1 +
  arch/x86/crypto/Kconfig                       |  10 -
  arch/x86/crypto/Makefile                      |   3 -
  arch/x86/crypto/crct10dif-pclmul_glue.c       | 143 ---
  arch/x86/lib/Makefile                         |   3 +
  arch/x86/lib/crc-t10dif-glue.c                |  51 ++
  .../{crypto => lib}/crct10dif-pcl-asm_64.S    |   0
  crypto/Kconfig                                |   1 +
  crypto/Makefile                               |   3 +-
  crypto/crct10dif_common.c                     |  82 --
  crypto/crct10dif_generic.c                    |  82 +-
  include/linux/crc-t10dif.h                    |  28 +-
  lib/Kconfig                                   |  43 +-
  lib/Kconfig.debug                             |  20 +
  lib/Makefile                                  |   2 +-
  lib/crc-t10dif.c                              | 156 +---
  lib/crc32test.c                               | 852 ------------------
  lib/crc_kunit.c                               | 428 +++++++++
  .../testing/selftests/arm64/fp/kernel-test.c  |   3 +-
  57 files changed, 867 insertions(+), 1748 deletions(-)
  delete mode 100644 arch/arm/crypto/crct10dif-ce-glue.c
  rename arch/arm/{crypto/crct10dif-ce-core.S => lib/crc-t10dif-core.S} 
(100%)
  create mode 100644 arch/arm/lib/crc-t10dif-glue.c
  delete mode 100644 arch/arm64/crypto/crct10dif-ce-glue.c
  rename arch/arm64/{crypto/crct10dif-ce-core.S => 
lib/crc-t10dif-core.S} (100%)
  create mode 100644 arch/arm64/lib/crc-t10dif-glue.c
  delete mode 100644 arch/powerpc/crypto/crc-vpmsum_test.c
  rename arch/powerpc/{crypto/crct10dif-vpmsum_glue.c => 
lib/crc-t10dif-glue.c} (50%)
  rename arch/powerpc/{crypto => lib}/crct10dif-vpmsum_asm.S (99%)
  delete mode 100644 arch/x86/crypto/crct10dif-pclmul_glue.c
  create mode 100644 arch/x86/lib/crc-t10dif-glue.c
  rename arch/x86/{crypto => lib}/crct10dif-pcl-asm_64.S (100%)
  delete mode 100644 crypto/crct10dif_common.c
  delete mode 100644 lib/crc32test.c
  create mode 100644 lib/crc_kunit.c

Good job. It's great to see the code being simplified.

I still want to submit an optimization patch about CRC-T10DIF for RISC-V.

I don't know if it would be more appropriate for me to rewrite a patch 
after your patch is officially applied.

What do you think?


      parent reply	other threads:[~2024-11-19 11:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17  0:22 [PATCH 00/11] Wire up CRC-T10DIF library functions to arch-optimized code Eric Biggers
2024-11-17  0:22 ` [PATCH 01/11] lib/crc-t10dif: stop wrapping the crypto API Eric Biggers
2024-11-17  0:22 ` [PATCH 02/11] lib/crc-t10dif: add support for arch overrides Eric Biggers
2024-11-17  0:22 ` [PATCH 03/11] crypto: crct10dif - expose arch-optimized lib function Eric Biggers
2024-11-17  0:22 ` [PATCH 04/11] x86/crc-t10dif: expose CRC-T10DIF function through lib Eric Biggers
2024-11-17  0:22 ` [PATCH 05/11] arm/crc-t10dif: " Eric Biggers
2024-11-17  0:22 ` [PATCH 06/11] arm64/crc-t10dif: " Eric Biggers
2024-11-17  0:22 ` [PATCH 07/11] powerpc/crc-t10dif: " Eric Biggers
2024-11-17  0:22 ` [PATCH 08/11] lib/crc_kunit.c: add KUnit test suite for CRC library functions Eric Biggers
2024-11-17  0:22 ` [PATCH 09/11] lib/crc32test: delete obsolete crc32test.c Eric Biggers
2024-11-17  0:22 ` [PATCH 10/11] powerpc/crc: delete obsolete crc-vpmsum_test.c Eric Biggers
2024-11-17  0:22 ` [PATCH 11/11] MAINTAINERS: add entry for CRC library Eric Biggers
2024-11-19  1:33 ` [PATCH 00/11] Wire up CRC-T10DIF library functions to arch-optimized code Martin K. Petersen
2024-11-19  8:59 ` Ard Biesheuvel
2024-11-19 17:46   ` Eric Biggers
2024-11-19 10:05 ` Zhihang Shao
2024-11-19 17:53   ` Eric Biggers
2024-11-19 10:29 ` Zhihang Shao [this message]

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=72406e89-7dee-4063-ad8a-1d63ddc5bfe6@gmail.com \
    --to=zhihang.shao.iscas@gmail.com \
    --cc=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=x86@kernel.org \
    /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).