[dpdk-dev] [PATCH v9 0/3] librte_net: add crc computation support
jasvinder.singh at intel.com
Wed Apr 5 14:52:52 CEST 2017
> -----Original Message-----
> From: Richardson, Bruce
> Sent: Wednesday, April 5, 2017 10:37 AM
> To: Thomas Monjalon <thomas.monjalon at 6wind.com>; Singh, Jasvinder
> <jasvinder.singh at intel.com>
> Cc: dev at dpdk.org; olivier.matz at 6wind.com; Doherty, Declan
> <declan.doherty at intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>
> Subject: RE: [dpdk-dev] [PATCH v9 0/3] librte_net: add crc computation
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon
> > Sent: Wednesday, April 5, 2017 10:01 AM
> > To: Singh, Jasvinder <jasvinder.singh at intel.com>
> > Cc: dev at dpdk.org; olivier.matz at 6wind.com; Doherty, Declan
> > <declan.doherty at intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch at intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v9 0/3] librte_net: add crc computation
> > support
> > 2017-04-05 08:34, Singh, Jasvinder:
> > > Hi Thomas,
> > >
> > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > > > 2017-03-30 17:15, Jasvinder Singh:
> > > > > In some applications, CRC (Cyclic Redundancy Check) needs to be
> > > > > computed or updated during packet processing operations. This
> > > > > patchset adds software implementation of some common standard
> > > > > CRCs (32-bit Ethernet CRC as per Ethernet/[ISO/IEC 8802-3] and
> > > > > 16-bit CCITT-CRC [ITU-T
> > > > X.25]).
> > > > > Two versions of each 32-bit and 16-bit CRC calculation are proposed.
> > > > >
> > > > > The first version presents a fast and efficient CRC generation
> > > > > on IA processors by using the carry-less multiplication
> > > > > instruction PCLMULQDQ (i.e SSE4.2 instrinsics). In this
> > > > > implementation, a parallelized folding approach has been used to
> > > > > first reduce an arbitrary length buffer to a small fixed size
> > > > > length buffer (16
> > > > > bytes) with the
> > > > help of precomputed constants.
> > > > > The resultant single 16-bytes chunk is further reduced by
> > > > > Barrett reduction method to generate final CRC value. For more
> > > > > details on the implementation, see reference .
> > > > >
> > > > > The second version presents the fallback solution to support the
> > > > > CRC generation without needing any specific support from CPU
> > > > > (for
> > > > > examples-
> > > > > SSE4.2 intrinsics). It is based on generic Look-Up Table(LUT)
> > > > > algorithm that uses precomputed 256 element table as explained
> > > > > in
> > > > reference.
> > > > >
> > > > > During intialisation, all the data structures required for CRC
> > > > > computation are initialised. Also, x86 specific crc
> > > > > implementation (if supported by the platform) or scalar version is
> > > >
> > > > As you can see in patchwork, it does not compile on FreeBSD:
> > > > http://dpdk.org/ml/archives/test-report/2017-April/016943.html
> > >
> > > As I stated in the cover letter notes as well that The patchset
> > > build fails on clang version earlier than 3.7.0 due to missing
> > > intrinsics and
> > this issue is listed in DPDK known issue section. FreeBSD build on gcc
> > target should work fine.
> > Ah, I have not seen this explanation.
> > However, we cannot let the build fails.
> > It is a blocker for patch admission.
> > Can you, at least, disable the code for some compiler versions?
> Hi Jasvinder,
> Any chance a work-around for this issue. The default compiler on BSD is
> clang, and the BSD 10 series of releases uses v3.4. This means this
> functionality will be unavailable for anyone using DPDK from BSD ports on
> BSD 10.
I will have a look at this and send another version with fix.
More information about the dev