drivers/net/ethernet/netronome/nfp/nfpcore/crc32.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/nfpcore/crc32.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/nfpcore/crc32.h- Extension
.h- Size
- 754 bytes
- Lines
- 35
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
linux/crc32.h
Detected Declarations
function crc32_posix_endfunction crc32_posix
Annotated Snippet
#ifndef NFP_CRC32_H
#define NFP_CRC32_H
#include <linux/crc32.h>
/**
* crc32_posix_end() - Finalize POSIX CRC32 working state
* @crc: Current CRC32 working state
* @total_len: Total length of data that was CRC32'd
*
* Return: Final POSIX CRC32 value
*/
static inline u32 crc32_posix_end(u32 crc, size_t total_len)
{
/* Extend with the length of the string. */
while (total_len != 0) {
u8 c = total_len & 0xff;
crc = crc32_be(crc, &c, 1);
total_len >>= 8;
}
return ~crc;
}
static inline u32 crc32_posix(const void *buff, size_t len)
{
return crc32_posix_end(crc32_be(0, buff, len), len);
}
#endif /* NFP_CRC32_H */
Annotation
- Immediate include surface: `linux/crc32.h`.
- Detected declarations: `function crc32_posix_end`, `function crc32_posix`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.