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 E4E06A04BA; Thu, 1 Oct 2020 16:49:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 223D71DB73; Thu, 1 Oct 2020 16:49:46 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7FC441C12F for ; Thu, 1 Oct 2020 16:49:44 +0200 (CEST) IronPort-SDR: CjcFZKwYIl9GWC/2XNRtDyGPrl7d3OoU1MkAc/NTbtzV0TejBfzDrBVEEV31lM4RbiBbOVs+IC kn9/DvRLxBKQ== X-IronPort-AV: E=McAfee;i="6000,8403,9760"; a="160074924" X-IronPort-AV: E=Sophos;i="5.77,323,1596524400"; d="scan'208";a="160074924" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2020 07:49:38 -0700 IronPort-SDR: pMmnwwilcbCm/yF/djTtgpz1zoUNft6XzclholG/+eL6NzvX4EK+KwqcXrNyo2SyjI5rRV0ZAl U0RviOGLnk9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,323,1596524400"; d="scan'208";a="325433681" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga002.jf.intel.com with ESMTP; 01 Oct 2020 07:49:37 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 1 Oct 2020 07:49:36 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 1 Oct 2020 07:49:36 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 1 Oct 2020 07:49:36 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 1 Oct 2020 07:49:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qn/JYYwREHebGifS4iH/w6Ks11N7++cXbCe3nTc46p7XI4ybrw1S7XdIDJFUEdVBnvJJ+5cWg5lX/Y36vfPVUq3nK77ab4WbntwsLXJzhd5Ae90czzjrX4HZBzkDj8RjQYL8nZzzd0jYR6Uk3B3rpiWu2U7vL6snUANTAq2ODX6o8jg90d2OH4S3bEpZA3elB59WKdYSK01aoDhWwxEUEk64+KzpItMDAzxpV5s2KJIAdS4MH15y3QT+GM0iwVEYNeMntC88NXyGNJdHiG3RUVgicg0KSxzZA3faOS3Cu5PHPO1o1sByysVmGdyB4xvIlyPUY2PFQHQvLRHLhR3ZHw== 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=Jb7Mhe9AXKWzeWkge5I94i4/RTnJ1hn9YJcKmHZ1RhY=; b=B1N+tEvlkXhhZ0rzxuk9rJBvb+vW7kQkkOgHqOmg0mfW7R8obOF/1SIlyX/4tVNV7zNBDfJsZpCT6YbFqOF/90xCCtu7ZQFO1JKs5RhvFRX3WzuTk1Jz3vuULEhkyXS1pFtFueE40G/m6eLCHM1Vx/6NuxcZZYbj2o56/6Xtfb4ufIoufQwmct7GXh0vi3OCkBYVLSvTWZiiddq0rFYXVXXRkCnMoA4frAPH4bsDmYgj7nBguPlB9OTfRlPwHvkRLoA2sPzS7LY3Ejggela/bjW9uCBXlKhX0UPHyFmobVwTLSkGP1M2zgrhm9y5cW4wShC6KJqRkTWbuM5rT3TdEw== 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=Jb7Mhe9AXKWzeWkge5I94i4/RTnJ1hn9YJcKmHZ1RhY=; b=qYTNahpQyhzmrjNuThfUfN6WhIkj8n47KNtGLO3PoPZN4tAWDkrbDuKbRmQVgNhdicxjxIzCPruW2padF5/Ffby2TjjudJNnb6bDD/ZjjnrNHuXOHlanvNpawP3fZskSiT1bzxTmrxUSDegmIVH2YztH31LmWBVViHBSwfptPTQ= Received: from MN2PR11MB3550.namprd11.prod.outlook.com (2603:10b6:208:ee::21) by MN2PR11MB4016.namprd11.prod.outlook.com (2603:10b6:208:155::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.26; Thu, 1 Oct 2020 14:49:31 +0000 Received: from MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::850f:c50e:27f4:a517]) by MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::850f:c50e:27f4:a517%7]) with mapi id 15.20.3433.035; Thu, 1 Oct 2020 14:49:31 +0000 From: "Coyle, David" To: "Power, Ciara" , "dev@dpdk.org" CC: "Power, Ciara" , Ray Kinsella , "Neil Horman" Thread-Topic: [dpdk-dev] [PATCH v3 01/18] eal: add max SIMD bitwidth Thread-Index: AQHWlyrt64+T/j5OnESg7EVDoXrANamCzN0A Date: Thu, 1 Oct 2020 14:49:30 +0000 Message-ID: References: <20200807155859.63888-1-ciara.power@intel.com> <20200930130415.11211-1-ciara.power@intel.com> <20200930130415.11211-2-ciara.power@intel.com> In-Reply-To: <20200930130415.11211-2-ciara.power@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows 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: [51.37.79.167] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a3bf2de6-ab50-454a-c248-08d866193445 x-ms-traffictypediagnostic: MN2PR11MB4016: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MNApKwWNviyqmcCAs3NxLeYyPSoXFh0UetZvch783rHIwnu/cMyZZlZblbn2Th2RsIHPXjV2UE68c6QiD140OOIzwCzpm6S3Yw1F+2y5EaMXP0seWARJP0MsqD/HstJMMj6wiscxsREAtCqUrCR3pIPXWY3Bxu7jhhNcnBX2+Fc+SFDHY7m0dCFLF796FVtU8qkPBiynuDOE+cOYq8l6h1zNdPh5upODXEwCDgOII29G1//c/yT7/jkam0xWD2DEuoRFRUZpZi1dsf2c6mXPmSLTD+Ecpc/XKriaDH0xneEdQpqeG/3EkeFz0oUX9gYp1HPhtqMSvKdFGeMGVqdh/kopy6Beb/T3ySG3mv71zkK51lZ7o+gFcD3SqVJIF9uFa7kddBZc9gApu53H/EQg2WOSL/OPtknuMWTTpgcriBqo3u2fJZ3AKQMPMtAJl73EmMzQcvUjEq3c53KtMj1VmQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3550.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(39860400002)(376002)(346002)(396003)(66556008)(76116006)(66446008)(316002)(478600001)(5660300002)(66946007)(86362001)(8676002)(66476007)(64756008)(8936002)(110136005)(83380400001)(71200400001)(26005)(33656002)(55016002)(9686003)(186003)(966005)(6506007)(54906003)(4326008)(52536014)(7696005)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: dtGhS3RqpfYtYQ9Evlum/xTh502ULOsap+rf3PNAhtswiqRaLp83nNUAr+h9MdPoaF/pLDdS0+mkDb7Uk6fMQz23wWb0UqVHY19vD8UEBunVH0cIlu5/4pXwRM9TOIu4ls7/+9954p3lqdH1NJNKv+tw00yNYNeovG0Pkvasw1mKLVjZpB8jWVMk9qXpXkiGQ7M7FFX7+zjmoQ0/zLBUHZ3DoCuK9s1dhncj0hmWRTn1kJ8Rj7YSK/m0jUTg4+Uc/gJkH94X9RT1fnvg1wNgHd26cK/qcowYxn6l3XUvjQWEpdouYf/U0ALpnSlbsZCi4FddsD795q7r3q5GlNC1dQns5cz8r2dzQpnjgbijtE12AngREcnL9slewMXBuHm/AzJifDnRux0ypUxQqbRU0O7ciArNvI5tRbxlN9s8KPR2b4QIgYdluZdLJwzEf3L/vzGM7JIovY79pZu8mACDJOq3xs8skLSR6/N0OA50wFyjsxP101ZoCFcJWL4KjpfiMioQe3SZhvZFqe+os3C431VzOWadVcrQQ82ayU8WpRmXOhVIjaalu29Rtqs7Wr3ON09tLxq1GYWSZSuJbQ6ETVn6XVZQrsuUHhoO+EMvtuylB6VGmxiOXssI8WtlnPIb6sRnblHrrqmudUyWZ61Blg== 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: MN2PR11MB3550.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3bf2de6-ab50-454a-c248-08d866193445 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2020 14:49:30.8678 (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: rXRrggvAZnB4/Ge43Q1Dbg4rpQEyvEPxVtdMezR7XiL0+OxlwsSVu18qtjH2fmwwpHS/PsXrcTWmClludAw9jA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4016 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 01/18] eal: add max SIMD bitwidth 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 Ciara > -----Original Message----- > From: dev On Behalf Of Ciara Power > diff --git a/lib/librte_eal/common/eal_internal_cfg.h > b/lib/librte_eal/common/eal_internal_cfg.h > index 13f93388a7..367e0cc19e 100644 > --- a/lib/librte_eal/common/eal_internal_cfg.h > +++ b/lib/librte_eal/common/eal_internal_cfg.h > @@ -33,6 +33,12 @@ struct hugepage_info { > int lock_descriptor; /**< file descriptor for hugepage dir */ > }; >=20 > +struct simd_bitwidth { > + /**< flag indicating if bitwidth is locked from further modification */ > + bool locked; > + uint16_t bitwidth; /**< bitwidth value */ }; [DC] The doxygen comment on 'locked' flag uses '/**<' so should come after = the field. Having the comment after the field seems to be the way it's done in this fi= le so I'd move the comment as opposed to removing the '<' > + > /** > * internal configuration > */ > @@ -85,6 +91,8 @@ struct internal_config { > volatile unsigned int init_complete; > /**< indicates whether EAL has completed initialization */ > unsigned int no_telemetry; /**< true to disable Telemetry */ > + /** max simd bitwidth path to use */ > + struct simd_bitwidth max_simd_bitwidth; [DC] Again the doxygen comments seem to come after the struct fields in thi= s file so I'd move the comment for max_simd_bitwidth to after it and add the '<' > }; >=20 > void eal_reset_internal_config(struct internal_config *internal_cfg); di= ff --git >=20 > diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rt= e_eal.h > index ddcf6a2e7a..fb739f3474 100644 > --- a/lib/librte_eal/include/rte_eal.h > +++ b/lib/librte_eal/include/rte_eal.h > @@ -43,6 +43,14 @@ enum rte_proc_type_t { > RTE_PROC_INVALID > }; >=20 > +enum rte_max_simd_t { > + RTE_NO_SIMD =3D 64, > + RTE_MAX_128_SIMD =3D 128, > + RTE_MAX_256_SIMD =3D 256, > + RTE_MAX_512_SIMD =3D 512, > + RTE_MAX_SIMD_DISABLE =3D UINT16_MAX, > +}; [DC] Add doxygen comments on enum rte_max_simd_t and each of it's values > + > /** > * Get the process type in a multi-process setup > * > @@ -51,6 +59,31 @@ enum rte_proc_type_t { > */ > enum rte_proc_type_t rte_eal_process_type(void); >=20 > +/** > + * Get the supported SIMD bitwidth. > + * > + * @return > + * uint16_t bitwidth. > + */ > +__rte_experimental > +uint16_t rte_get_max_simd_bitwidth(void); > + > +/** > + * Set the supported SIMD bitwidth. > + * This API should only be called once at initialization, before EAL ini= t. > + * > + * @param bitwidth > + * uint16_t bitwidth. > + * @return > + * 0 on success. > + * @return > + * -EINVAL on invalid bitwidth parameter. > + * @return > + * -EPERM if bitwidth is locked. [DC] Minor thing.. normally there's just 1 @return tag with all of the retu= rn values under it as a bullet list > + */ > +__rte_experimental > +int rte_set_max_simd_bitwidth(uint16_t bitwidth); > + > /** > * Request iopl privilege for all RPL. > * > diff --git a/lib/librte_eal/rte_eal_version.map > b/lib/librte_eal/rte_eal_version.map > index c32461c663..17a7195a3d 100644 > --- a/lib/librte_eal/rte_eal_version.map > +++ b/lib/librte_eal/rte_eal_version.map > @@ -397,6 +397,10 @@ EXPERIMENTAL { > rte_service_lcore_may_be_active; > rte_thread_register; > rte_thread_unregister; > + > + # added in 20.11 > + rte_get_max_simd_bitwidth; > + rte_set_max_simd_bitwidth; > }; [DC] rte_get_max_simd_bitwidth is called from rte_net_crc (and other librar= ies) so this symbol possibly needs to be added to librte_eal/rte_eal_exports.def file to= o. This is the windows symbol export file, used on windows build. This has caught us out on the AVX512 CRC patchset https://patchwork.dpdk.or= g/project/dpdk/list/?series=3D12596 where a windows build failed in the 'ci/iol-testing' checks in patchwork be= cause rte_net_crc couldn't find the symbol rte_cpu_get_flag_enabled, which also c= omes from rte_eal. We have to add this symbol to rte_eal_exports.def to fix this= . The 'ci/iol-testing' check has not run for your patchset so I can't say for= certain if the windows build would have failed for you, but I think it would >=20 > INTERNAL { > -- > 2.17.1