summaryrefslogtreecommitdiffstats
path: root/sys/libkern/crc32.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit fixes the issue with alias_sctp.c. Norrs2009-02-141-0/+643
| | | | | | | | | | | | | | longer do we require SCTP to be in the kernel for the lib to be able to handle SCTP. We do this by moving the CRC32c checksum into libkern/crc32.c and then adjusting all routines to use the common methods. Note that this will improve the performance of iSCSI since they were using the old single 256 bit table lookup versus the slicing 8 algorithm (which gives a 4x speed up in CRC32c calculation :-D) Reviewed by:rwatson, gnn, scottl, paolo MFC after: 4 week? (assuming we MFC the alias_sctp changes)
* Update comment to direct the reader to libkern.h instead of systm.h.marcel2005-04-281-1/+1
| | | | | | The functions were moved. Pointed out by: johan@
* Refactor the CRC-32 code to enhance its usability. Move the actualmarcel2005-04-271-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | CRC logic to a new function: crc32_raw() that obtains the initial CRC value as well as leaves any post-processing to the caller. As such, it can be used when the initial CRC value is not ~0U or when the final CRC value does need to be inverted (bitwise). It also means that crc32_raw() can be called repeatedly when the data is not available as a single block, such as for scatter/gather lists and the likes. Avoid the additional call overhead incured by the refactoring by moving the implementation off crc32() to sys/systm.h and making it inlinable. Since crc32_raw() is itself trivial and since it may be used in loops that iterate over fragments, having it available for inlining can be beneficial. Hence, move its implementation to sys/systm.h as well. Keep the original implementation of crc32() in libkern/crc32.c for documentation purposes (as a comment of course). Triggered by: Jose M Rodriguez (josemi at freebsd dot jazztel dot es) Discussed on: current@ Tested on: amd64, ia64 (BVO having GPT partitions) Jargon file candidate: BVO = By Virtue Of :-)
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-071-1/+3
|
* Use __FBSDID().obrien2003-06-111-1/+3
|
* For some reason this didn't get added in my previous commit.phk2002-05-291-0/+107
OpenPOWER on IntegriCloud