Re: [PATCH v4 3/4] lib: introduce crc_t10dif_update()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-05-05 at 13:22 +0900, Akinobu Mita wrote:

> >
> > +
> > +__u16 crc_t10dif_update(__u16 crc, const unsigned char *buffer, size_t len)
> > +{
> > +       return __crc_t10dif_update(crc, buffer, len, true);
> > +}
> > +EXPORT_SYMBOL(crc_t10dif_update);
> > +
> > +__u16 crc_t10dif(const unsigned char *buffer, size_t len)
> > +{
> > +       return __crc_t10dif_update(0, buffer, len, false);
> > +}
> >  EXPORT_SYMBOL(crc_t10dif);
> 
> You mean that we should avoid crypto_shash_import() function call
> in crc_t10dif(), right?
> 

I think it is okay for crypto_shash_import().
 
Just that we can eliminate an extra call from crc_t10dif
to crc_t10_dif as in your proposed patch, 

> +EXPORT_SYMBOL(crc_t10dif_update);
> +
> +__u16 crc_t10dif(const unsigned char *buffer, size_t len)
> + {
> +     return crc_t10dif_update(0, buffer, len);
> 

but use a local inlined __crc_t10dif_update.

Tim


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




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux