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 073DEA0503; Wed, 18 May 2022 10:58:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB06D40221; Wed, 18 May 2022 10:58:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id DEE55400D6 for ; Wed, 18 May 2022 10:58:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652864313; x=1684400313; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=DiCo8g0Vtc8mv9HZSJr03JeruJWvgtDYBFrNzgtjYlE=; b=fgvOG786+d91c7EOYVOR4GiXPE3Vfb7d0wnoDZ74LKb9ep6lbXACjZFA iM0t7kCkTEqFUJtNb7vCLthLOoCUg5DaC/5H4x1MoAkAOYWWVNhR6nHWH P9oG4N1GL3fa0hnhLRtIU1DAZZGpa1Xfe3CLJjVjYd8yydBBf+zG7P4RK lCdSp/q4LusRCqCZc9/KpkM64XLMSTh7fNEEcIoXqqzVGnnFCMMsojol9 lVAzhADRel5NzmTmTUggEq13rYJFP60iY++aNs+LX4Jzv3jS1He7ZEddi Xy9GC94UcYy3zvJwVKTR9zP9z2YAwYDYqUkUubblC2l2BPjvyqzZSIlhl g==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="252084463" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="252084463" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 01:58:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="545342354" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 18 May 2022 01:58:31 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2308.27; Wed, 18 May 2022 01:58:30 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) 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 01:58:30 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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 01:58:30 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (134.134.137.100) 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 01:58:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NnnW2aLzDpD1udiRbNLdQKULyd903oGfcmf0n6SWRdQCgvzTRCEWoayRlQGqwfIBzx9qxMyLIzBywKh2Tp416PgdDQKbguaAWYaJE/xYW8+0uxtinfqntg7BJinN5hTNdXnZhnSusQPGzBUUCNmTBuW5+l+CR5zwvZx7SAQ4pZ9005e0ji7FuUr4TsN+oKGZJFgL0IwwSD8I4X5UBjP4iUsexMsb2wXfeNHU8ZbolqDZlLwYu+gvudFA48rk73P6r2P6gWOZGucmnEJ5OAwMp8PsHrbHdTqy+MQgqZb41Z32WgEn2SdP6TMVdd2DRwt/I26VuJyMwkfeu2n7hB7U6g== 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=7Twnu+BdvJFD1bBpO0wAoFKt6RxDlNpK+dRAuVdVm7Y=; b=Ti83KaW9w+TWjo/UDQtzlwikzenSzgK4iAqZEjCeqvE1vRxhI/vHDCrRjva2imypelCYWOaN0VSsGb38AqVwtmclpn2TdGRR0iJJ+v9G580hL3yE0CWrAoOng5Ctlmfb9jaq/M1F3WIQFZoPDycVIgY4DR+mOrwOq403wp7WJpVXDw5Pnq57AVlBmTcM5ExHETsBYd7ZScpJCC7WLDac7npNyTyFLNzJPLxNQfG8qTOwCNclj5gZ+Et4q/d+CpKEThav9jCcnFd1R0aOvfB1XhLyXanE4EaTw5YxdvNR7RyI9WxCckjGy+S536BUN05T4oWyMgwVPSSj88+ERCQXpA== 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 SN6PR11MB3181.namprd11.prod.outlook.com (2603:10b6:805:c3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Wed, 18 May 2022 08:58:29 +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 08:58:29 +0000 Message-ID: <15802d0b-07e6-f702-e604-785e1a88a66c@intel.com> Date: Wed, 18 May 2022 09:58:23 +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 2/4] lib/power: add get and set API for pause duration Content-Language: en-US To: Kevin Laatz , CC: David Hunt , Ray Kinsella References: <20220408140847.1319312-1-kevin.laatz@intel.com> <20220419112501.1835458-1-kevin.laatz@intel.com> <20220419112501.1835458-3-kevin.laatz@intel.com> From: "Burakov, Anatoly" In-Reply-To: <20220419112501.1835458-3-kevin.laatz@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0028.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::16) 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: b93bb60f-2660-4e7a-6c57-08da38ac9369 X-MS-TrafficTypeDiagnostic: SN6PR11MB3181: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: rBIEcddmNV8Y0RZbfpV2q/bPE2xXcrgNTqmIgjJdEvD5rutv4J+rW9AkG/RaXwU+MRxmxFUs30ljayCxHgqJN0pbPC2GJfkOqu6YWofvgehxHTwWwoSy4eEmvMCLSZQP5f/pmnvJpLozg6BJa5jGHGRs5YmmWPi3HiiFbWa5fkTyVM1w0Cvk897u6XRLOq1iHrkj9Um7Jjwbj26GwHReSWRe9ks8b8ajao12uWGPrJXShJwB/hmAMVfVt3VNj/7bZBPmhM2TKxdMDs5UIf2ytTqteocHHOOmAquDJf/NJaCrujEBdszfKyU5q1WvES8z99x20omiQaWVyxWJNttnk5ibLrbZsadVBt9K2aguEoToBGjxtz/TP/Uquptolg7oaKOt1amYlMsxa3dxbHr4u1/wrFaWRGcQa8NMDhNeDRiuz3xhONCLADneSrvHvnqbkmGKj4XETUdbGpgtwTVDt1gwS0MCz0B85jIb7Llf1hDcfgDPlzBfxLN5Uo/+D3lORwh0TlL7PZMKQPoixRlgWs7B17oTCmthHeG/pkO/KpmI5wN29Esz68DFvItUCMyhedPqJt6JAw0AiftiUMPd4UM3VZGVdY119GoWkyE1TIYRzxgSOCS2nlsmC5rxPUmdtn/9X2txFfVFfptgmb8sUjYRVjZjE2ybRUe8okjLxEfq3HRBz7WBRRYzRHqjAn3CbofG9wb/AK4p96mxnkbKTEpu6nTZ+C/hRdnPXcJgMzE= 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)(82960400001)(2616005)(6666004)(38100700002)(6506007)(2906002)(8936002)(53546011)(54906003)(36756003)(316002)(31686004)(66476007)(508600001)(66946007)(66556008)(4326008)(8676002)(31696002)(6486002)(5660300002)(186003)(26005)(86362001)(6512007)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MnpxSU1ydHdmU0poYTJrVytJbmw3QmhYL0F3UWRuem5NQS9wOVpPd0Z3bk1o?= =?utf-8?B?OHMrN0JVWmVZcHp6UU8vSTh5YUxVdmtlMFlqdklOeDU0bU5oaDh2YVFGdHMz?= =?utf-8?B?MWs1YnZFN240Y1FpSWZhblg5a3JJbGljSHhVU2JVVVBRdW5mL2JQK3hBS0xo?= =?utf-8?B?clFoR0ZDT0M0bGRhSHJGWmpQNHJ1b3BQMVFjQThrQkFEZTdvalVjcUIrc2pu?= =?utf-8?B?QXNqL3c4c2t5QUVZN1JISHFyOXpWQ2lyUGtTY2k2V0ZNcGZveERBcGhua0c0?= =?utf-8?B?NXExTkptczBu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bWd5UmJ4?= =?utf-8?B?YS8xY0dpZ3RvLzU5MVM3NllUeFdkTndUNE5KS3VwMkU2eHBwbWN4dmZYUUVt?= =?utf-8?B?elQwRXd3MXVUVENMaUNGbWh5ME13YzB5Sm1uOE9BY01CM0QwYzMyZW5XQnJW?= =?utf-8?B?Q0dpc1U1M3RNd3VyQUlGazhMWUxiMDc2WmdmcTlSazB1bjFiRTRGU2luNGZJ?= =?utf-8?B?dlViVjZURWpRZWMvT0h1aW9mdzJDNXJVWGtGeGpJZHRuM1RJQ0NDb0taSldy?= =?utf-8?Q?uCwQlEI5QaHsDGQU=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b93bb60f-2660-4e7a-6c57-08da38ac9369 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2022 08:58:28.8296 (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: kcL8R3v3hqw0unpSxn5ahw/nG1a6s0wttL7hgIQ42YzYjpa9i8ScF19YveiH/95n4WbfaRaUlf2F8ne0zhV0sFqpVmxMTP8ujKoq6uKBASM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3181 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:24 PM, Kevin Laatz wrote: > Add new get/set API for configuring 'pause_duration' which used to adjust > the pause mode callback duration. > > Signed-off-by: Kevin Laatz > --- > @@ -334,11 +336,11 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused, > if (global_data.intrinsics_support.power_pause) { > const uint64_t cur = rte_rdtsc(); > const uint64_t wait_tsc = > - cur + global_data.tsc_per_us; > + cur + global_data.tsc_per_us * pause_duration; > rte_power_pause(wait_tsc); > } else { > uint64_t i; > - for (i = 0; i < global_data.pause_per_us; i++) > + for (i = 0; i < global_data.pause_per_us * pause_duration; i++) > rte_pause(); > } > } > @@ -673,6 +675,25 @@ rte_power_pmd_mgmt_get_emptypoll_max(void) > return emptypoll_max; > } > > +int > +rte_power_pmd_mgmt_set_pause_duration(unsigned int duration) > +{ > + if (duration == 0) { > + printf("Pause duration must be greater than 0, value unchanged\n"); This should perhaps be an RTE_LOG rather than a printf? With that fix, Acked-by: Anatoly Burakov -- Thanks, Anatoly