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 2C9F5A04B5; Wed, 28 Oct 2020 00:48:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA1672BFA; Wed, 28 Oct 2020 00:29:20 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 57F622BEA for ; Wed, 28 Oct 2020 00:29:17 +0100 (CET) IronPort-SDR: kvO05pItr0ATwBpHVzhL2fK2SRzBj0K9qytHhxkqcCFBCcOZRKhy28QBVvcHsAyG+ReKmM+UKN 6duSDUYu+30Q== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="147463794" X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="147463794" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 16:29:16 -0700 IronPort-SDR: LkXYMa3i1na2/DFzWrOfXyCfE7hy4Ob9saHiqXeidul7T5w6oJXMTgUsPqzkRI0EOO8dtR7cRI Hkcv+Sy6fQig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="524915317" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 27 Oct 2020 16:29:16 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 27 Oct 2020 16:29:15 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 27 Oct 2020 16:29:14 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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, 27 Oct 2020 16:29:14 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 27 Oct 2020 16:29:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFL+faULjxm9c4xnUyWmvTjDimgXxhrdD8K+MzoXBuxS/Mp+lD669/IJu2VRlNph7V3Kl8YvoPqgfpP0RiIWvxG+1eAp6ghe8sQtV+d+G168le9UwJDcXSNlVc8DJGNOWO81m9psyS8/4uYvTsUmrPaU/C6ZcjgV0QeYyqrbJGGfcsN/wG6MToEpTFXwzBE04KWnXrx9aiCJcxoQoz8wWgb2bznrlhRl8X9C94kVA/bwnMmJ+NvhI/3smv7OomhNdRBSOM4NtakRWOrWNokLRTHfdmP82P96UZAtSx7pj///SVeaRz5C1E91lzMNqgS1tSOV7wwBj+9K0LsXvzWpoQ== 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=mOBQj7K5Cwd7wLWcadD6PlsYlCsyNm926FZ0d2G2ie0=; b=bqbG4+j3ZRG9mXwzHCS/0ouCpcxsVMy5YwUptIQU+xzLMFzdHfvlSrj2z48UOmi0hjUwB2ttri4lN6+V0udwwUsx4kC7MEN4EdGQUxcNrgPlnCLVgBYbpMjzw8oTuuKlVKLCqwTnwlUEM4V5akXVcGBSC/7TeghERjzlsEhGnbyUrtK954OtqfjlUpWNgzdsX81Es3z/4lFx6u+H2p0J/bLgtry0lw9vDIQp5mWF1Fhvy8cYaIVCgxuOMLbt/yydvflCNM3m43gji0Ji7WJsy1Wv0gDixl/ycWm/nc/S6Ux0Ql/4Lsdk1l4gLD10u3I1kiQPd0YCDjIB7xV4JYLzBA== 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=mOBQj7K5Cwd7wLWcadD6PlsYlCsyNm926FZ0d2G2ie0=; b=nU8NAuUQHg8YjPLxXBGoXSa97n93MD7i2Sn7Ztayuuvn84gSU4lLZsfnl49b22//Jv3qPozaHjOIQ4lYq60wp491Cs4g46OpDfX/7LAY/nhEnHDXmKFIrwp2JuYRE/gSSTkAsfB1Nooh/xeb0EXd3HW7OhH35MaU16mRH0K/rjc= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by SJ0PR11MB4864.namprd11.prod.outlook.com (2603:10b6:a03:2d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Tue, 27 Oct 2020 23:29:09 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b%3]) with mapi id 15.20.3499.018; Tue, 27 Oct 2020 23:29:09 +0000 From: "Ananyev, Konstantin" To: Thomas Monjalon , "Ma, Liang J" CC: "dev@dpdk.org" , "Burakov, Anatoly" , "viktorin@rehivetech.com" , "Zhang, Qi Z" , "ruifeng.wang@arm.com" , "Xing, Beilei" , "Guo, Jia" , "Yang, Qiming" , "Wang, Haiyue" , "Richardson, Bruce" , "Hunt, David" , "jerinjacobk@gmail.com" , "nhorman@tuxdriver.com" , "McDaniel, Timothy" , "Eads, Gage" , "drc@linux.vnet.ibm.com" , Andrew Rybchenko , "Yigit, Ferruh" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "viacheslavo@nvidia.com" , "matan@nvidia.com" , "ajit.khaparde@broadcom.com" , "rahul.lakkireddy@chelsio.com" , "johndale@cisco.com" , "xavier.huwei@huawei.com" , "shahafs@nvidia.com" , "sthemmin@microsoft.com" , "g.singh@nxp.com" , "rmody@marvell.com" , "maxime.coquelin@redhat.com" , "david.marchand@redhat.com" Thread-Topic: [dpdk-dev] [PATCH v9 04/10] ethdev: add simple power management API Thread-Index: AQHWqZE3z65AkE+Fe0eVJps/s0I8camnOIaAgAQZLQCAAE1zAIAAHTNwgAAPIYCAAEhb8A== Date: Tue, 27 Oct 2020 23:29:09 +0000 Message-ID: References: <1603494392-7181-5-git-send-email-liang.j.ma@intel.com> <3195982.LjJ4KgG7bb@thomas> <1639360.KZQzHLtdKU@thomas> In-Reply-To: <1639360.KZQzHLtdKU@thomas> Accept-Language: en-GB, 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: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5104bed7-1a2f-462f-0c00-08d87ad01af1 x-ms-traffictypediagnostic: SJ0PR11MB4864: 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:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BHnu6dAZ0hTae37GbanXx1aXkRoAjxpVQbs9L1x7kgxsdIyAN4Vg1RSymYEkaioHZbnzXdZbt0e2CKoh9ZMpkW4dxYBVcsfWuqUD/itJxW4Xs+LBw3gzRNCTTxog0iK/N3muN0+IZUw8wFAtqVrriLCLSZYw8V3blk3hOWsINH/jo081Li2oyxPikHAU6fMiJyTFojQZ6y6hxct/yNwakIPQo4maQAnr73rhClvCy1EdP8xO87PT2XI7z6SgomWqtBuJbndK3e6q54y9ZeKFFeGVtC/VrUuKQzT42axGysJwOMVLu2MWqPAmJT6edGI5SiP7BVzz4u6PXXJS+Uc1zQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(396003)(136003)(376002)(346002)(5660300002)(7416002)(9686003)(2906002)(4326008)(7696005)(83380400001)(8676002)(55016002)(26005)(52536014)(478600001)(71200400001)(45080400002)(86362001)(33656002)(6636002)(54906003)(76116006)(66476007)(110136005)(66946007)(186003)(316002)(64756008)(8936002)(66446008)(53546011)(6506007)(66556008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 0YkJuuNEdFNqYLBif3MykfUPtGRKlkpqpYTg1zNhQaAvzK930RAOONuqxcLdjmnthXPsIwpmNxtKm2CRgRL8l9ZYzmD11ol4FWJcApKPwKWErb+/PPa1Of8LC4EVFB8IrjiQnAiLG6yqGeT8JKK/7CvEMAnxL/wlL6ioBL5ChT9tJpljeaaRIyigIz0BPVmOf5DhyPUWfzMbreLUpRAoaQk4fjHOZxY2dxfHTol+nsXrceKvaicTgSmhXNCBsEDNpspYnGcyygFYGGjRutAjQNUcl0jLvlElM1ky/vz277ZJwneEHivDZTiQt+dm+C9tvrZNFvifsdgw0qvTmQdGe/pQIPTN2sxxXBIaoO6T9FCGY6tiTDqs2rZ1wx3UNc6ASHbsHHYqHZf8ex6dycBZ4kOt2lrVj/bqPiho4sfiTT83NQSafiXP/VauNgfrPkJUn5y1o7S/k4IvuJF5jdmFg7SgeAilchkE8ngilLyzYgyFtEXJjxTK+1vn5h2xLRQ1E5q6vDUibVi57E1v5zrYeAFJIbtNfP5PsW0dFxa8HWn4gyeZaXdgA/G/dib9gMrsw65/E3QR6J6YnqOoK1nTy8CGc6Xc8QaTt5V4pnNqDzALGZHbmDHPAF2E+VspjDqR8RN4slXdeH9Ur2PFvWvZww== 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: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5104bed7-1a2f-462f-0c00-08d87ad01af1 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2020 23:29:09.3867 (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: lCtDNcqv9JUwMTvbvCkrPuEoymBEFyMyu8Xxh1XqCIHU73zos1UCoKAsQ0R+L73+9wzQk+zPlJ/mIXrvdA5r6yyEIP+7a870wE6dXlPNGqY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4864 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v9 04/10] ethdev: add simple power management API 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: Thomas Monjalon > Sent: Tuesday, October 27, 2020 6:31 PM > To: Ma, Liang J ; Ananyev, Konstantin > Cc: dev@dpdk.org; Burakov, Anatoly ; viktorin@= rehivetech.com; Zhang, Qi Z ; > ruifeng.wang@arm.com; Xing, Beilei ; Guo, Jia ; Yang, Qiming ; > Wang, Haiyue ; Richardson, Bruce ; Hunt, David ; > jerinjacobk@gmail.com; nhorman@tuxdriver.com; McDaniel, Timothy ; Eads, Gage > ; drc@linux.vnet.ibm.com; Andrew Rybchenko ; Yigit, Ferruh > ; jerinj@marvell.com; hemant.agrawal@nxp.com; via= cheslavo@nvidia.com; matan@nvidia.com; > ajit.khaparde@broadcom.com; rahul.lakkireddy@chelsio.com; johndale@cisco.= com; xavier.huwei@huawei.com; shahafs@nvidia.com; > sthemmin@microsoft.com; g.singh@nxp.com; rmody@marvell.com; maxime.coquel= in@redhat.com; david.marchand@redhat.com > Subject: Re: [dpdk-dev] [PATCH v9 04/10] ethdev: add simple power managem= ent API >=20 > 27/10/2020 18:43, Ananyev, Konstantin: > > > 27/10/2020 12:15, Liang, Ma: > > > > > > --- a/lib/librte_ethdev/rte_ethdev.h > > > > > > +++ b/lib/librte_ethdev/rte_ethdev.h > > > > > > +/** > > > > > > + * Retrieve the wake up address for the receive queue. > > > > > > > > > > I guess how this function should be used, > > > > > but a bit more explanations would not hurt here. > > > > agree > > > > > > + * > > > > > > + * @param port_id > > > > > > + * The port identifier of the Ethernet device. > > > > > > + * @param queue_id > > > > > > + * The Rx queue on the Ethernet device for which information= will be > > > > > > + * retrieved. > > > > > > + * @param wake_addr > > > > > > + * The pointer to the address which will be monitored. > > > > > > > > > > This function does not make the address monitored, right? > > > > This function only get the target wakeup address. that does not mon= itor this address. > > > > > > > > > > > + * @param expected > > > > > > + * The pointer to value to be expected when descriptor is se= t. > > > > > > > > > > Not sure we should restrict it to a "descriptor". > > > > actully that is not limited to a descriptor, any writeback conten= t should work. > > > > > > > > > > Expecting a value or some bits looks too much restrictive. > > > > > I understand it probably fits well for Intel NICs, > > > > > but in the general case, we can imagine that any change > > > > > in a byte array could be a wake up signal. > > > > > > > > this parameter doesn not limited user how to use it. > > > > In fact, current design can support any bits change within 64 bits = content. > > > > > > How the driver can specify that any value change should be monitored? > > > I understand that it is only a value/mask pair, > > > it does not give room for "any value". > > > > As I can read the code, value=3D0, mask=3D0 will provide you with 'any = value'. > > Though it would mean that rte_power_monitor() will *always* go into sle= ep, > > so not sure what will be there any practical usage for such case. >=20 > I think what is missing is to allow waking up when the value > of a byte array is changing, without specifiying any value. I think it will always wakeup on any write to wait_addr. What you control with value/mask pair - when we should go to sleep. In other words: ret =3D rte_eth_get_wake_addr(port, queue, &wait_addr, &value, &mask, ....)= ; mask=3D=3D0: always go to sleep, wakeup at any store to wait_addr. mask!=3D0: go to sleep only if (*wait_addr & mask) =3D=3D value, wakeup at = any store to wait_addr. =20 Liang, Anatoly - feel free to correct me here, if I missed something.