[dpdk-dev] [PATCH v11 0/2] librte_net: add crc computation support

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Apr 5 23:00:36 CEST 2017


2017-04-05 21:49, 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 [1].
> 
> 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[2].
> 
> 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 enabled.

Applied (with one last fix), thanks


More information about the dev mailing list