From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78257A00C2; Thu, 21 Jul 2022 14:16:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A79240A7A; Thu, 21 Jul 2022 14:16:01 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9DBEA400D7 for ; Thu, 21 Jul 2022 14:15:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658405758; x=1689941758; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lrSuKqi+lhPjpqMZugUR84k82G3bKO0IlMRwxzEG9+g=; b=Hq2B117AF5uAubCIKHOXrvwmWpj9nXSRj9zQAecOxDd/uTlwq8R+I3jh k46mXFTyFErGdS3HXvVk6NLA/bHeJIql+tF5nX9Py1+aYnPpLPz8CEL8a Ae0HCqjsSrPMuuFsoHfFZkNmzb8TmpMoahFFsH/FTHs7/0N7MIRmXMmOF qzELbSplA5VpZjYYG0UU1TGmiJZTI3V/YTrt3DQUrzrOK7Pm4+hkkZ5+K MqfkSGZwvIMZAvIicnNLxCnQlKzSx2mbiJwR8fodPN9Yz6i5Xl0CXK9lz tB3CsdmhvLWIwe/pxJR48gynd3uC8lOfBu491ODnkQWqlzKPops0Q9pcS w==; X-IronPort-AV: E=McAfee;i="6400,9594,10414"; a="267425809" X-IronPort-AV: E=Sophos;i="5.92,289,1650956400"; d="scan'208";a="267425809" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 05:15:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,289,1650956400"; d="scan'208";a="687888056" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by FMSMGA003.fm.intel.com with ESMTP; 21 Jul 2022 05:15:56 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 05:15:56 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2375.28 via Frontend Transport; Thu, 21 Jul 2022 05:15:56 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.174) 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.2308.27; Thu, 21 Jul 2022 05:15:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V9WmR9LSo5YJ2Bqz7KpEONHMqfiAPurj+pnWyXKlAH7vgMFQqzUzT05Ds2mvnWq7/cWrR2/Q5Qxzp01Xfjj3xrPs/1b2AIAtvT446h3/PNWvTPp6PhsRDEh7b9OVLJguDhzQoyQ+id6a1aLHRZUrbIycgtlRcNkaya06VBLdpm4AMmP33MvGBn+KERG4A59//ENz+ONXcwpueb2+BEwxYahVcj1MtOnKMX126D5Sqx/2aCYWzfX4jEQIy50EDBLbAdQvKcrNj2T9OtP9WE5EYHd0tr2JiYIM2yadVTFVju2RcIOzHrTMpm1om0d+m31iEbEjtZzJDBb8zKQtcF4ciQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uGaDzTccsH+y5Lj9T3vNx18+ArUB2/mMtJmSUjSZnjA=; b=SRgFgXbtSgHgRnQESR3u5yQfCVO+tedit8BuapOc30YT2/3dWC83k7K0dG1YNEC/f84yo7SSyp4sjZNGQFaCYJk8gCapSDG9/GCvFgzKFecRU1PPuPhAwOoiegv58lTLVhM+nLGByqI5ikBzDxNmG1I33eP3jBL7+EPtVFAPHLtmZcO5IEC+vXTuDaUfOE3KZyrkLjO6tg6+a7sda3VIgiyHymOArNKPYu0ToI0EHT0+EjVdX0Sis7TiMSzbtKIVGwng1gpRQ1WoNQIM1rfndithA0isEEAO0K70MIdODjP//L0xK2ulHa9lZY2USFHjOYBK+Eg0o7+5hwHjj5E/Og== 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 Received: from BYAPR11MB3366.namprd11.prod.outlook.com (2603:10b6:a03:7f::20) by DM5PR11MB0043.namprd11.prod.outlook.com (2603:10b6:4:69::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Thu, 21 Jul 2022 12:15:04 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::cb0:d200:dc4c:29a9]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::cb0:d200:dc4c:29a9%7]) with mapi id 15.20.5438.023; Thu, 21 Jul 2022 12:15:03 +0000 From: "Pattan, Reshma" To: "Kearney, Tadhg" , "dev@dpdk.org" CC: "Hunt, David" , "Burakov, Anatoly" Subject: RE: [PATCH v2 3/3] l3fwd-power: add option to call uncore API Thread-Topic: [PATCH v2 3/3] l3fwd-power: add option to call uncore API Thread-Index: AQHYlsHqAJ69QbenYk6JvbDbZrTqSa2Ikckw Date: Thu, 21 Jul 2022 12:15:03 +0000 Message-ID: References: <20220713140706.4143705-1-tadhg.kearney@intel.com> <20220713140706.4143705-4-tadhg.kearney@intel.com> In-Reply-To: <20220713140706.4143705-4-tadhg.kearney@intel.com> 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.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6b8be737-19fa-49f9-c221-08da6b12a47b x-ms-traffictypediagnostic: DM5PR11MB0043:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: P668JmU4v3IfZlbuSKeY71sGGbZN6IPIVP1LIcbaX1m9Vtx25SkOjSEBIRnKYt0PHOtc7CaaeFEXrSicclKRf5cETvwuYkSrPc6zjgCa7MOtWsksB0f1JEoY+Z+wT3W4GnLX1t7obGs+DkAXJdLZo5bZFPQ8znpjV9V9MkGQFInC1wi5MwFcZqojYCyEjNX51ngdeURqEP1ruTpL+xiYcmZhIGpaRZdl+wPdD5iFzWboH7uFnGTMuw2Gu0YwOuWMopWxTpFqGyF8zBkQ4uJ/522et+PgLK/gjvUsOWemupxT80NM98487u/GCPeWCYj2Fdeh4j0/1zJGnsuXHL3XjOjHTzEUsU0PAqE+95DSQk+MSwy225AFjDQovr08225dGeIuNAdb4Dtg+Uv3ik4YKQ0ZaGgk+TszPpPPlvsycYrF29d01KVuB8sEBRPyAzHYR29wTrCzuA7YOChmvt29YN4slORTl/3tR7rsFeSVI80tS+FxwZvRZQDNFnRpcPkyke8O1b9/XSQ5BBZ5/r8VO3zFxUw4joxShNCfk6nTTEKfcY3GGpyPh4nBjPvdPbEMPXpzW6FD60Ke4MdvWKChUiY71BmNiqy9OFpXIDN9fOWnj07q82ZPVIeE5q2OW6K+X4wjj2ELhG0krjqTVuZfdZ0oRq8tUeQf5JWxti7XGJHIbkKpVSOACCQMQiGUKmVCfGSDTBp5W+sBosdq39sOCHlyWgJgYVbpeXM1XFwsIooZVay7SeF7mMLo4pUqzaSZcz48xZ26CK4Bz9Aabp4aeMvVOMbtLOXzyJWxPLU4kHcukB56/DJFGU/7HSpE7HSPjoOVzj7EgeMRe8F32NGcoQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(39860400002)(136003)(376002)(346002)(396003)(5660300002)(38100700002)(8676002)(55016003)(33656002)(76116006)(64756008)(66556008)(66476007)(316002)(66446008)(52536014)(110136005)(66946007)(8936002)(4326008)(6506007)(26005)(38070700005)(186003)(71200400001)(86362001)(82960400001)(478600001)(7696005)(2906002)(9686003)(83380400001)(41300700001)(122000001)(107886003)(54906003)(32563001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pm+YQU+XpYrSp+IGyMISYeRbnVVP0UnJ9X4DcChx3GwF9OejCwXLVisLTSUJ?= =?us-ascii?Q?mB+w1pF7A8yRaAf87un5Uv7NbrcpYpDUUSKN8YtEsKm2tcN5zl92FJG2G60b?= =?us-ascii?Q?OhQnQzk6f8/I6BeMuNa8VzC8pPYWeCuvE97qKAYz4U+Sakx/xov6dUU8bGsf?= =?us-ascii?Q?mdlXvGiGRFXJj7HUhL9uooai462TChEgP8wKQsZEuiOe+y6tnKkTQdM94zfg?= =?us-ascii?Q?QyTGDarbUCTuhxu6mZ4pkXmKtM1eFqpjjoJakrOutbolZ817jHl+B9lCWYsy?= =?us-ascii?Q?cL/IM4Bive03Ny5md88GonqpYk2n65gfdbIMUZeYky3Ams+hmqG50GFMgcZD?= =?us-ascii?Q?Q2outRYiildTl2Eu1O6e4sJeoHyDD8uegejfREQ8h/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tU1D9NSGiP7xPA0GaSI8yu8IOk4jEczMUCwINV?= =?us-ascii?Q?Y8cFkBjWTNxrThSbWxvMBBlUsWLkD5O3OnahJh9vpmrxvskvnwp4GwDXBJMh?= =?us-ascii?Q?oFmOouSdU7ccGwD5dMGRehGgRDdRfa8pKsUZI91XCVAL2kVB8QnVdND9g8x5?= =?us-ascii?Q?+u2pP0OmIlT4FB43xW8kzieWWNlG9PfrOA4OjdY030f5XsG53vH2CS9YqRe2?= =?us-ascii?Q?4uc49hJ004ZusLzya3SoM4MaHqy6zvqAvgPKJSyWffRxsVsRC4+su2F9Vllu?= =?us-ascii?Q?208oT46+Yg7kiLzkbhuunFiiGLE8jVrcVAP5sB1H?= 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: BYAPR11MB3366.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b8be737-19fa-49f9-c221-08da6b12a47b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2022 12:15:03.9191 (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: 0cA2lWg9Ao1QtQUCYDhnGBhTAw5bngn8G2N001jz95TLLO8ydEgk+TI4Hfc14bxoNobpY7WSofEKKGiMz9le4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0043 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Kearney, Tadhg > +* -i (frequency index): optional, sets uncore frequency to frequency i= ndex > value, by setting min and max values to be the same. > + This is not optional argument. Need to remove optional in the help text of = the parameter. > +``-i`` > + This will allow you to set the specific uncore frequency index that > +you want, by setting > + minimum and maximum values to be the same. Frequency index's are set > +100000Hz apart from > + maximum to minimum. > + Frequency index values are in descending order, ie, index 0 is maximum > frequency index. > + I would say by setting the uncore frequency to a frequency pointed by inde= x . The frequencies at each index differ by 100MHz. The value you have ment= ioned in 100Khz. > #define IPv6_BYTES_FMT "%02x%02x:%02x%02x:%02x%02x:%02x%02x:"\ > - "%02x%02x:%02x%02x:%02x%02x:%02x%02x" > + This change looks to be accidental. Undo this change. > printf( "IP dst =3D " IPv6_BYTES_FMT ", IP src =3D " IPv6_BYTES_FMT ", = " > - "port dst =3D %d, port src =3D %d, proto =3D %d\n", > - IPv6_BYTES(key.ip_dst), IPv6_BYTES(key.ip_src), > - key.port_dst, key.port_src, key.proto); > + "port dst =3D %d, port src =3D %d, proto =3D %d\n", > + IPv6_BYTES(key.ip_dst), IPv6_BYTES(key.ip_src), > + key.port_dst, key.port_src, key.proto); > } >=20 No Change here , so should you undo this change. > static inline uint16_t > @@ -674,9 +692,9 @@ parse_ptype_one(struct rte_mbuf *m) >=20 > static uint16_t > cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused, > - struct rte_mbuf *pkts[], uint16_t nb_pkts, > - uint16_t max_pkts __rte_unused, > - void *user_param __rte_unused) > + struct rte_mbuf *pkts[], uint16_t nb_pkts, > + uint16_t max_pkts __rte_unused, > + void *user_param __rte_unused) No change here, so should undo this change. > - uint16_t queue_id) > + uint16_t port_id, > + uint16_t queue_id) No change here, so should undo this change. > { > uint32_t rxq_count =3D rte_eth_rx_queue_count(port_id, queue_id); > /** > @@ -1051,7 +1069,7 @@ static int main_intr_loop(__rte_unused void > *dummy) > * less as possible. > */ > for (i =3D 1, > - lcore_idle_hint =3D qconf- > >rx_queue_list[0].idle_hint; > + lcore_idle_hint =3D qconf- > >rx_queue_list[0].idle_hint; No change here, so should undo this change. > @@ -1616,6 +1634,9 @@ print_usage(const char *prgname) > " [--max-pkt-len PKTLEN]\n" > " -p PORTMASK: hexadecimal bitmask of ports to > configure\n" > " -P: enable promiscuous mode\n" > + " -u: set min frequency for uncore\n" > + " -U: set max frequency for uncore\n" > + " -i (frequency index): set frequency index for uncore\n" Might be eidt help text a bit, " specify the uncore frequency index that un= core should be set to." > + d =3D opendir(UNCORE_FREQUENCY_DIR); > + if (!d) { > + RTE_LOG(ERR, EAL, "Unable to open uncore frequency > directory"); Log is for L3FWD_POWER not EAL. So need to fix this. d =3D=3D NULL should = be checked rather !d. Also print error string returned by the opendir in th= e log. > + return -1; > + } > + > + else { Else should start in the same line where if ends. Here in other places.=20 You don't need else perhaps.=20 > @@ -1861,10 +1988,12 @@ parse_args(int argc, char **argv) > {CMD_LINE_OPT_SCALE_FREQ_MAX, 1, 0, 0}, > {NULL, 0, 0, 0} > }; > + const char *min =3D "min"; > + const char *max =3D "max"; Instead of using strings to specify if user option is min or max. You can u= se either of the below options 1) Use global Integer value and set that to 1 in U case . And set to 0 in = u case.=20 2)OR have parse_uncore_min_max() function with one default argument set to= 0. When the argument is passed to 1 assume it to be max freq to set else m= in freq to set. Thanks, Reshma