2005-05-13 13:50:11

by Adrian Bunk

[permalink] [raw]
Subject: SCTP: use lib/libcrc32c.c instead of net/sctp/crc32c.c?

As far as I understand it, lib/libcrc32c.c could be used instead of the
similar code in net/sctp/crc32c.c .

Is there any reason why this isn't done?

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2005-05-14 01:01:33

by Sridhar Samudrala

[permalink] [raw]
Subject: Re: SCTP: use lib/libcrc32c.c instead of net/sctp/crc32c.c?

Adrian Bunk wrote:

>As far as I understand it, lib/libcrc32c.c could be used instead of the
>similar code in net/sctp/crc32c.c .
>
>Is there any reason why this isn't done?
>
>
The SCTP RFC3309 says that SCTP uses a tranport-level CRC where the bit
ordering is mirrored and different from link-level CRC.

The CRC is computed using a procedure similar to ETHERNET CRC [ITU32],
modified to reflect transport level usage.

So I am not sure if we can use the libcrc32c routines for calculating SCTP
crc32 checksum. But if it is possible, we should definitely use the crc32
library.

Thanks
Sridhar