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 4B05DA04B5; Thu, 10 Sep 2020 14:53:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B23DB1BF8D; Thu, 10 Sep 2020 14:53:03 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 088221B9B7 for ; Thu, 10 Sep 2020 14:53:00 +0200 (CEST) IronPort-SDR: iPt8/agTIWlOl3pzzTMncirvMSQmn/QfpP7ptba04PWmIlGkSnDvwj3zvtkq0gqJmZarfecB4d AV4JesUNsFDg== X-IronPort-AV: E=McAfee;i="6000,8403,9739"; a="222721770" X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="222721770" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 05:52:59 -0700 IronPort-SDR: DS2nw+MeJw8stmeulYppWIGQnW1Nb3+HfT/QrBRGAVMLsSW7KaefHpsBvJ6P7E0brF7tEmtwKO P7Jot9Jl/nIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="337121156" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga002.fm.intel.com with ESMTP; 10 Sep 2020 05:52:59 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 10 Sep 2020 05:52:59 -0700 Received: from orsmsx106.amr.corp.intel.com (10.22.225.133) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 10 Sep 2020 05:52:59 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 10 Sep 2020 05:52:58 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 10 Sep 2020 05:52:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jLh9O2LJCm9Vm0qa7alHgr9e6NwO0ORsTuttFQLjgMRfUI3/UwUEmRaVd3B6ktH6TQtLy2O1FXexqUgxK8aLrkSMvxXO3Zsu4Up3ednTO4SKa9Nf6CLDC9Zlms1uCaWBcXFT6E+GDzJnkQVTN+1Cvs330tWki6nERdI6FL+VOLz4DRae9ptiIqVT4OefFGGBXjFw+ITOnx964O7gen2sP+9huN3vCxfFQFDX1NshWEzFNgQYMqLVCMjLgZQHbwzDSMCS6u+CTgf4NKQyw9E7Jf+awXlnPNEIu0BmPYYjhpz5uN5YYwUdhEm+NzAyZbkXC3QvQdugdMQOXJm1qB1zMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M3MzXlG1szAvt9JqLyJRcyjAitfX6JLeHhKp/DRjbgA=; b=eDaNF3onXjyaGCTSUQlR8/sGAzs6iGQ27zxBnMHVKWftnoYG3LQQwpE1RmJfFQOgU3lbWLDreaLw4c+80pl1nVCrhMI2pTUZduX6SA+uzLxXIkftQJZ+ybPGgc1EW1e197GY9Cos5fuaaAz1DKJcnaV2RgMm7rsVk12GMiz1LBvBL/xUkNzSq7UblMA2ZR+YLQOPyq5G8VV33dXCzyj4R6ZnkHEfgmtub1Ul5s4EnUElIKj8Zidr6ZdIfZWdIQ+Jfc97qcZxZVV7kIy8ZxTdYoeBFfZ/1f/q98JCsijhFXw/QDb82OQkelgW8DIdY0F9EeEwQDNfruOgieYfohC+sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M3MzXlG1szAvt9JqLyJRcyjAitfX6JLeHhKp/DRjbgA=; b=w4sFLtYLYvotR4jdyeAD/3/fgLecyTmWnIqjTGsMJpT82+3qy7OnrURL+FvDYKR9gRLJlRL1AlPjVpvaDdTyYdwHzDcZ4xrTwyMcnuvTaUQ+UwTrAip7q2EyOyBVnoaEL5AwAMwxP15TmCasFb8fJQClkaee+RY23h+vS5/Uqdc= Received: from MN2PR11MB3725.namprd11.prod.outlook.com (2603:10b6:208:f9::23) by MN2PR11MB3663.namprd11.prod.outlook.com (2603:10b6:208:f5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16; Thu, 10 Sep 2020 12:52:57 +0000 Received: from MN2PR11MB3725.namprd11.prod.outlook.com ([fe80::e830:5836:737:efd1]) by MN2PR11MB3725.namprd11.prod.outlook.com ([fe80::e830:5836:737:efd1%7]) with mapi id 15.20.3370.016; Thu, 10 Sep 2020 12:52:57 +0000 From: "O'loingsigh, Mairtin" To: "Richardson, Bruce" CC: "Singh, Jasvinder" , "dev@dpdk.org" , "Ryan, Brendan" , "Coyle, David" , "De Lara Guarch, Pablo" Thread-Topic: [dpdk-dev] [PATCH] net: add support for AVX512 when generating CRC Thread-Index: AQHWh2ot3PVCYcPcP0qhNCI3WD6U96lhzLmAgAAGgGA= Date: Thu, 10 Sep 2020 12:52:57 +0000 Message-ID: References: <1599739271-16605-1-git-send-email-mairtin.oloingsigh@intel.com> <20200910122741.GI1789@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20200910122741.GI1789@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [86.44.213.168] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bd4a969f-e5dc-4ba8-8682-08d855887139 x-ms-traffictypediagnostic: MN2PR11MB3663: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Jqd6dcRmzvAT9kP3i6k1DsMW5lQehKaLg3NKMR6rra1g5rZfuCKtQ3Rzis7pzLdFkwpBv+zXMWkAkBg1xgGEkuDmwUAwa4tVFNbPCM3ZuR/8r+JBEg3j8kEG6SFodfWcBUtgUHRNvrj2MoeuqrNhmOE47SzM5CyJFMABdd9QSXWc+TahqFShKBJZq4D9/+4/Sp+asOkMJH4R+gAVgAYIcVaTihc7qW/qEooH5aw2ydDCX060oFMTZShfByYFxJZeArhAWgqOK7DXUlyLKPj1FSfIL0Z2DS+IAAxpmOKvyZOaNqpUrvFsqzJ9qVTXU94yKiZAeKzfY3xcIuPjiV4MPHojoUKLz1DoODRXHqvJfGCG+5MkBA3pEV2xCWW/ZZLAUX/bV6Vvs4DwXfOs+q5jUg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3725.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39860400002)(396003)(376002)(136003)(366004)(33656002)(26005)(8676002)(4326008)(9686003)(8936002)(478600001)(107886003)(966005)(7696005)(6862004)(55016002)(6636002)(6506007)(86362001)(5660300002)(83380400001)(53546011)(54906003)(2906002)(186003)(76116006)(66446008)(66946007)(66556008)(52536014)(71200400001)(64756008)(66476007)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: uMNaBxxA7mVgWhivyeNkQorLzePhagwul3hd/6MScSXcuTttyJwTfmky9/+QGPHycXQkAjnO0bf8W3F79HpOSpbbSuGiSiMU+WrT4h2jUiwGYDVZQKdkJJqHLhLdHHxsxSK3MdkFTDKGlQ4dCUfus/mHSXvHkTBcnlb/crhx7gWH+l3uc4wozkCVbML8cR5zA63DtyfqjeOlgJW+Fms6qgvfJgMF3fkQ2Cj8/5LtyY5SB+Dq+FduYHOghwZELWYaOb83KCV1J62lLYp6+5xLOPB5pRkugKRuMS+Qb0LSdxxJz0+b5+Hu5HvzrbHtpy1/2vvwcO+STj6ZLyNCdpyFTc8A3GrwjIQ5aEfpUOhBDv0aMQdXZBPa2eupeERNdoXZlqvCFnT4zmCOIfPoHoyTDeb4D11v89QpTjBAKTSAOefvWckhYrglxk+YfasJbHmq3bzKJGegE94SQLpOYUZBLGt2ZFDN94VwmCjPecDKZNIwmNUtno4HHdbovE2C63jUV67+JySDNn92zljNo6BxC5UCxeKov7xBh1oOE4elw7Cf++K4IUO3fhRe6avv8S7bTvN2y0YYd61fxdstmqwbnpsfnkEmJIWSEC5lvSdVKM+XZ5nYQbYMlPs9lRyTejd+C8qqUviXeaEV2z+qNMz39A== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3725.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd4a969f-e5dc-4ba8-8682-08d855887139 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2020 12:52:57.5744 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DW/pnGx3Vhdsa5z2IoixbUdPkA0ZWGZ0Xl/3kkHULsUcJ1MU5GubDs4po3AClOX9fsgNAUlTUUXQY5ky8O4Z5FDOVQlSCZvmFrKAKyhpOiY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3663 X-OriginatorOrg: 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" > -----Original Message----- > From: Bruce Richardson > Sent: Thursday, September 10, 2020 1:28 PM > To: O'loingsigh, Mairtin > Cc: Singh, Jasvinder ; dev@dpdk.org; Ryan, > Brendan ; Coyle, David ; > De Lara Guarch, Pablo > Subject: Re: [dpdk-dev] [PATCH] net: add support for AVX512 when > generating CRC >=20 > 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) >=20 > This all seems to be build-time selection of path. Can you perhaps invest= igate > 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=3D11= 831 > which is relevant to this too. >=20 > /Bruce Sure. I will look at options for run time selection of intrinsic path