From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11BABA04B5; Thu, 10 Sep 2020 14:27:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 630EE1BF8D; Thu, 10 Sep 2020 14:27:49 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 027C11B9B7 for ; Thu, 10 Sep 2020 14:27:46 +0200 (CEST) IronPort-SDR: 3ErrEiJz6JO3rF613JtmOxN30f6Vum7I+nUyKNs78lEm2WNA9ZkTM+2kfsM816zL2UI69kkr3E 2cRIgDxB21Ew== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="159470211" X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="159470211" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 05:27:46 -0700 IronPort-SDR: nxng3Y7EeLhKWJM/eECNKWRWmLeIbSgwy/VTVAX5IuCM3lfbjj4kCNEyi1T+huY5fCiIJ3mYfq n3wIQN7t76VQ== X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="480868952" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.5.251]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Sep 2020 05:27:44 -0700 Date: Thu, 10 Sep 2020 13:27:41 +0100 From: Bruce Richardson To: Mairtin o Loingsigh Cc: jasvinder.singh@intel.com, dev@dpdk.org, brendan.ryan@intel.com, David.Coyle@intel.com, pablo.de.lara.guarch@intel.com Message-ID: <20200910122741.GI1789@bricha3-MOBL.ger.corp.intel.com> References: <1599739271-16605-1-git-send-email-mairtin.oloingsigh@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599739271-16605-1-git-send-email-mairtin.oloingsigh@intel.com> Subject: Re: [dpdk-dev] [PATCH] net: add support for AVX512 when generating CRC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 10, 2020 at 01:01:11PM +0100, Mairtin o Loingsigh wrote: > This patch enables the generation of CRC using AVX512 instruction > set when available on the host platform. > > Signed-off-by: Mairtin o Loingsigh > --- > > v1: > * Initial version, with AVX512 support for CRC32 Ethernet only > (requires further updates) > * AVX512 support for CRC16-CCITT and final implementation of > CRC32 Ethernet will be added in v2 > --- > doc/guides/rel_notes/release_20_11.rst | 4 + > lib/librte_net/net_crc_avx.h | 331 ++++++++++++++++++++++++++++++++ > lib/librte_net/rte_net_crc.c | 23 ++- > lib/librte_net/rte_net_crc.h | 1 + > 4 files changed, 358 insertions(+), 1 deletions(-) > create mode 100644 lib/librte_net/net_crc_avx.h > > --- a/lib/librte_net/rte_net_crc.c > +++ b/lib/librte_net/rte_net_crc.c > @@ -10,12 +10,18 @@ > #include > #include > > -#if defined(RTE_ARCH_X86_64) && defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ) > +#if defined(RTE_ARCH_X86_64) && defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ) \ > + && defined(RTE_MACHINE_CPUFLAG_AVX512F) > +#define X86_64_AVX512F_PCLMULQDQ 1 > +#elif defined(RTE_ARCH_X86_64) && defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ) This all seems to be build-time selection of path. Can you perhaps investigate adding runtime selection instead, so that this can be used from distro packages, or DPDK compiled on older systems but used on newer. See also patchset: http://patches.dpdk.org/project/dpdk/list/?series=11831 which is relevant to this too. /Bruce