]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/crc32c_intel_fast.c
2 #include "common/crc32c_intel_baseline.h"
4 extern unsigned int crc32_iscsi_00(unsigned char const *buffer
, uint64_t len
, uint64_t crc
) asm("crc32_iscsi_00");
5 extern unsigned int crc32_iscsi_zero_00(unsigned char const *buffer
, uint64_t len
, uint64_t crc
) asm("crc32_iscsi_zero_00");
9 uint32_t ceph_crc32c_intel_fast(uint32_t crc
, unsigned char const *buffer
, unsigned len
)
16 return crc32_iscsi_zero_00(buffer
, len
, crc
);
20 * the crc32_iscsi_00 method reads past buffer+len (because it
21 * reads full words) which makes valgrind unhappy. don't do
25 return ceph_crc32c_intel_baseline(crc
, buffer
, len
);
26 left
= ((unsigned long)buffer
+ len
) & 7;
28 v
= crc32_iscsi_00(buffer
, len
, crc
);
30 v
= ceph_crc32c_intel_baseline(v
, buffer
+ len
, left
);
34 int ceph_crc32c_intel_fast_exists(void)
41 int ceph_crc32c_intel_fast_exists(void)
46 uint32_t ceph_crc32c_intel_fast(uint32_t crc
, unsigned char const *buffer
, unsigned len
)