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 C7F90A034F; Mon, 7 Feb 2022 13:35:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 533B1410F3; Mon, 7 Feb 2022 13:35:49 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 5B21B410EA for ; Mon, 7 Feb 2022 13:35:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644237347; x=1675773347; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=gqiT1FTbugBZsYg3PiJrdM5B3QRCdbgrnPQiDwtuWGc=; b=hx42cfCK6fU24ba2mNeFwDSqpeT/2k5hAgnLeefDPc2MuOBU5fv8ml6r kH3726c0WX53kSNM3Afu0y94pCeshxTwmLpVQ53J7GvK+ztF2AGwLoeYt QL3EKYUIl3d0Wn/4kpoLJ2hddqlfs1Xhf5a4osK3asozSeySqUlgOczIJ ec+M6scMXMxwTpRQQNUw1beVtnvkAAN2wxZo7s4m+6rmYVKfTVRz98ga7 YexMZZb/SiZeNeYCxTcbwRWKpHx7WE/TNYwWq6M/3Rcf8BatbUPNv3HZ3 6Ya+tTjKJvRdBTRhWKDr6rW8H9Ek3ERowxZw62Tosdd151VoKZ3Rb+hml A==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="247539239" X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="247539239" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 04:35:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="481572037" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 07 Feb 2022 04:35:46 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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.2308.20; Mon, 7 Feb 2022 04:35:45 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.20 via Frontend Transport; Mon, 7 Feb 2022 04:35:45 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.44) 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.20; Mon, 7 Feb 2022 04:35:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l24UfKhDcQDyuSCJYV9mohJdAUfzRuuNuhDH7R7DplkATLBnuc8ir60E8Isp9JIYmSBjeDXCFKkeoINzDdBUBKoteOF5jNfqsrs9o/UK5J6A34o91WOvO5zOkv5dsMI8c+hvPlEjwBvMZWBkkDhf8kkgb509XUGrcZKXu7xELGo5qhjNDx6/Nrdbi1W4qdUzF6PARS14MsHf1XYE4P9I7IC+Q/AUt28SlLhRKeo+UJzwl367JsGlyspVZm2XE1atOFm5NWx4nY4QRQ0KWgGseRtMVu4g3jQNIlD35OtZqMrHBIutv5VjtcehHHyQKvWHonfc0U858vLdLHykqw0YUg== 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=PoVI9xkmS+IZkoHceq6Fqs095bDfAeILvoI0l/25GnQ=; b=NVB1XlYabYrOKgEf2BY+N1vPRiNc0JYUeHbeJvSlHVrw2gqug3N/8h5JhGgdYuoDRGUIUzBmsJfRYd7rF+lzCXZ8vSAXVnclDIgb3h5yZxuQ7vfuAFihxGwI1JCS7SaI3pGMrSWirIpltl46AFw6sknlA5DzSpYg48JXGqfjCAKvxXqfGdENAKRhLv8H8dtzFT1EUH/m9EOMD4ctzcy8AdvkhTJt2LmKuD88iJbnAIZEq2wdwTqrsSUXZ1ozuiM9slaAReJ4Td3l+Zcl9KvmFFmPyruoYR9eWsTPjr17B+ipkw2thhSmTUHEYEFPSu3p93MuCXWghi/5LLnh/UIBiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4917.namprd11.prod.outlook.com (2603:10b6:510:32::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Mon, 7 Feb 2022 12:35:43 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4951.019; Mon, 7 Feb 2022 12:35:43 +0000 Message-ID: Date: Mon, 7 Feb 2022 12:35:37 +0000 Content-Language: en-US To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , "Min Hu (Connor)" , CC: Ray Kinsella , Ajit Khaparde , Thomas Monjalon , Andrew Rybchenko References: <20220111115437.32855-1-humin29@huawei.com> <20220207014719.16611-1-humin29@huawei.com> <8b129213-8d64-0b9e-8bb3-5faa8bfdd2d4@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D86E79@smartserver.smartshare.dk> From: Ferruh Yigit Subject: Re: [PATCH] ethdev: introduce ethdev dump API X-User: ferruhy In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86E79@smartserver.smartshare.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0229.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::18) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8256a71d-1fec-4604-b6cf-08d9ea365b94 X-MS-TrafficTypeDiagnostic: PH0PR11MB4917:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CTKFKWg9R3mPsQ8rMSDtoJz+idmz+ZqAMPGSlaKoR7JNjRw+Fsr1AEq0lffqv6r6Eel8Z0mCJWhio7YNs5+2JaXtuTkTtDCk7zIvdbdke50obCoHJfNg8qTRoJ2ItT0ddVu4N7Uy7uS9+T6gB4ll+S+y/9OfDiFkhBQ1EdACYnQNCgRZy6pQN7kQ7NrhnxyC5JXIAJrVmPJRypsHAa+7ofEPE9O3xUcMJn+814eKzZBZu0GhAIqsr5O9ciji3OFYH/ImL+ac11VQMhTMdyvlH4IYbVv4XwWiUbamZcfnJSIR3XYO9tyAs471VIyJHfwQOR+vmvGZ/iIvXiMK0G3QMduKma7xD5nYBxkZn6APduuGAbUwqK4PM0ykK1krsbid5OJpR4ITs0MpEppOLP4gYHS1PNURxj/Ur+ydKjNd/ydB4EIXoBH2eATvN7TcNkIVc5mO6GehMYNzMQzeg7J6au43/W3hxG6HDkXldGuPHoJrfmrA8CiQUNoghkbyqC7sIMjssbeqceyaT/DtQJ1AXlJtKkXvi2xFQ3cJBUx/CB1qNAvkZIByldDfjQKGXYI9CuWjgyCBeaUdrjkBgB1NVWxzYLcDG8yY46Ct1I/A7KZHfPQSHeElA3Vyyjh3+MysTLuZFSFmO7+VH9teKYDLJrqRExld9sI71vv2xjau3buxkYRXHx//9LfLq5OFNkQI9hfDQIuNMbEu2OmImMBBnA== 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:(13230001)(366004)(2906002)(36756003)(6512007)(66574015)(5660300002)(2616005)(186003)(26005)(44832011)(31696002)(508600001)(6486002)(86362001)(55236004)(110136005)(82960400001)(8936002)(66476007)(4326008)(38100700002)(8676002)(6666004)(53546011)(66946007)(6506007)(66556008)(54906003)(31686004)(316002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V0M5dGpVMG9pMUZ0REx0bjE3akRJQTZYWFVKN0NFTGx1M2NWSnpsV29wRGxM?= =?utf-8?B?RDJRYVI3NTZVSkVkcUwxVlNkaThHNCtIaXJ1Y3JGWTFqS0l5UEJXYWNoeVJ2?= =?utf-8?B?TXl2M2hqckY5WU5TRGphcWlTUHh5ekNhNTl2UFVmOVFQbkV5dEdFSGVwdjN0?= =?utf-8?B?bytLOUpROTdhWllKYTNDNTdsUXJpMXNCNkVCTFdKUFYraXN4bmVGNFdwbmZk?= =?utf-8?B?VURlSlRoMXdydTd5VXpPNllCZXAxa0k2N2FVNkpwNG9xelJzTGVrQnlmRHoz?= =?utf-8?B?QUp5eWdqNnNobVpBZjZCcU5SUkRlUzgvZEw0WkR0RnkyWnFyYmJMOFhWZThJ?= =?utf-8?B?c1UrdHMrN0ZEeHJsQlprUDVvOFExTzIvcXZxbFR0SHVkbENlYlR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hwXSDbln12VOjDg=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8256a71d-1fec-4604-b6cf-08d9ea365b94 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 12:35:43.8207 (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: q2q10Su9UA/EemklY2r8Lam1zjqdSLKTw52aDhFx1LQK2LvCpzxkFlDvGAYHzy+wjaZiKCZJ7zRnZd4aQtAXfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4917 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 2/7/2022 12:18 PM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] >> Sent: Monday, 7 February 2022 12.46 >> >> On 2/7/2022 1:47 AM, Min Hu (Connor) wrote: >>> Added the ethdev dump API which provides functions for query private >> info >> >> Isn't API and function are same thing in this contexts? >> >>> from device. There exists many private properties in different PMD >> drivers, >>> such as adapter state, Rx/Tx func algorithm in hns3 PMD. The >> information of >>> these properties is important for debug. As the information is >> private, >>> the new API is introduced.> >> >> In the patch title 'ethdev' is duplicated, can you fix it? >> >> >>> Signed-off-by: Min Hu (Connor) >>> Acked-by: Morten Brørup >>> Acked-by: Ray Kinsella >>> Acked-by: Ajit Khaparde > > [...] > >>> @@ -990,6 +990,20 @@ typedef int (*eth_representor_info_get_t)(struct >> rte_eth_dev *dev, >>> typedef int (*eth_rx_metadata_negotiate_t)(struct rte_eth_dev *dev, >>> uint64_t *features); >>> >>> +/** >>> + * @internal >>> + * Dump ethdev private info to a file. >>> + * >> >> It doesn't dump the 'ethdev' private info, it dumps the private info >> from device. > > It seems perfectly clear to me. How would you prefer it phrased instead? > What described in the document is more accurate, "query private info from device". What we are dumping here is not ethdev private info, it is device private info, and we really don't know what that data may be in the ethdev layer. Also there is a chance that 'ethdev private info' can be confused with 'ethdev->data->dev_private' > [...] > >> >>> + */ >>> +__rte_experimental >>> +int rte_eth_dev_priv_dump(FILE *file, uint16_t port_id); >>> + >> >> What do you think to have the 'port_id' as first argument to be >> consistent >> with the other APIs? > > The _dump APIs in other libraries have the file pointer as the first parameter, so let's follow that convention here too. No need to move the port_id parameter here. > Yes, for most of the _dump() APIs, file pointer seems is the first argument, bu they are from various libraries. Within the ethdev APIs, I think it makes sense that all APIs start with 'port_id' parameter for consistency, like done in: rte_flow_dev_dump(uint16_t port_id, ...) > Only rte_dma_dump() has the file pointer last, and I didn't catch it when the function was defined. >