Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crc32test.c Create Date:2022-07-28 06:55:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:crc32c_test

Proto:static int __init crc32c_test(void)

Type:int

Parameter:Nothing

667  errors = 0
668  bytes = 0
677  When i < 100 cycle
678  bytes += 2 * andom 11 bit length of test
680  crc ^= __crc32c_le(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test )
685  local_irq_save(flags)
686  local_irq_disable()
688  nsec = ktime_get_ns()
689  When i < 100 cycle
690  If xpected crc32c_le result != __crc32c_le(andom starting crc , 4096 random bytes + andom 6 bit offset in buf , andom 11 bit length of test ) Then errors++
694  nsec = ktime_get_ns() - nsec
696  local_irq_restore(flags)
697  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
699  pr_info("crc32c: CRC_LE_BITS = %d\n", CRC_LE_BITS)
701  If errors Then pr_warn("crc32c: %d self tests failed\n", errors)
703  Else
704  pr_info("crc32c: self tests passed, processed %d bytes in %lld nsec\n", bytes, nsec)
708  Return 0
Caller
NameDescribe
crc32test_init