add slicing-by-8 algorithm to the existing
slicing-by-4 algorithm. This consists of:
- extend largest BITS size from 32 to 64
- extend tables from tab[4][256] to up to tab[8][256]
- Add code for inner loop.
From: Bob Pearson
Signed-off-by: Bob Pearson
[djw...@us.ibm.com:
Since lib/crc32.c now provides crc32c, remove the software implementation here
and call the library function instead.
Signed-off-by: Darrick J. Wong
---
crypto/Kconfig |1 +
crypto/crc32c.c | 94 ++-
2 files changed, 4 insertions(+), 91
Reuse the existing crc32 code to stamp out a crc32c implementation.
Signed-off-by: Darrick J. Wong
---
include/linux/crc32.h |2 ++
lib/Kconfig |8 +++---
lib/crc32.c | 62 +++--
lib/crc32defs.h |7 ++
lib/ge
- remove trailing whitespace from lib/crc32.c
- remove trailing whitespace from lib/crc32defs.h
From: Bob Pearson
Signed-off-by: Bob Pearson
[djw...@us.ibm.com: changelog tweaks]
Signed-off-by: Darrick J. Wong
---
lib/crc32.c |2 +-
lib/crc32defs.h |2 +-
2 files ch
crc32.c in its original version freely mixed u32, __le32 and __be32 types
which caused warnings from sparse with __CHECK_ENDIAN__.
This patch fixes these by forcing the types to u32.
From: Bob Pearson
Signed-off-by: Bob Pearson
[djw...@us.ibm.com: Minor changelog tweaks]
Signed-off-by: Darrick J
Misc cleanup of lib/crc32.c and related files
- removed unnecessary header files.
- straightened out some convoluted ifdef's
- rewrote some references to 2 dimensional arrays as 1 dimensional
arrays to make them correct. I.e. replaced tab[i] with tab[0][i].
Replace 2D array references by pointer references in loops.
This change has no effect on X86 code but improves PPC
performance.
From: Bob Pearson
Signed-off-by: Bob Pearson
[djw...@us.ibm.com: Minor changelog tweaks]
Signed-off-by: Darrick J. Wong
---
lib/crc32.c | 21 +++--
Replaced the unit test provided in crc32.c, which doesn't have a
makefile and doesn't compile with current headers, with a simpler
self test routine that also gives a measure of performance and
runs at module init time. The self test option can be enabled
through a configuration option CONFIG_CRC32
crc32.c provides a choice of one of several algorithms for
computing the LSB and LSB versions of the CRC32 checksum
based on the parameters CRC_LE_BITS and CRC_BE_BITS. In the
original version the values 1, 2, 4 and 8 respectively selected
versions of the alrogithm that computed the crc 1, 2, 4 and
Add self-test code for crc32c.
Signed-off-by: Darrick J. Wong
---
lib/crc32.c | 363 ++-
1 files changed, 261 insertions(+), 102 deletions(-)
diff --git a/lib/crc32.c b/lib/crc32.c
index 8df9561..382fa76 100644
--- a/lib/crc32.c
+++ b/li
Allow the kernel builder to choose a crc32* algorithm for the kernel.
Signed-off-by: Darrick J. Wong
---
lib/Kconfig | 43 +++
lib/crc32defs.h | 18 ++
2 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/lib/Kconfig b/l
Add two changes that improve the performance of x86 systems
1. replace main loop with incrementing counter
this change improves the performance of the selftest
by about 5-6% on Nehalem CPUs. The apparent
reason is that the compiler can use the loop index
Some final changes
- added a comment at the top of crc32.c
From: Bob Pearson
Signed-off-by: Bob Pearson
[djw...@us.ibm.com: Minor changelog tweaks]
Signed-off-by: Darrick J. Wong
---
lib/crc32.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/crc32.c b/
Moved a long comment from lib/crc32.c to Documentation/crc32.txt
where it will more likely get read.
- Edited the resulting document to add an explanation of the
slicing-by-n
algorithm.
From: Bob Pearson
Signed-off-by: George Spelvin
Signed-off-by: Bob Pearson
[djw...@us.ibm.
Hi all,
This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a
software crc32c implementation. It removes the crc32c implementation in
crypto/ in favor of using the stamped-out one in lib/. There is also a change
to Kconfig so that the kernel builder can pick an implementation
This patch is the same as the previous but without the inline function.
regards,
Nikos
>From 1562727aab0e2fcce87e22a73abe6ea1c7c8975f Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos
Date: Tue, 1 Nov 2011 13:39:56 +0100
Subject: [PATCH] Added CRYPTO_ALG_KERN_DRIVER_ONLY flag.
The added CRY
On Fri, Jan 06, 2012 at 10:29:22AM +0100, Nikos Mavrogiannopoulos wrote:
> On Fri, Jan 6, 2012 at 10:12 AM, Herbert Xu
> wrote:
>
> >> How the flag is exported by cryptodev-linux:
> >> http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/ioctl.c#l716
> > Actually I was looking for code that uses cr
On Fri, Jan 6, 2012 at 10:12 AM, Herbert Xu
wrote:
>> How the flag is exported by cryptodev-linux:
>> http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/ioctl.c#l716
> Actually I was looking for code that uses crypto_tfm_alg_flags
> function.
The code above will use it once it is accepted. Now i
On Fri, Jan 06, 2012 at 10:02:08AM +0100, Nikos Mavrogiannopoulos wrote:
>
> How the flag is exported by cryptodev-linux:
> http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/ioctl.c#l716
>
> An example of using it in userspace:
> http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/examples/aes.c#l
On Fri, Jan 6, 2012 at 9:28 AM, Herbert Xu wrote:
>> I needed this function in order to access the new flag without
>> relying on the structure format. The available crypto_tfm_alg_type()
>> would apply a mask and remove it, thus I added this function.
> Can you show me some example code so I can
On Fri, Jan 06, 2012 at 09:19:01AM +0100, Nikos Mavrogiannopoulos wrote:
>
> I needed this function in order to access the new flag without
> relying on the structure format. The available crypto_tfm_alg_type()
> would apply a mask and remove it, thus I added this function.
Can you show me some e
On 01/06/2012 02:37 AM, Herbert Xu wrote:
> Nikos Mavrogiannopoulos wrote:
>> The added CRYPTO_ALG_KERN_DRIVER_ONLY indicates whether a cipher
>> is only available via a kernel driver. If the cipher implementation
>> might be available by using an instruction set or by porting the
>> kernel code,
22 matches
Mail list logo