Lines Matching defs:crc
19 /* Bloom filter uses a crc-16 hash over chunks of data which contain 4 key
217 static u16 mlxsw_sp2_acl_bf_crc16_byte(u16 crc, u8 c)
219 return (crc << 8) ^ mlxsw_sp2_acl_bf_crc16_tab[(crc >> 8) ^ c];
224 u16 crc = 0;
227 crc = mlxsw_sp2_acl_bf_crc16_byte(crc, *buffer++);
228 return crc;
284 static u16 mlxsw_sp4_acl_bf_crc10_byte(u16 crc, u8 c)
286 u8 index = ((crc >> 2) ^ c) & 0xff;
288 return ((crc << 8) ^ mlxsw_sp4_acl_bf_crc10_tab[index]) & 0x3ff;
291 static u16 mlxsw_sp4_acl_bf_crc6_byte(u16 crc, u8 c)
293 u8 index = (crc ^ c) & 0xff;
295 return ((crc << 6) ^ (mlxsw_sp4_acl_bf_crc6_tab[index] << 2)) & 0xfc;