* CRC32 - computed or table-driven?
@ 2002-05-05 7:44 Stanislav Meduna
0 siblings, 0 replies; 2+ messages in thread
From: Stanislav Meduna @ 2002-05-05 7:44 UTC (permalink / raw)
To: linux-kernel
Hello,
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.
There are table-driven /usr/src/linux-2.4.19/fs/jffs2/crc32.*, but
this code is hidden in a filesystem subtree.
Any plans to do it "the right way" in 2.4? Is net/core (mentioned
in the crc32.h) the right place? - as we see it is used also
in the filesystem code and lib would be probably a better place.
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?
Regards
--
Stano
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CRC32 - computed or table-driven?
@ 2002-05-06 20:55 Matt_Domsch
0 siblings, 0 replies; 2+ messages in thread
From: Matt_Domsch @ 2002-05-06 20:55 UTC (permalink / raw)
To: stano; +Cc: linux-kernel
"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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-06 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-05 7:44 CRC32 - computed or table-driven? Stanislav Meduna
2002-05-06 20:55 Matt_Domsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®