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 A2FD6A04BC; Tue, 29 Sep 2020 17:45:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0191F1C11C; Tue, 29 Sep 2020 17:45:22 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 032DE1BFFB for ; Tue, 29 Sep 2020 17:45:20 +0200 (CEST) IronPort-SDR: NT6uLmAol5EyQrcsQJCs3NVIOizxpABusysIi9BxV9E8rd8WOu5mO9f9PMw+JRyTn1THc/U3/P zvlIrvl9BD6A== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="159551081" X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="159551081" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 08:45:12 -0700 IronPort-SDR: lP75jZTg3o58BuqqI1J8HODo6B5Hj3VqqTClpAYPNgEUDI8Yq/cUK6tyQS3NNVP4hUFMCcW9+x mR6BEYee+PuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="312258017" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 29 Sep 2020 08:45:12 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 29 Sep 2020 08:45:11 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 29 Sep 2020 08:45:11 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.42) 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; Tue, 29 Sep 2020 08:45:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zh37uaowYOdE9fWQLth4xGLgq925DdmYccfyxnAeMn4L6F6I8sTsiwiRagy6pktkobov9tDLBBxiFlfvLf/ZxaWpUiPRdI/zjbttVO8XRxE9LalOjbF8cPi5EQDkjoa4MyeH1FyWwq6QxzkRkfXL8s06DKVGDIGBcBE2XpsREe4vrAazkpnOdUpagsup0vEH1iI6nEHL+wkUHeac1kBiynyE8T+KaVoUcWR+Mu642IjwSq8IDTQvhgFo8+q6jztUJTWT/zRr7LRLDxKWjLkqIk12yo3EB2RC+ita+2vnOTKynjRtuFocI9jMWO9cfSk+qpP4hhoWEG3fYrvEJyf7CQ== 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=ZS3k2xZ8uJftQt320Al7uaxT1T1/NRdjjv74Jq4+odo=; b=gYn1/id8x/M/SqRSIkxz3Jr9Hetvf2pEyGHEKunItStEwQzQg1HrETj6lFOEMKUq3euF+diiu2Y3bGzKZigXmdxdlRSh8TJXgBjuIbActCDgmE3EdK5oaYJPZ+zWSeLyFmPXUBdRSiv3oyJhT+G1bKjd78JE/E3S5cid7OyATF7OHgNZFzaEoFSmy+yozl2fNRJDnt1joxLs53fRmFp1+B9U9DCm8uq2DfmHpMcxpuTIrBqdzRYgL9cjFnYOUFZLTur8sCQ93ioPVVy+Bbzia6PEz8JqobkCR/O6V85QstR7IS5ju8oExqvZfF+7WYzCIFIZTD5p4rJk/4kL/m+J3A== 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=ZS3k2xZ8uJftQt320Al7uaxT1T1/NRdjjv74Jq4+odo=; b=VfEVUBXLhisE9A6oQy8N60deunJIkE8yMgHrWacN9FMEAhoZ5L+tK+0OlSYFdHy3hSd24O5YJhvdw4QekXHaXHk0ejboWlskJEmSb7sioRCcj/xx0qguDDPhsPfkGaq306q54OSFn7EeVYPeTyNfzBCmchlWAyDraBu9ZQqcSwE= Received: from MN2PR11MB3725.namprd11.prod.outlook.com (2603:10b6:208:f9::23) by MN2PR11MB3790.namprd11.prod.outlook.com (2603:10b6:208:f6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Tue, 29 Sep 2020 15:45:07 +0000 Received: from MN2PR11MB3725.namprd11.prod.outlook.com ([fe80::20e3:1612:5449:76e8]) by MN2PR11MB3725.namprd11.prod.outlook.com ([fe80::20e3:1612:5449:76e8%5]) with mapi id 15.20.3412.029; Tue, 29 Sep 2020 15:45:07 +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: AQHWh2ot3PVCYcPcP0qhNCI3WD6U96lhzLmAgB4TDLA= Date: Tue, 29 Sep 2020 15:45:07 +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: 517e9ce2-f9eb-4612-cde7-08d8648ea432 x-ms-traffictypediagnostic: MN2PR11MB3790: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uZY0lf9CXbJ5mejfjcMPuH6zPOWpYEC/VeR/c+K7dMjAckfHogzCvf5BGicIKhjhZNOYyId1IpsWsiUbpojfXPrU2LUK+UTthINp6lfgvwzIuqs7FBfQJ/piiU8b+qtr/T5I1uxp4gnb80UZvRzdkT2O0m+Jt/BKbfO1IxbWkgoa2xRskN171n78LdMyBHaHznjV+2LIklESPwKqXrNuFQSHYaIPagQ5BH395apyQyUALNmjIAzOpDKm0XPDGtYnNsQlpzvyDlcbNE7FlYeW5kmWnrz6skWklHe/DUBPQgTuReJZTD0QK4gnsAKM54J1h4Awvl2sEvMpQibHalPjlwEfF2HXyEATtQ5qF+zK40rv5acq6BKPx6askeJ94/WQUpR/UTP2GhqqwIyrXLLDmg== 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)(39860400002)(366004)(376002)(346002)(396003)(136003)(52536014)(55016002)(2906002)(76116006)(186003)(66946007)(66476007)(107886003)(66446008)(64756008)(66556008)(8676002)(9686003)(5660300002)(33656002)(6862004)(6636002)(83080400001)(8936002)(26005)(6506007)(966005)(478600001)(53546011)(86362001)(54906003)(4326008)(316002)(83380400001)(71200400001)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: gyz7ICf4i5cNexR8SPSFK4iRXoPOjFG+N854GIWNv1H+b320A3HLW46EljW4vlNkXwFlZW/qqOodJSl4fyFoC9BCNi8U75228BBwMa2DibVeW7R6f4uWsrPPrOKJRcdX6wqwMNJWdesCHReOIAeFJB+FE4YopopfUTAbaIqTkyteRAus0xSMSEKGDhCFgHiF/a1G7tTrYDlmxm205+AfYCUrfBo/Z7Mj2y0/4cl0IR5nDMap+LCSfLS2pvI/dL/ShhiP6klJ1AVPTUUUio+IJAC2S0I8YDHQ7qoy+Hyh8gdiF7t4CGNyMsrmoIvbvHXzqkad0PCUzBIm3f9dc8dgWeO4r17RMyAOMDd1htUyZlrkQMPXWhDs+en1kgCRNtxm2jCcPV85h2Mnnb103GO4e779mwRVQzOAyVHOTa81fDDAhQPltBxBdQhOYxd3dQBYKPPGNQ4x6nZcGgKE5xGQsqnwG922vrL4nzL82PrJMHp/CX3O/nfJVDGUgqTldKICKMskBgROUBu7NOvGpcreBYwA55WZZqD2qhjbe994KRrz3cepftOEw8yJ9vD8PZR6fMIXLNnHDsB0VhruRnveXlNlZ5gzkPkAuCY+QrC4dJP3eT3LzxCmsiWkX1MU53g5p8guTrZ/uELxvGvz3Q5gPw== 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: 517e9ce2-f9eb-4612-cde7-08d8648ea432 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2020 15:45:07.2473 (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: BNzFKtM6a2aIlFCLXvdPJOW0JSwBSmoSK+Ba6qT/mgxZRpKXbQAw4iLRw0LS0juyyXkIBkbZHTDiUYcHKKy4e9i1m8xgJuo+Mq6kytRHXBY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3790 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" Hi, > -----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 We have added runtime check for v3 of patch which we have submitted Mairtin