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 34735A0503; Wed, 18 May 2022 11:12:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 250BC40221; Wed, 18 May 2022 11:12:10 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 94CC64021E for ; Wed, 18 May 2022 11:12:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652865126; x=1684401126; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Qi+6ENUCjR4gw6srYw6hXBZDVZ4lchVwDf+VCje3Ko8=; b=jWXEgVJnjAM9NpkhJ8XgDdo/aHnqRfW3+7WP5EXTHQHFxUfLkQebQUVJ h/sL9qWFTmZ4rAda98iGXhRf07L35Ay6Cb5kUmS3atOVTYP5xhtdDEt6s Nj0USz6cgET29lB8bAVm7fIxPcGQSH7rqrpBrpWpeTiq7vyu2pIHm1IQq YxbfLdBD96jDEO95UtMcdtWwpruXgMmiHsBXqiyrIYLfHvKmo1u/MM5R7 4gJwkbsXL0e+96F+xeDEs+9s+0M1V0sXczhC4ppFNmAAL+Vd5HM9Bhef3 GYj6jXEuBrw1WJgqcRoQVnPaJ2P+6W4xwsOA1HiCNJxJGWnf1nwQE1xdI g==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="296860873" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="296860873" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 02:12:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="569361898" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga007.jf.intel.com with ESMTP; 18 May 2022 02:12:05 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 18 May 2022 02:12:04 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 18 May 2022 02:12:04 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 18 May 2022 02:11:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NX2LFjg3ATxVz/sRyz0joFwI4qDL8pZBWuMle3Wzv+xplfv56id8U174Md46USDsHCvo0QMUTSsNksjTpw9bCJFKoKWIt6HTwGp2JI/BITP7+4bdK1fgB9ZKBMSdGlXCHfP1zK7viKcYdeovensssmFeyb7zSJh5/0Hd6pPgw8s22jxUOfUe16mEFNTYsn9wBx+LJu51UdJK02mKLWe0+6pPcmhsyKwb4fW3AHPXKFB0FhmiM4mC462+2M04deHpj9AKHaCy0IrCfUd7b/77Gd4UDhxtqnLAN/HTOruAyHFBB2c8DnCL8kxmU7wtELahCGmK8vMZoZhF3EujmUvMgg== 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=piQgXt5o4gq/0tkoEKo1TEf6GqXjTjxMmwOCj5wYTEM=; b=TYpntm4JaY1a0/OsYQc43FVB3USBfnoPDBcW46tX8mE7subfWwIH02PENejhQ97pW3MTq775HE1b0MnTgGiXispsY6t7fFQR4G+MFDkrI/0/xwa7YvnVGgFFI+KQbrsI3x+ABlcaOsf+LyY2ScI25TQVrgRBL5lGJgfDc3p/Kd50LFKHbGkiLPVy3UhDQ0o+kEZlPtUB19c6bWqu3RpGuq2iZIAI2RERSWdqxyJduN61iNt8kjnEY9qiNJb3stNEN0fiBr+r0aPRYYTHvOK4mlENpHAwRyZgX4xLPXcIAjupDiqEEfYa5GgIE+hrZwiFl61ZkDTRHGS+JBt3SZmSBQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by BN7PR11MB2849.namprd11.prod.outlook.com (2603:10b6:406:b5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Wed, 18 May 2022 09:11:50 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::28af:8ec5:1817:1af1]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::28af:8ec5:1817:1af1%3]) with mapi id 15.20.5250.018; Wed, 18 May 2022 09:11:50 +0000 Message-ID: Date: Wed, 18 May 2022 10:11:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.0 Subject: Re: [PATCH v2 4/4] examples/l3fwd_power: add cli for configurable options Content-Language: en-US To: Kevin Laatz , CC: David Hunt References: <20220408140847.1319312-1-kevin.laatz@intel.com> <20220419112501.1835458-1-kevin.laatz@intel.com> <20220419112501.1835458-5-kevin.laatz@intel.com> From: "Burakov, Anatoly" In-Reply-To: <20220419112501.1835458-5-kevin.laatz@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0130.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:193::9) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1459978b-5027-48eb-9732-08da38ae714e X-MS-TrafficTypeDiagnostic: BN7PR11MB2849:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: caKUSziT+Zom9CfH/NHvR0yzLHdSK8REVc8vJxx0oX0wiJ5fm9JzvrqTXPJprm4FkLVOE8I9uUYiecJhsHQSwaQ4bv2Ma24HTKKSg0HONtpj7sJITJgUQXMLLH/oQzpMeudiXCizR5/6vi1lwKem3QN2hccUfKMIzXz740ynH8i7jnsiKkvgsvlfa210MU55sfrUOFzkdNm6+/hmZvVrHl5wgu+G7WJONiuHWKOS2+HwbZxUje85SnfyYA5QwjXSFfLN+bhGyvHIMiqJg6tJQJXskpZ0owhJ5s06IkaDzOsQHoIxH4XIcnLb1IbHG4zXWBnG+0lJjeOtmxz2WL5kwwQyeZe2Na5Oysudqlv/iCPCxBdYR/DxKFKwF+ykf99nBFkTOjfqpEk3dpZidVleIT1BkOHk7w2pebHjkcDZNYrH4bzXsjKVgQgU0/n4f+BAuYbVhOHZsQkK+Ck9FWDlhmJpNGTH28Qmssu9XHAYWsX1hX/1GYBf7cvEl0Rs8herj1JxeLrybOf/PVe/naqBUFk68dZXskehRhO9ZhhHy98cJmL9oVQuqWl3HBtn+cHHQgyvlBWVTy1uPbOSrz206EVeet6JF8GBhCxE78eERECVzhtdRA+h/sxMDxSroZh7+cMUPc0Z1mQykcVRP4tccsOpPet0Te+kzCmUWTmWJSMQExWuHFV/ruNh7kIO0VJ7vqeaD70mPkbA2Kj2Pwq0gMxf3yB9EleFfefJhbc+8nA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(186003)(107886003)(8676002)(38100700002)(31686004)(86362001)(36756003)(316002)(2616005)(82960400001)(66556008)(6506007)(508600001)(8936002)(31696002)(2906002)(53546011)(6486002)(26005)(6512007)(66946007)(5660300002)(6666004)(4326008)(66476007)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K1I4ZWZOMjdDd2VvRkhNcUZ0YXo1d2w2d0o5eGM0OGpCa3htTUlMR0xhRnR1?= =?utf-8?B?UTl5U2c1MzJwTjVsSHEycENIOU9VWHNobE9DT2tOMUMzMkZMRXZOb0gybWVt?= =?utf-8?B?M3pZaDRVMW9tZ3ZkT29xNmw0RkZSN3BFenpWY0gwaEkvUjN3MmVYRnMrbUVy?= =?utf-8?B?R0JNRFlzdUhaOHBjT3JqVWs5M2ZxQ2ZkN2Y2TU96UVJnRVNCVjlCYk9TeG1N?= =?utf-8?B?U3hOTEl4ZEpLckpNRDdBNEpabUZkRUpnd1JRcHVua1N2UitnVCtQdmJTbUxz?= =?utf-8?B?dHZNWm0rMUtLK1RabFAvaDE5MDc3UnNoSm5KRWgrV0ZDQjdJaGlHV3FpZ3lY?= =?utf-8?B?YTRsTDFNR0NOa2hnZVVRWjFjZmI5M2wxZTlXQ0FlcWJWd0VLcTEzWHl5b1NU?= =?utf-8?B?QU8vSW1WUWd4bjZFdkJPOEg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tkl2WVc5K0xJb3Z1M2Y0SnUrd0JoeVIvOXVpT3FKcmdOSFVjZlcxTHViMFE2?= =?utf-8?B?S2RIa0Z0RVZCVUlUd2lKYVpvSlZaZUFZZkRNS0VCVDI4T1ViQVVOZUtuOUt2?= =?utf-8?Q?mj4xDLAkqfVeHQhM=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1459978b-5027-48eb-9732-08da38ae714e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2022 09:11:50.5443 (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: Sh3mB38lck7+zOdHF1eyNZSqblKqihaszRAHlMAcEG3o/iHo4JK2P42RdOgDv5bKZXzIyfhZcSAE784WJEGebQMQluSSbU22X6MRA+ANukU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2849 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 On 19-Apr-22 12:25 PM, Kevin Laatz wrote: > Add CLI options to l3fwd_power to utilize the new power APIs introduced in > this patchset. These CLI options allow the user to configure the > heuritstics made available through the new API via the l3fwd_power > application options. > > Signed-off-by: Kevin Laatz > > --- > v2: add doc update for l3fwd-power > --- This is a bit confusing. There are other scaling modes in l3fwd-power, but the --scale-freq-min only applies to the PMD power management mode. > .../sample_app_ug/l3_forward_power_man.rst | 8 ++ > examples/l3fwd-power/main.c | 75 ++++++++++++++++++- > 2 files changed, 82 insertions(+), 1 deletion(-) > > diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst > index 2e350c45f1..b26f11a220 100644 > --- a/doc/guides/sample_app_ug/l3_forward_power_man.rst > +++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst > @@ -109,6 +109,14 @@ where, > > * --pmd-mgmt: PMD power management mode. > > +* --max-empty-polls : Number of empty polls to wait before entering sleep state. > + > +* --pause-duration: Set the duration of the pause callback (microseconds). > + > +* --scale-freq-min: Set minimum frequency for scaling. > + > +* --scale-freq-max: Set maximum frequency for scaling. > + Maybe make a note that these only apply to --pmd-mgmt mode? > See :doc:`l3_forward` for details. > The L3fwd-power example reuses the L3fwd command line options. > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c > index 20e5b59af9..ec2a71f02f 100644 > --- a/examples/l3fwd-power/main.c > +++ b/examples/l3fwd-power/main.c > @@ -265,6 +265,10 @@ static struct rte_eth_conf port_conf = { > }; > > static uint32_t max_pkt_len; > +static uint32_t max_empty_polls; > +static uint32_t pause_duration; > +static uint32_t scale_freq_min; > +static uint32_t scale_freq_max; > > static struct rte_mempool * pktmbuf_pool[NB_SOCKETS]; > > @@ -1626,10 +1630,32 @@ print_usage(const char *prgname) > " empty polls, full polls, and core busyness to telemetry\n" > " --interrupt-only: enable interrupt-only mode\n" > " --pmd-mgmt MODE: enable PMD power management mode. " > - "Currently supported modes: baseline, monitor, pause, scale\n", > + "Currently supported modes: baseline, monitor, pause, scale\n" > + " --max-empty-polls MAX_EMPTY_POLLS: number of empty polls to" > + " wait before entering sleep state\n" > + " --pause_duration DURATION: set the duration, in microseconds," > + " of the pause callback\n" > + " --scale-freq-min FREQ_MIN: set minimum frequency for scaling" > + " mode for all application lcores\n" > + " --scale_freq_max FREQ_MAX: set maximum frequency for scaling" > + " mode for all application lcores\n", It would be useful to note which units are used here :) This is increments in 100MHz, correct? > prgname); > } > > +static int > +parse_int(const char *opt) > +{ > + char *end = NULL; > + unsigned long val; > + > + /* parse integer string */ > + val = strtoul(opt, &end, 10); > + if ((opt[0] == '\0') || (end == NULL) || (*end != '\0')) > + return -1; > + > + return val; > +} > + > static int parse_max_pkt_len(const char *pktlen) > { > char *end = NULL; > @@ -1803,6 +1829,10 @@ parse_ep_config(const char *q_arg) > #define CMD_LINE_OPT_TELEMETRY "telemetry" > #define CMD_LINE_OPT_PMD_MGMT "pmd-mgmt" > #define CMD_LINE_OPT_MAX_PKT_LEN "max-pkt-len" > +#define CMD_LINE_OPT_MAX_EMPTY_POLLS "max-empty-poll" > +#define CMD_LINE_OPT_PAUSE_DURATION "pause-duration" > +#define CMD_LINE_OPT_SCALE_FREQ_MIN "scale-freq-min" > +#define CMD_LINE_OPT_SCALE_FREQ_MAX "scale-freq-max" > > /* Parse the argument given in the command line of the application */ > static int > @@ -1812,6 +1842,7 @@ parse_args(int argc, char **argv) > char **argvopt; > int option_index; > uint32_t limit; > + int i; > char *prgname = argv[0]; > static struct option lgopts[] = { > {"config", 1, 0, 0}, > @@ -1825,6 +1856,10 @@ parse_args(int argc, char **argv) > {CMD_LINE_OPT_TELEMETRY, 0, 0, 0}, > {CMD_LINE_OPT_INTERRUPT_ONLY, 0, 0, 0}, > {CMD_LINE_OPT_PMD_MGMT, 1, 0, 0}, > + {CMD_LINE_OPT_MAX_EMPTY_POLLS, 1, 0, 0}, > + {CMD_LINE_OPT_PAUSE_DURATION, 1, 0, 0}, > + {CMD_LINE_OPT_SCALE_FREQ_MIN, 1, 0, 0}, > + {CMD_LINE_OPT_SCALE_FREQ_MAX, 1, 0, 0}, > {NULL, 0, 0, 0} > }; > > @@ -1975,6 +2010,44 @@ parse_args(int argc, char **argv) > parse_ptype = 1; > } > > + if (!strncmp(lgopts[option_index].name, > + CMD_LINE_OPT_MAX_EMPTY_POLLS, > + sizeof(CMD_LINE_OPT_MAX_EMPTY_POLLS))) { > + printf("Maximum empty polls configured\n"); > + max_empty_polls = parse_int(optarg); > + rte_power_pmd_mgmt_set_emptypoll_max(max_empty_polls); If you have global variables anyway, why are you setting this here? :) You could call these API's under PMD mgmt mode init only, and this would also give you a chance of checking return values of any of these API's - for example, AFAIR set_pause_duration() can return an error if the value supplied is invalid (0). Plus, I still feel uneasy about having DPDK API calls right inside arg parsing code. > + } > + > + if (!strncmp(lgopts[option_index].name, > + CMD_LINE_OPT_PAUSE_DURATION, > + sizeof(CMD_LINE_OPT_PAUSE_DURATION))) { > + printf("Pause duration configured\n"); > + pause_duration = parse_int(optarg); > + rte_power_pmd_mgmt_set_pause_duration(pause_duration); > + } > + > + if (!strncmp(lgopts[option_index].name, > + CMD_LINE_OPT_SCALE_FREQ_MIN, > + sizeof(CMD_LINE_OPT_SCALE_FREQ_MIN))) { > + printf("Scaling frequency minimum configured\n"); > + scale_freq_min = parse_int(optarg); > + for (i = 0; i < RTE_MAX_LCORE; i++) > + if (rte_lcore_is_enabled(i)) > + rte_power_pmd_mgmt_set_scaling_freq_min(i, > + scale_freq_min); > + } > + > + if (!strncmp(lgopts[option_index].name, > + CMD_LINE_OPT_SCALE_FREQ_MAX, > + sizeof(CMD_LINE_OPT_SCALE_FREQ_MAX))) { > + printf("Scaling frequency maximum configured\n"); > + scale_freq_max = parse_int(optarg); > + for (i = 0; i < RTE_MAX_LCORE; i++) > + if (rte_lcore_is_enabled(i)) > + rte_power_pmd_mgmt_set_scaling_freq_max(i, > + scale_freq_max); > + } > + > break; > > default: -- Thanks, Anatoly