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 39746A0C45; Wed, 6 Oct 2021 10:05:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2067413D0; Wed, 6 Oct 2021 10:05:23 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C18DF4114E for ; Wed, 6 Oct 2021 10:05:21 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10128"; a="225887808" X-IronPort-AV: E=Sophos;i="5.85,350,1624345200"; d="scan'208";a="225887808" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 01:05:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,350,1624345200"; d="scan'208";a="623784735" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 06 Oct 2021 01:05:20 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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.2242.12; Wed, 6 Oct 2021 01:05:19 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 6 Oct 2021 01:05:19 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) 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.2242.12; Wed, 6 Oct 2021 01:05:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iq7LIYDTB9iPUxMoaMO7l/Dp05l1kECJSYJp4DFiSHx5EeztszFDK592cGMCdXSUttPVijlLmlc5zhBk36kzDFrU1/hDBwGfB7Jmx+DaurL6H6iIfbCbvT8lu0R4qy0PX9HrhcABMEIqNYLYd6W7ozDjSfmW630k1moyDUciI09ocKQQw+j6svk0fm40zOA9Hw1tSD5t39bRrI7gwp9tbzBzYnHZ5uC5MGEXzm/DVGt4sQ4yvJoB9+Q8QeZJdUzD5jg9+S7Bz6e8AKiw5t5+9/yChFYu3XryM0daU5Zy+8yj6tzbkrqckozA9O7nAP4ho2CWeUvzdDUNj8l4VVZJTw== 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=NtyJ24GKABzVWoOHcb3J/j79/eJxOh6NDe6//GV+shg=; b=Y3IF/SfMfoiqQIeKHFlUsoyPfhtpeDZMiVkSvqsfQfD33IbJ3cF1dXJY1bnHwCdjcgxmk0iES8Ei/XH1yxX9yIQ3NIFRaoX7tg6mak5jSsIypdhC5mQlzIQ9RDtEXxXdZYunJVTsxyLC2xGxFULx1bRQX3rGqu3UhtbW0/ForrhFaJa6E45NSmmMlBovxg04cuWCBgZEBaHmM+F/TISM2b+m3yTfgC11nmzlJsjXCRSecBzYcEWnVwj/3LMz05oBquae8VakJ7rxM4hREbeN8LrUUhj6xd1QBXAH0nto+PNrQiAV4sVwOZwwS28OiU+awlwFb70ulr8u29iVFCChwQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NtyJ24GKABzVWoOHcb3J/j79/eJxOh6NDe6//GV+shg=; b=aksCewqNW7s859gtv5EuuW2D6DHZxXCHMwVUGfbbKOrhjoDVQ92/v1Ov623+vpO4ugQTVmmFa0Ht727goonXOB0UnUkim3W4RsH8YkrKNcufdPYvTAKZKZKuUa0NfoPZGYSBU2YvVmIegDAfJ8/6MEV0CAu2GZODW8MvGMvdUXw= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4949.namprd11.prod.outlook.com (2603:10b6:510:31::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Wed, 6 Oct 2021 08:05:03 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%4]) with mapi id 15.20.4566.022; Wed, 6 Oct 2021 08:05:03 +0000 Message-ID: Date: Wed, 6 Oct 2021 09:04:46 +0100 Content-Language: en-US To: "Xueming(Steven) Li" , "yisen.zhuang@huawei.com" , "oulijun@huawei.com" , "dev@dpdk.org" , "humin29@huawei.com" , "spinler@cesnet.cz" CC: "mczekaj@marvell.com" , "radhac@marvell.com" , "sthotton@marvell.com" , "Matan Azrad" , "kirankumark@marvell.com" , "rmody@marvell.com" , "beilei.xing@intel.com" , "chenbo.xia@intel.com" , "vburru@marvell.com" , "somnath.kotur@broadcom.com" , "jiawenwu@trustnetic.com" , "skori@marvell.com" , "hemant.agrawal@nxp.com" , "maxime.coquelin@redhat.com" , "asomalap@amd.com" , "yongwang@vmware.com" , "andrew.rybchenko@oktetlabs.ru" , "heinrich.kuhn@corigine.com" , "ajit.khaparde@broadcom.com" , "hkalra@marvell.com" , "shaibran@amazon.com" , "chas3@att.com" , "cloud.wangxiaoyun@huawei.com" , "sthemmin@microsoft.com" , "jerinj@marvell.com" , "qiming.yang@intel.com" , "pnalla@marvell.com" , NBU-Contact-Thomas Monjalon , "mk@semihalf.com" , "srinivasan@marvell.com" , "mw@semihalf.com" , "keith.wiles@intel.com" , "xiao.w.wang@intel.com" , "xuanziyang2@huawei.com" , "mtetsuyah@gmail.com" , "qi.z.zhang@intel.com" , "g.singh@nxp.com" , "aboyer@pensando.io" , "steven.webster@windriver.com" , "evgenys@amazon.com" , "johndale@cisco.com" , "irusskikh@marvell.com" , "dsinghrawat@marvell.com" , "shshaikh@marvell.com" , "lironh@marvell.com" , "Slava Ovsiienko" , "aman.deep.singh@intel.com" , "sachin.saxena@oss.nxp.com" , "rahul.lakkireddy@chelsio.com" , "matt.peters@windriver.com" , "jianwang@trustnetic.com" , "skoteshwar@marvell.com" , "zr@semihalf.com" , "jingjing.wu@intel.com" , NBU-Contact-longli , "igorch@amazon.com" , "grive@u256.net" , "haiyue.wang@intel.com" , "jgrajcia@cisco.com" , "zhouguoyang@huawei.com" , "hyonkim@cisco.com" , "ndabilpuram@marvell.com" References: <20210727034134.20556-1-xuemingl@nvidia.com> <20210918123525.135129-1-xuemingl@nvidia.com> <20210918123525.135129-3-xuemingl@nvidia.com> <5dbc3817-924b-9bdd-5176-f971ed63c493@intel.com> <0007ffea2d8fd0eaa02bda6db5764fd057e909d1.camel@nvidia.com> <127f917b-e360-3278-7080-88a26c5e7016@intel.com> <0a40b42090f1d0b3a3c6304bf4e5e54bb982c1f4.camel@nvidia.com> <15acc50c-f215-b3cb-9367-6446dd5ad0f2@intel.com> <35eefc12a7d71ddd472e681e26959b1bc9f76aa9.camel@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <35eefc12a7d71ddd472e681e26959b1bc9f76aa9.camel@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB9PR02CA0025.eurprd02.prod.outlook.com (2603:10a6:10:1d9::30) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB9PR02CA0025.eurprd02.prod.outlook.com (2603:10a6:10:1d9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Wed, 6 Oct 2021 08:04:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c68ef296-fad1-47f2-b7e1-08d9889ffff1 X-MS-TrafficTypeDiagnostic: PH0PR11MB4949: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hcyOvKYIjOk4YngVVLCLy35WbIPTQSXD8UOlV91qiR/Bj8mGO5vlrpMmvHddzNzeI+oPudTyPw6TGHMBq5IlzW+F8Dee71hvObJb8mIlt5I15ntum/NDT1Nau3rUI6MaJ5/noyuuy+FtykX5BqVyPKbQs0w1Fn20dh63qVOMsfnVVTGWb12IPVus/nrkEh+ctTQ6w7GLp/QvYzomaUe/OciVr+3IV4aAeU2s9tUJzsfeOWXJ+GLvDn/7hAppMnMbCH4+NZao9xkL3wphrkDRE/imR39YsVWev2p5fQ1plnRVx7W3DtS1e7ISlVnVy42HSP35e9IHEYQHRx4CEL1OdBnShFaJ3ujRHXYKEPbzTIMKJWKeP+wiLMSFAjst9+KBwNQ4IqllIva9FBDBcR/C+9ye5OOWuiBdfdJufjnPJX76b5qihEabfq9ToT9iPYD9o+EUdJZudncKINOD0k/j2Z1UikAMeOvSUMFEEVrzV41o/3JGGBMTlE+mQtMxbe33uhyf57EfDspsqHUEPR6gFYsESBd5sPERMC0HYUzKDrpzgi2ql9ylRd0Xd0mIGE94JoirPS4PCkvMOQBMsNySSTcIK8r/WZSUFlQRlhu+JXk7MtuAuNnZzqmkkIOvpHIqq581i83CXuzRTKyJPO+6AIJntTSfMPPl8Yqv7bjgX11k5134P5Xzi3Q4RMbDhqwxF+QerxRVKxihFKCv4t8JIQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(44832011)(508600001)(16576012)(2906002)(316002)(36756003)(6666004)(26005)(66476007)(8676002)(66556008)(6486002)(53546011)(66946007)(38100700002)(31696002)(31686004)(8936002)(4326008)(186003)(86362001)(54906003)(5660300002)(7416002)(110136005)(83380400001)(7406005)(7366002)(956004)(2616005)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S2tkSGdhd3lzMVBRUGFZbExGNnZtUWorK0t2Rkh6cUxpS2plQUJPdk5VR2Fn?= =?utf-8?B?ampxRE81NW1SdkRLd3QxUHZIanpuVmlNRmdaTjF3b0M1VXBjSzU0TWRuVGZX?= =?utf-8?B?YnFjK29OMkNoR0lKaC9kQ0ZMeXk3b0MxbFB1dFJPVGJqS3BXQXp3Z1FWRFEy?= =?utf-8?B?azcvMk1hTGRkU2sxaWdGUDdqUEZFNHVhYlNNR3pIeDJNbzFSbk42OEwzdjR6?= =?utf-8?B?RUVMVFAxbys0clozYTNJZVZyRVhaK0lsUlFsYTNZelF5TWdQUGhqQXQ2VTJE?= =?utf-8?B?R05xd1FlOG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= =?utf-8?B?SkI2NzluN3FGSDNoQTgyWmRSV3dYd2dUcW1zditVVkNoV21zdmMzMTVRNlgx?= =?utf-8?B?L01Eb0IxNWxZWGdnR082enJRNzRBWTJENi96TTZ2bFVRN0FENW5INFFkNWR3?= =?utf-8?B?Mk9KZHplOUNnT1N2OHcwdklFeXFpVU1sL0dsVTk0OEJjR1ZkMnVVNTVCNmVK?= =?utf-8?B?d0JqQUcwQytlMWtBTkRNclBHcHFmTDRUakpEaWlKVFBzMmd3TXRZbE1OZzRB?= =?utf-8?B?d05yUWNjOWFjMG5FbGJ2QzNiQlhkRkZ1R2NTampHdGR4N1psanFiZlNqS1cz?= =?utf-8?B?MjFHRSt4VVJHQWdCWGJQclVKUVFJZHV4cUlkUzVKTVRJZEtRRXlOMzVLR1Fz?= =?utf-8?B?eFN4ZWV1clpqbjc1Qks2UkRSazBpS3Q0RkprUkNkempRWUNjeTUyVk5XaVdo?= =?utf-8?B?ZkQwSUNhWFpYYXBQRVhvd1g5blk4bFBDYSt5b3c4TlFRaHRMZmNXVkhsakMr?= =?utf-8?B?K3NoMTVYc0FFdkd5ZFg5N0QycCs4Y0YwVFl4WmhGbHZReXhXWUExQXJOK2Ny?= =?utf-8?Q?H83hTVkXk5VOiIvQbhJWWC2ZEV+0/7jaiqc2DyD?= X-MS-Exchange-CrossTenant-Network-Message-Id: c68ef296-fad1-47f2-b7e1-08d9889ffff1 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2021 08:05:02.9653 (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: 7JRbYRcKhi+lywKO4pscag6CtBx1FwiOI1yRp285zAWLk2/cbrZidS78s2kY3a960Y0DVMvAzo9WPJuM2Ac1LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4949 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/2] ethdev: change queue release callback 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 Sender: "dev" On 10/6/2021 8:55 AM, Xueming(Steven) Li wrote: > On Tue, 2021-10-05 at 17:38 +0100, Ferruh Yigit wrote: >> On 9/29/2021 2:57 PM, Xueming(Steven) Li wrote: >>> On Wed, 2021-09-22 at 12:54 +0000, Xueming(Steven) Li wrote: >>>> On Wed, 2021-09-22 at 11:57 +0100, Ferruh Yigit wrote: >>>>>>> >>>>>>> <...> >>>>>>> >>>>>>>> void >>>>>>>> -i40e_dev_rx_queue_release(void *rxq) >>>>>>>> +i40e_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid) >>>>>>>> +{ >>>>>>>> + i40e_rx_queue_release(dev->data->rx_queues[qid]); >>>>>>>> +} >>>>>>>> + >>>>>>>> +void >>>>>>>> +i40e_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) >>>>>>>> +{ >>>>>>>> + i40e_tx_queue_release(dev->data->tx_queues[qid]); >>>>>>>> +} >>>>>>>> + >>>>>>> >>>>>>> Is there any specific reason to not update driver but add wrappers for it? >>>>>> >>>>>> Some caller don't have queue ID on hand, adding wrapper seems more >>>>>> convinient. >>>>>> >>>>> >>>>> Convinient for the patch, but not sure convinient for the driver. >>>>> >>>>> As mentioned before, not sure about approach to update some driver and add >>>>> wrappers for some others. >>>>> >>>>> qede, ice and i40e seems not updated, I am for syncronizing with their >>>>> maintainers before proceed. >>>>> >>>>>> >>>> >>>> For qede, qede_tx_queue_release(txq_obj) is called by >>>> qede_alloc_tx_queue_mem(dev, qid), while upper caller >>>> qede_tx_queue_setup() doesn't always save txq_obj to dev->data->txqs[]. >>>> >>>> For ice and i40e, it's similar, ice_tx_queue_release() is used to free >>>> txq, but some txq isn't saved into dev, please refer to >>>> ice_fdir_setup(), wrapper is needed. >>>> >>>> These 3 PMDs create rxq/txq that not saved in dev->data, can't change >>>> parameter to dev+qid for such case, that's why wrapper was there. >>>> >>> >>> Hi Ferruh, >>> >>> No response from qede, ice and i40e. Basically the original queue >>> release api is shared by private queues(not registered to ethdev), >>> can't access by index, that why a warpper was there. To avoid more >>> rebase in last minute for this big patch, do you think we could close >>> it? >>> >> >> I see the reason and since there is no update from maintainers, to keep >> the ball rolling agree to continue with wrappers, those PMDs can send >> incremental patches if required. >> >>> BTW, from feedback from hns3, I will post a new version to add the >>> macro. >>> >> >> I have concern about this one, how accessing to the global variable >> 'rte_eth_devices' via a macro improves the situation? >> >> Can you please make wrappers for hns3 driver too, we can follow it later >> with driver maintainer? > > hns3 doesn't need a wrapper. The macro isn't related to wrapper, just > for the rte_eth_devices access as you suggested: > &rte_eth_devices[hw->data->port_id] > I suggested not to access global 'rte_eth_devices' variable from driver, and v6 has a macro in the driver [1] to access the same variable, hiding it behind a macro is not changing anything. Since your updates adds more access to 'rte_eth_devices' [2], my suggestion was do a quick wrapper solution for the driver until it is properly updated. [1] #define HNS3_DEV(hw) &rte_eth_devices[(hw)->data->port_id] [2] - hns3_dev_rx_queue_release(rxq[i]); + hns3_dev_rx_queue_release(HNS3_DEV(hw), i);