Re: crc32 cleanups

Jeff Garzik (jgarzik@mandrakesoft.com)
Fri, 12 Oct 2001 14:25:30 -0500 (CDT)


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/