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 170E4A04FD; Tue, 2 Jun 2020 14:17:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 549571BF81; Tue, 2 Jun 2020 14:17:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 4E0BF1BF7F for ; Tue, 2 Jun 2020 14:17:18 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 052CFVY3012696; Tue, 2 Jun 2020 05:17:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=QGH74wpdhXYICxyM5F5cjXe6uY/C6BnnQjwwdnJbmxg=; b=Mv5CoVVHrssq9Euy7pdTKkp5lCx0GuBo15NHe7d2jBnNFMfQb0QZ4calNtpOtRnyYhFf ikWowkiWsvIBRVhvhespYbKv5QYXQ5cL9xkO+bvZDb+jDSugWZoS97okmTqjQz3MO20d 2nuVX2F6bpviM2C6PINCsYjWlasbB8xAuuu1BPc6KDwPqrvRIBrlMp6NB50mbbAv/Ghv ffARDklASwIHaBQRDWt9eiIOsLJnkQcp2SnsryAKnrNoc+HMZFR0AA0NAv61uxT8Tz6u xF/5oWaRO8BetONtvN2mrFWbMtaVT+YcnoknWt1PfXV7G1l8fVJljrQP+cX858iA4bix Pg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 31bmuptupb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Jun 2020 05:17:17 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Jun 2020 05:17:16 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Jun 2020 05:17:15 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 2 Jun 2020 05:17:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SFCH9QUspTa30FdU+qLMWSHAbEZ/WkpRVV9ylVKV7nzVKVJ83vdrzbxX4xCtfYvLiO8fLHe8t/GrLqXTK8jEg755jVcW9IYGT4cb/fRQ8kfekEdZfBwrt6xbGXDkBD7n3s8S8rBLc9+hCEzLcIb7td2J5KJNAjlc4dXui96AOHvIWwxPGgi7ckKbPac9Rfu38svB2sVWX+7icG7uSRtWXXHXGPbqWWzTuhIptz/69twAe7hTlYGKqCo5CYYx5jr1x1ZE1v/OxIIQPPpzvc1veQ9fZ355T5rOUgWEV0loRsOm/HwE9kqh5FYJt4wkdC1LhKEZ85nESst+I5jUuQwfag== 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=QGH74wpdhXYICxyM5F5cjXe6uY/C6BnnQjwwdnJbmxg=; b=SnQDh1Kfe2qxA3WbewAEWYkRKmeW7tPvORsTGs0TII9mg/OxWh6z4KC61SpiKwV5j/sK1W5LmPrKqkKqqocWn/Wbk6Fe0TSe3sW8m79MDEPh1Bk4nTzr2KP330do/8WdFeiOAvm+iJZV2x94b9lkhDuufPq3YlP6ipJhgIy0hvDoqgSGHYfYL/zqgGW4PuYFbmI+xeidNa+z6G8Z6rUXGMNuRqYr/3yOVpI/RdIXv2ed2PnDFVBe3DjeW7AkfzPAiUzbKJNxEpb2h80PRxw4GXDttD5ZuAf1Vnv1mhj7um9Eb9zEn0kXrsEL6LiL7fYCiW0d0okDBlKBTJdsBlUE/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QGH74wpdhXYICxyM5F5cjXe6uY/C6BnnQjwwdnJbmxg=; b=ectBSpLtoXqvQAU8gtkrdJ9ZEnYcneKGH5UUAdJCQnirPzikn3jR32R4m9ukRtU7TJUjLzrwVO5PIy2BO9VKduU6qNik6WVnrLgBvzmfspf+RZTgCGyqwLb5CwB1qQVndGCrClJpRMIsrzWozIY88+rpIE3KDH/D8SKHMIseLO0= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; Received: from MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) by MN2PR18MB2686.namprd18.prod.outlook.com (2603:10b6:208:ad::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 2 Jun 2020 12:17:14 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::f4fb:5e32:18dc:fb93]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::f4fb:5e32:18dc:fb93%7]) with mapi id 15.20.3045.024; Tue, 2 Jun 2020 12:17:14 +0000 Date: Tue, 2 Jun 2020 17:46:55 +0530 From: Harman Kalra To: "Burakov, Anatoly" CC: , David Hunt , , Message-ID: <20200602121654.GA106816@outlook.office365.com> References: <20200529131955.GA83122@outlook.office365.com> <660267ae-00a0-bb55-fbc3-9ac1473957ea@intel.com> <20200530100228.GA24648@outlook.office365.com> <20200602102259.GA54715@outlook.office365.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200602102259.GA54715@outlook.office365.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-ClientProxiedBy: BM1PR0101CA0063.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::25) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by BM1PR0101CA0063.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.25 via Frontend Transport; Tue, 2 Jun 2020 12:17:11 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2df2f4c-640c-4413-ede9-08d806eee1e6 X-MS-TrafficTypeDiagnostic: MN2PR18MB2686: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0422860ED4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NpZj2ixm8toGflZLYMmdkY7voHTh46v4g3uSXcYcfYWUvGfBsUkL8VbpDoYCoomXJXhTEJKI4nO4PYBgZBtELar+EpUeQIO5dfK8fGH9RwSssSqURac5v5zv0JKCXuI13Xaxho55KavqHxNLzapB7NGXkrC2umz4QgryKp/PqI24jtT1dLrwwnNYIBwKgKh8NOT7uBLG/H3bNLued3FwXZnOk+1sNX2z3fKdhfJcXpb+Akj2+eEFBGem8egzODB7J4il5CL6/RQ4qeJLVsPdWlUdz3VdfvIPtGeN7AKEVIuoX4nEOVJ0Om92FNBBOyswXEnsrGCP15Ba0SwU/diRs8aNr09pUUmMJ5QkHXTF66d6/HGx8+KU3zdq1+6HSW2F X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR18MB2848.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(53546011)(4326008)(6506007)(55236004)(498600001)(6916009)(7696005)(52116002)(33656002)(5660300002)(6666004)(1076003)(2906002)(26005)(86362001)(83380400001)(66946007)(66556008)(66476007)(16526019)(186003)(9686003)(55016002)(8936002)(956004)(8676002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zjjJcH+81V/F6Saeg8VrmiQTMvZAVhhMo4VZGd/Wecj1UvTeMf59jfPkGFkHDvd0YnmWPNgSS4GhEReo9hJHsDIJVy64JVoaoWbabUVuDuR0TUqqFkLlcqq2KLdn7KC6OXK/6LLsieoiDId2xR+YgushBFIoMbbRNAtUBhLEgdCB3grTACF7QXJdDTV9hm1xb6VnonaQOi612lxG2LePSy0FxvfNdJl3E4H/bdSujvzzWEXlpB6Cbhqft3UR4hW79KfJp7/t6bC9jyQ6Zyh1HGgsovX2fxD2ETHuICQ3IzyJx+ZfNUbntI12TBobabprFTmiI0wJultQS+u36W+VIGQJVcx6nxXnDWNMfElE/oFauUgE0RugiWbCPAH+8jYWeN3Z4U2li9BqYf0Quucnh5px0ybagVa+E9tloqxQvThdbjp6CkFROLl72EnMI9wRE/28+9/O+J1WW5wWcDSlHNF0YNBpR5DBn/IX1vtsh9Q= X-MS-Exchange-CrossTenant-Network-Message-Id: a2df2f4c-640c-4413-ede9-08d806eee1e6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2020 12:17:14.0253 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RAWCjawYo0z6xpKW+kYd65synPngDGw6YplwDsT+q2myIhbWGSNUCsZJreg1xG9AUKp5WScGlZdX5sNv7o1B6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2686 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-02_13:2020-06-02, 2020-06-02 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 3/3] l3fwd-power: add interrupt-only mode 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" On Tue, Jun 02, 2020 at 03:53:07PM +0530, Harman Kalra wrote: > On Mon, Jun 01, 2020 at 01:50:26PM +0100, Burakov, Anatoly wrote: > > On 30-May-20 11:02 AM, Harman Kalra wrote: > > > On Fri, May 29, 2020 at 03:19:45PM +0100, Burakov, Anatoly wrote: > > > > External Email > > > > > > > > ---------------------------------------------------------------------- > > > > On 29-May-20 2:19 PM, Harman Kalra wrote: > > > > > > > > > > if (ret < 0) > > > > > > rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n"); > > > > > > - if (app_mode != APP_MODE_TELEMETRY && init_power_library()) > > > > > > + if (app_mode == APP_MODE_DEFAULT) > > > > > > + app_mode = APP_MODE_LEGACY; > > > > > > + > > > > > > + /* only legacy and empty poll mode rely on power library */ > > > > > > + if ((app_mode == APP_MODE_LEGACY || app_mode == APP_MODE_EMPTY_POLL) && > > > > > > + init_power_library()) > > > > > > rte_exit(EXIT_FAILURE, "init_power_library failed\n"); > > > > > Hi, > > > > > > > > > > Rather than just exiting from here can we have a else condition to > > > > > automatically enter into the "interrupt only" mode. > > > > > Please correct me if I am missing something. > > > > > > > > Hi, > > > > > > > > Thanks for your review. I don't think silently proceeding is a good idea. If > > > > the user wants interrupt-only mode, they should request it. Silently falling > > > > back to interrupt-only mode will create an illusion of successful > > > > initialization and set the wrong expectation for how the application will > > > > behave. > > > > > > > > > > Hi, > > > > > > Thanks for the explanation which even I also believe is logically perfect. > > > > > > But since l3fwd-power is an old application and has many users around > > > which are currently using this app in interrupt only mode without giving > > > an extra argument. But suddenly they will start getting failure messages with > > > the new patchset. > > > > > > My only intent with else condition was backward compatibility. > > > Or may be we can have more descriptive failure message, something like > > > "init_power_library failed, check manual for other modes". > > > > > > Thanks > > > Harman > > > > > > > > > > I think we can compormise on an informative log message suggesting to use > > interrupt mode. I'm not keen on reverting to previous buggy behavior :) > > > Hi > > I am not insisting to revert to previous behavior, I am just trying to > highlight some probable issues that many users might face as its an old > application. > Since many arm based soc might not be supporting frequency scaling, can > we add the following check as soon as the application starts, probe the > platform if it supports frequency scaling, if not automatically set the > mode to interrupt mode, something like: > if (access("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", > F_OK)) > app_mode = APP_MODE_INTERRUPT; Sorry, no direct check in application but we can introduce a new API in power library: bool rte_is_freq_scaling() { return access("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", F_OK); } and in the application we can use "rte_is_freq_scaling()" at the start. > > > Thanks > Harman > > > > > -- > > > > Thanks, > > > > Anatoly > > > > > > -- > > Thanks, > > Anatoly