@@ -28,7 +28,7 @@ use iso_hdlc::crc_pmull_sha3::crc32_iso_hdlc_eor3_v9s3x2e_s3;
2828pub fn crc32_iscsi ( crc : u32 , data : & [ u8 ] ) -> u32 {
2929 let data_len = data. len ( ) ;
3030
31- // there's some variance among different aarch64 CPUs (Applie Silicon, AWS Graviton, etc), but
31+ // there's some variance among different aarch64 CPUs (Apple Silicon, AWS Graviton, etc. ), but
3232 // 127 bytes is the "small" threshold where this is generally faster
3333 if data_len < 128 {
3434 return unsafe { crc32_iscsi_small_fast ( crc, data) } ;
@@ -50,7 +50,7 @@ pub fn crc32_iscsi(crc: u32, data: &[u8]) -> u32 {
5050pub fn crc32_iso_hdlc ( crc : u32 , data : & [ u8 ] ) -> u32 {
5151 let data_len = data. len ( ) ;
5252
53- // there's some variance among different aarch64 CPUs (Applie Silicon, AWS Graviton, etc), but
53+ // there's some variance among different aarch64 CPUs (Apple Silicon, AWS Graviton, etc. ), but
5454 // 127 bytes is the "small" threshold where this is generally faster
5555 if data_len < 128 {
5656 return unsafe { crc32_iso_hdlc_small_fast ( crc, data) } ;
@@ -68,7 +68,6 @@ pub fn crc32_iso_hdlc(crc: u32, data: &[u8]) -> u32 {
6868 }
6969}
7070
71- /// Safe wrapper for CRC-32/ISCSI calculation with AES + SHA3 support
7271#[ inline]
7372#[ target_feature( enable = "crc,aes,sha3" ) ]
7473unsafe fn crc32_iscsi_aes_sha3 ( crc : u32 , data : & [ u8 ] , data_len : usize ) -> u32 {
@@ -90,7 +89,6 @@ unsafe fn crc32_iscsi_aes(crc: u32, data: &[u8], data_len: usize) -> u32 {
9089 unsafe { crc32_iscsi_v12e_v1 ( crc, data. as_ptr ( ) , data_len) }
9190}
9291
93- /// Safe wrapper for CRC32 ISO-HDLC calculation
9492#[ inline]
9593#[ target_feature( enable = "crc,aes,sha3" ) ]
9694unsafe fn crc32_iso_hdlc_aes_sha3 ( crc : u32 , data : & [ u8 ] , data_len : usize ) -> u32 {
@@ -148,7 +146,7 @@ unsafe fn clmul_hi_and_xor(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint6
148146 veorq_u64 ( clmul_hi ( a, b) , c)
149147}
150148
151- /// CRC-32/ISCSI calculation for small buffers (<= 96 bytes) using unrolled native CRC instructions
149+ /// CRC-32/ISCSI calculation for small buffers (< 128 bytes) using unrolled native CRC instructions
152150#[ inline]
153151#[ target_feature( enable = "crc" ) ]
154152pub unsafe fn crc32_iscsi_small_fast ( mut crc : u32 , data : & [ u8 ] ) -> u32 {
@@ -185,7 +183,7 @@ pub unsafe fn crc32_iscsi_small_fast(mut crc: u32, data: &[u8]) -> u32 {
185183 crc
186184}
187185
188- /// CRC-32/ISO-HDLC calculation for small buffers (<= 96 bytes) using unrolled native CRC instructions
186+ /// CRC-32/ISO-HDLC calculation for small buffers (< 128 bytes) using unrolled native CRC instructions
189187#[ inline]
190188#[ target_feature( enable = "crc" ) ]
191189pub unsafe fn crc32_iso_hdlc_small_fast ( mut crc : u32 , data : & [ u8 ] ) -> u32 {
0 commit comments