Re: [PATCH] Using Intel CRC32 instruction to accelerate CRC32calgorithm by new crypto API -V3.

From: Austin Zhang
Date: Wed Aug 06 2008 - 07:07:30 EST


Paval,

Thanks for your comments.

On Wed, 2008-08-06 at 11:42 +0200, Pavel Machek wrote:
> Copyright / GPL?
Yes, as : ï+MODULE_LICENSE("GPL");

> > +#ifdef CONFIG_X86_64
> > +#define REX_PRE "0x48, "
> > +#define SCALE_F 8
> > +#else
> > +#define REX_PRE
> > +#define SCALE_F 4
> > +#endif
>
> Ouch...
Any good suggestion will be appreciated.

> > +static u32 crc32c_intel_le_hw_byte(u32 crc, unsigned char const *data, size_t length)
> > +{
> > + while (length--) {
> > + __asm__ __volatile__(
>
> Are all the underscores neccessary?
What's big impact if keep those underscores? Just keep ANSI C style.


>
> > + return -1;
>
> That's supposed to be errno, right?
Are you suggest "ENODEV"? It's a feature from the device but the device is exact here.
And for the crc32c algorithm, there would be possible that several
algorithms registered themselves in crypto and user will don't care
which implementation will server him even the hardware accelerated
implementation don't exist in this processor.




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