Messages in this thread | | | From | Matt_Domsch@Dell ... | Subject | Re: CRC32 - computed or table-driven? | Date | Mon, 6 May 2002 15:55:23 -0500 |
| |
"Stanislav Meduna" <stano@meduna.org> wrote: > I need to compute a crc32 in my small not-ready-for-the-prime-time > patch against 2.4.19-pre. I do not (yet) follow the 2.5 development. > > There is <linux/crc32.h> that does what I want, but not quite > effectively and with comments that it is unsuitable for bulk data > and that it will migrate to net/core/crc.c.
Right. In 2.5, there's a bulk data version, but that code hasn't been backported to 2.4.x, and that was so far intentional. (the comment about net/core/crc.c is wrong, it should eventually go in lib/crc32.c).
> Any plans to do it "the right way" in 2.4?
Yes. The stage 1 crc32 cleanups I did just removed ~60 duplicate copies of the crc32 code in the ethernet drivers, but we (Jeff Garzik and Marcello) didn't want more widespread changes. That all happened in 2.4.19-pre{early} IIRC. Once they were convinced that the crc library code in 2.5.x wouldn't break the drivers, it was believed that the code could easily be backported - but no one has volunteered to do so yet. Stage 2 is to add lib/crc32.c as a module that adds the bulk crc32() function, but doesn't touch ether_crc_le() or ether_crc(), so that can't break net drivers.
> I can post a patch, but I cannot test whether it breaks jffs2 > and as this adds 1 kB to the kernel that might not be needed > I would like to ask first. Who is hacking these parts?
If you wanted to backport from 2.5 the lib/crc32.c code that generates the table and exports a crc32 function, be my guest!
Thanks, Matt - 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/
| |