Re: crc32 cleanups

Jeff Garzik
2001-10-12T19:25:23Z

I like it. I even had local patches that did something similar,
creating lib/crc32, but it never got to the polished stage. Donald
Becker had also suggested at the 2.5 kernel summit that the ether_crc
stuff become generic code, so your code here follows along well with
that plan. So, after some testing, I'm definitely interested in these
patches (at least as they related to net drivers).

WRT initialization, I would suggest refcounting: driver calls
init_crc32 at module load time, and cleanup_crc32 at module removal
time. When the first reference appears, the desired poly table
is initialized. When the last reference disappears, the poly table
is kfree'd. I considered other initialization scenarios but this seems
to be the cleanest.

Jeff