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 47C0B429DD; Mon, 24 Apr 2023 18:06:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C89D41138; Mon, 24 Apr 2023 18:06:51 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2082.outbound.protection.outlook.com [40.107.94.82]) by mails.dpdk.org (Postfix) with ESMTP id 2FA8B410ED for ; Mon, 24 Apr 2023 18:06:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kU+QdeNIwrZp3McyXs7vNO15K0yQsv5md7l7UvR/L18RFJSKw3odI0+Ul1OIkI55KTmBHok4YEusH+2l8rhVprpLNwzTN0kWO67uuZVFtY15XWiTQLa2YOqWf30Sxxz0itcI4WovLlgLM2Lf0VJ1DsmlqT+X0WLw82aK1Zm6fCF6zTLeQPAnNZUspSuiEHceG/R58/At+vbpZ6eRB1Pb0VZn2Q3zu+FBND7SAAqrI+PrLLjV5rH9OGwjEPdmRFLtUwHYZZrr13krxv9nXzrFUwMP13X8hRBe1mAFbjtqw9tTY63cAluA6/0fxUVdOjDG98pIbPOiVzbyAiMo9Bz7Ww== 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=76tJOS9+v4r5zXS9CrXfAqtsFCe+9930SNYTHfRnkiw=; b=CvF/tDl60NfIQuHXx7VSIJFo/m4KRZozFifa6BTh6urpzIVpbzNIjgddrzqJ7vDEHJRM3mCjaAnTnwCw4FVKaAC9fsdVmc2JaFK5jgkK4SX1fBSJpsA8DCmhw+Kl6zJdgGI0SyiJlYEL7h6B4p95kjDNJiJLKNGqQBemhi3hhufLAmJNyIA/oiZBwPjXsjtrs6F22X275fDlr4I8+2Pa2/+lJ2q6skCHYh5WCmmuxH3WTB4hss+3o9ugkx0YagYXh0YvUxHPpi9ak4eiFg/fzr0EhRT70JrBwfQfELkNhofqbyn2lZGfhVS5INuROvWgFyXqUzA4IKgbgkqiFrMPYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=76tJOS9+v4r5zXS9CrXfAqtsFCe+9930SNYTHfRnkiw=; b=OeR5L4tYj4VVsqJmmzg9Ikj1n4ExlE+JQW9zUdGJVVTH+RDnUyV1HELwkwDgfRMLAiQiv3o1Bsz8MahcRMhD0hfOzZ+4SyL3tSGnReL1oikno2VtBgdi9gaVfwBCEPPiwY7u+SyPrucW1/x9XEELD9xb4m4aX3WJGF/jljifs9I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB6740.namprd12.prod.outlook.com (2603:10b6:510:1ab::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Mon, 24 Apr 2023 16:06:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7%7]) with mapi id 15.20.6319.033; Mon, 24 Apr 2023 16:06:46 +0000 Message-ID: <324d5201-da95-f926-5580-f74ca5c09799@amd.com> Date: Mon, 24 Apr 2023 17:06:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Jerin Jacob , Sivaprasad Tummala Cc: david.hunt@intel.com, jerinj@marvell.com, harry.van.haaren@intel.com, dev@dpdk.org, Pavan Nikhilesh , "McDaniel, Timothy" , Shijith Thotton , Hemant Agrawal , Sachin Saxena , =?UTF-8?Q?Mattias_R=c3=b6nnblom?= , Peter Mccarthy , Liang Ma References: <20230419095427.563185-1-sivaprasad.tummala@amd.com> From: Ferruh Yigit Subject: Re: [RFC PATCH 1/5] eventdev: add power monitoring API on event port In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P302CA0025.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:2c1::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB6740:EE_ X-MS-Office365-Filtering-Correlation-Id: a673d86d-af91-414d-bb35-08db44dde716 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xm5Z2YjWOGYWazCLcyPk2vRh58oqlBXjfZUW94ns6lWyB+12+GIJN2EOTmedx5v7pUr7a7hfh/nGNjsTao1aLIrYfEQCNrH+uvJqW2ylmxRNlT+yiWS53VDtwJHEq+08ReiT/R9a7x4cZSdgEp7kJypD+owKHaPLyNlwSQGOi2zhC2Y0/oFaElBdqoLjEFUB0u9uGqpvXfk1lrI7sTjLmuUjaPIna3MRaoUdaBYeIWaSV+ST/bxif3Haj99LgOd0Z5IVL7zXqY3PnAWl3oR56SFGSV99Fyx6mflTNkyz/8aueo9lm94aS6M8SriGRrA1XrKxVdXXLypWYRS8Oghbh6uEJu5pGAdUsAjY/YM2Gnh8CxY4VJAXj5T+yN0Hvae65EiTqx8hPARCam+NXdZEcTFmeTidpqUAYSakyYKxf0ABWx05sq7ONSFZS4cCBMDc8CC63tALyYaIdi1+rgqDNqyMx753bKTBbX+2RwIiOxFPEEYIqiYejb+yMWfSyO3ddsnwUTIk304OSGl04ga9VhEKPSHvpV9uhVQgPBa+TvsyLd4207tucHOSQ+hqYvsm3ouEA6OW77l1MM7EDVf2CIWboSPD1IORQMzQTVgXxaqUSY4daE9Qg+bXurpavQ0hhCgG1PjDON45Uc7dH1or2w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(451199021)(478600001)(31696002)(110136005)(54906003)(6636002)(86362001)(36756003)(186003)(53546011)(6486002)(26005)(6506007)(6512007)(6666004)(4326008)(66476007)(66556008)(316002)(44832011)(83380400001)(66946007)(2906002)(38100700002)(41300700001)(8676002)(8936002)(31686004)(5660300002)(7416002)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WStHWWhWQjJxOGhHZnNzUkZBdHpwc1ljUnV3YktTWkFWRjN4ZEpEMUY4L1NW?= =?utf-8?B?bXRUVS9EdkpOb0tqYlZtUnIvcWVPNkFsTGE3UzVqT09NR1IyeEN2REptaUdU?= =?utf-8?B?VlZKbiswR203N3hFejRMNm1aN3JReHZUYUhGOEN4ZVRvOEY0RnlMNENiVHJ2?= =?utf-8?B?TFk0NjlRLzFoNEFVNkFyNjFqdUd4RTVybk9aZmJvcnYrZng4cVlyUmJ1Zjk1?= =?utf-8?B?WUlRZERMMEcxdTZibDBTU0RnNi82eTBiUy9HUlZBK1d5NlIwcVV5enUyVkdG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MjdydTZRVEhzckIrNm5wNTl3NHJTRkp6?= =?utf-8?Q?dA8X0F5kbo4bCKdG1z90H/XkP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a673d86d-af91-414d-bb35-08db44dde716 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 16:06:46.1916 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zrRephYrHJZZxWdCpBbS+Zxn3Bt5LRht4EQTgDDs3q3Dd2vjhK5eD8wRGvjvHq56 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6740 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 4/19/2023 11:15 AM, Jerin Jacob wrote: > On Wed, Apr 19, 2023 at 3:24 PM Sivaprasad Tummala > wrote: >> >> A new API to allow power monitoring condition on event port to >> optimize power when no events are arriving on an event port for >> the worker core to process in an eventdev based pipelined application. >> >> Signed-off-by: Sivaprasad Tummala >> + * >> + * @param dev_id >> + * Eventdev id >> + * @param port_id >> + * Eventdev port id >> + * @param pmc >> + * The pointer to power-optimized monitoring condition structure. >> + * >> + * @return >> + * - 0: Success. >> + * -ENOTSUP: Operation not supported. >> + * -EINVAL: Invalid parameters. >> + * -ENODEV: Invalid device ID. >> + */ >> +__rte_experimental >> +int >> +rte_event_port_get_monitor_addr(uint8_t dev_id, uint8_t port_id, >> + struct rte_power_monitor_cond *pmc); > > + eventdev driver maintainers > > I think, we don't need to expose this application due to applications > 1)To make applications to be transparent whether power saving is enabled or not? > 2)Some HW and Arch already supports power managent in driver and in HW > (Not using CPU architecture directly) > > If so, that will be translated to following, > a) Add rte_event_port_power_saving_ena_dis(uint8_t dev_id, uint8_t > port_id, bool ena) for controlling power saving in slowpath. > b) Create reusable PMD private function based on the CPU architecture > power saving primitive to cover the PMD don't have native power saving > support. > c)Update rte_event_dequeue_burst() burst of PMD callback to use (b). > > Hi Jerin, ethdev approach seems applied here. In ethdev, 'rte_event_port_get_monitor_addr()' equivalent is 'rte_eth_get_monitor_addr()'. Although 'rte_eth_get_monitor_addr()' is public API, it is currently only called from Rx/Tx callback functions implemented in the power library. But I assume intention to make it public is to enable users to implement their own callback functions that has custom algorithm for the power management. And probably same is true for the 'rte_event_port_get_monitor_addr()'. Also instead of implementing power features for withing PMDs, isn't it better to have a common eventdev layer for it? For the PMDs benefit from HW event manager, just not implementing .get_monitor_addr() dev_ops will make them free from power related APIs.