From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v9 0/3] librte_net: add crc computation support Date: Tue, 04 Apr 2017 22:02:24 +0200 Message-ID: <1613321.D1UC30mH7n@xps13> References: <1490873422-13734-2-git-send-email-jasvinder.singh@intel.com> <1490890533-92231-1-git-send-email-jasvinder.singh@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, olivier.matz@6wind.com, declan.doherty@intel.com, pablo.de.lara.guarch@intel.com To: Jasvinder Singh Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 52470326B for ; Tue, 4 Apr 2017 22:02:26 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id x124so37664609wmf.0 for ; Tue, 04 Apr 2017 13:02:26 -0700 (PDT) In-Reply-To: <1490890533-92231-1-git-send-email-jasvinder.singh@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-03-30 17:15, Jasvinder Singh: > In some applications, CRC (Cyclic Redundancy Check) needs to be compu= ted > 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. >=20 > The first version presents a fast and efficient CRC generation on IA > processors by using the carry-less multiplication instruction =EF=BF=BD= PCLMULQDQ > (i.e SSE4.2 instrinsics). In this implementation, a parallelized fold= ing > 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 cons= tants. > The resultant single 16-bytes chunk is further reduced by Barrett red= uction > method to generate final CRC value. For more details on the implement= ation, > see reference [1]. >=20 > The second version presents the fallback solution to support the CRC > generation without needing any specific support from CPU (for example= s- > SSE4.2 intrinsics). It is based on generic Look-Up Table(LUT) algorit= hm > that uses precomputed 256 element table as explained in reference[2].= >=20 > During intialisation, all the data structures required for CRC comput= ation > are initialised. Also, x86 specific crc implementation (if supported = by > the platform) or scalar version is enabled. As you can see in patchwork, it does not compile on FreeBSD: =09http://dpdk.org/ml/archives/test-report/2017-April/016943.html