|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: iSCSI CRC considerations
Julian,
Page 14:
"Adler [RFC1150] demands the expensive modulo operation with a very
large prime, for the processing of each byte, or some test to
indicate the necessity in that operation. Fletcher [FITS] only
demands an addition, and can work on 16-bit at a time."
Correction not RFC-1150 but these RFCs reference use of Adler-32: RFC-1950,
RFC-1951, RFC-1952, RFC-1979, RFC-2394, RFC-2960.
Your description of Adler-32 is incorrect with respect to implementation.
#define BASE 65521
...
s1 += *buf++;
if (s1 >= BASE)
s1 -= BASE;
s2 += s1;
if (s2 >= BASE)
s2 -= BASE;
...
This can be done with without table lookup and the speed of calculation is
faster than CRC. There is NO expensive modulo instruction for Adler-32.
Doug
Home Last updated: Tue Sep 04 01:05:30 2001 6315 messages in chronological order |