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 EADF6A0A0C; Tue, 20 Jul 2021 18:52:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3F0240DFB; Tue, 20 Jul 2021 18:52:09 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id BF92D40689; Tue, 20 Jul 2021 18:52:07 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10051"; a="211274882" X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="211274882" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 09:51:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="414840984" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga006.jf.intel.com with ESMTP; 20 Jul 2021 09:51:53 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 20 Jul 2021 09:51:53 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 20 Jul 2021 09:51:53 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.10; Tue, 20 Jul 2021 09:51:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EGOprg10nkSh4KWSGiagpFVYnI7x8a6eFe5JoFGvxIvMQxPbwKGTKadVpviG6jdlMvbGqHuhPWrCD9EOXr71YT1y2w6C5Xjz2EpjjsSPir+8OpGL5gKSSxQ8ZCnaiATfmxIrj+dPlhiP/wyTofuRP94up+46BUJRDBMF9oJV0Sa4EFmGUCVP1rX6oLuyajIxPOROKQmJ3VTLEIvARDK1KFhJAROkR+4rDvSD4GjiNj+VGtrWmyqIgV7CuhLoheQ7oXNzZHkMTK1ZkW3Ld01nbtUGlJGG+bvifAoSAHmE4LSa0yusmk7GR7ng0vktCTrnORHylo2CZwalIC/iuFBtiQ== 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=GEgdShMHR5D/7k5VFLzhy7sT+W9ZhehQ6WZiZ+gN+B0=; b=Uz0vFqorTWNnXsm/f9nbbMHHPvqcslQhNNXWSJk0jDfQj/25KPxwg8LugX8F5wfw9LwYz/x2H8SSJfrIX2vAdaFri0vfZ6a5mXU4ddpu8t1vd7YmHD6qEm3kvsTF9I8tPyt0x1I5WZDh7Bi9WEK+vP0y+L5Jk0A2KQ27wwY9/dS1WGKyIu+IG5Dd4q+9jMdtBsrbOKw9YYdzl4Iklt+i7t4G1wsNQ3pjFOVti+xZmVhTaxmFuke2dsPnQY00WwaKbLEPudGztTNBGKG7W01pjHd5o7acpnsMlmYHpXib39om3NWaBHUi6xuJ8veDI8JsbOFo+nA5+4Kk9R/M5zvvVg== 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=GEgdShMHR5D/7k5VFLzhy7sT+W9ZhehQ6WZiZ+gN+B0=; b=wXsUsOoF5Y1DR/5uSkpemqmNwWBX6kP+ILtfaH0AHUMZy1s2mUy/08oxZhW/OfcDH6Zr93cv0TOpGel1/Boo2w9ZNYOijegFSaptp7DtfArnIxzn/ETyYVqHdapNP4F+6W2WVcjh1BtvDdQ2QQNKeF3SBsIXmmJAKEAC7XeNacA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4792.namprd11.prod.outlook.com (2603:10b6:510:32::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Tue, 20 Jul 2021 16:51:51 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb%4]) with mapi id 15.20.4331.034; Tue, 20 Jul 2021 16:51:51 +0000 To: Andrew Rybchenko , CC: Ivan Ilchenko , , "Andy Moreton" , Thomas Monjalon , "Kuba Kozak" References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20210604144225.287678-5-andrew.rybchenko@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: <16f738a7-28b7-bd41-cfd2-60f35f868c32@intel.com> Date: Tue, 20 Jul 2021 17:51:45 +0100 In-Reply-To: <20210604144225.287678-5-andrew.rybchenko@oktetlabs.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0197.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::17) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by LO2P265CA0197.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Tue, 20 Jul 2021 16:51:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33e9a9b8-0daa-4148-850b-08d94b9eabe3 X-MS-TrafficTypeDiagnostic: PH0PR11MB4792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gSdE+4n3oKLdA5Fo0cPtgO9s2zrx9r4Hr9C46trbljf6gQe85MNyvsCZ/mN5Y257HzCuaPKrSaOspEzQuehtaEfiffMJuMJWsjZcuf4b2DyDQKjww8+czJHXvDPHtcjbsSNA02ama0oVRW8gJLuqxyJotSsWN1kjDHbQa/FeEnNCQBURGy1ITLImNkAs0Iyeg/jml7+SSZosc+8bgSOuTPRcJ4EO/K85eFe3CpuStGTSrfcKZsytJUabYXJ6Zc2v0rn7TALcnMi6zmVi4HRm5dBlGjubNEugUNN5Hdrt70fiXejAo14mq34gz24oljYgHPHwGASrCUZMebMDEA0YdC0QXtTa6EAiJcygOTTlsVECLjpMTQa8/wbaaVXHtuWnWzEW8gDNfVqvSwku4a3W6WlE3vJ177g8eIysTTcl8sQo4q+zBpdT3N6OcBuq6uvhi/h0LMRaU3IotESpFCKGpvBv5x0klzXhhn5ZeeGMLJBKVv5fZB9bRz4stouoRCS9Z2u4KHxi8a1ZtbWlYfR2lj0XfrpNM3reuAMiRuxgzCFweZEx/i5Zm9MX8WwrhvjMb0lgq/T9JD21h3+CHguKKnKl2tcErAC/UAZmDEGFSjjKmd7tMCvfdkIuwmm17gIsmZtwqAcCiUJUOk6g+345yaawQ9Wzj2ESXWnJ425BL3adnNqStwtLOtPqzY8ALq0m5SIn+CU1m9vg3F/S8n2GxQ== 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)(396003)(346002)(376002)(136003)(39860400002)(16576012)(66946007)(4326008)(31686004)(2616005)(478600001)(83380400001)(6666004)(38100700002)(54906003)(316002)(31696002)(956004)(6486002)(186003)(53546011)(36756003)(5660300002)(66476007)(44832011)(66556008)(26005)(8676002)(86362001)(107886003)(8936002)(2906002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QjV4ZGFQWm1SNFdiaitUemNxVmJ2dW4wZ29EWjVSbmxtRTVBbzlpaDRnb2F4?= =?utf-8?B?c1J0eks0ZTk3V0ZvdlM3UDBwQnFpS21jYjFEWTRST2tBdHlQcVhvVCtVaGMw?= =?utf-8?B?SSt2VWJtbDE0dEtwZXovbCt0MUpqdkc4aHdGeWRUZUJPTThDSWZ0NW9oOUlV?= =?utf-8?B?a1VpVGNSQXNHNE1QSmY1cGlWOFZ5U3pvQlR6cGlIRWJlaWt0VnB4Sld0a01W?= =?utf-8?B?YUxJTytYQlgxbEY4eU56WTBMTCsxR3ppWjRxOVl4T3U1SXZ1NUhXQktMWHQ0?= =?utf-8?B?UXlHUFhXcHQxcVBZL2ZmcWRTcVZPVDJHMTkxdUpyV0prODM3dHFnVm5NWnpn?= =?utf-8?B?RnZ4VGhndmJQRFc3clZLbkZwOWlHbTFwTkVVWC8wZ04vTEZ0ZTUvZVRNaEdE?= =?utf-8?B?RHR3d1RR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J?= =?utf-8?B?Y3FZc3VyNlYzbGFXaE9LWjI3SjVQcUxNVU8rQm5YTFIvRTdnUkpMaHRMcWlo?= =?utf-8?B?ZnBGZmlPV0ZWdm9jREZVRDQrUlZ5QUt6NDhGNnp2aTREOThBRTlrdHZQRkxB?= =?utf-8?B?TU01T0l4LzZCWlZrNk5JZUlXaC91TVNtdCtOT21RWjVOVzlNUS83WVVJT1F0?= =?utf-8?B?L1EwTFNIa0pMTFZ1OXQ3T0dJUFRKaHY0bUtJVkNUMDFyZzI0UWlIdDdSTERB?= =?utf-8?B?enIwMHFpMmhiMWRaR0VXVllnREx0bkN0Z3JXM01BUmJVdUo3UUowV3czUGtj?= =?utf-8?B?ZjZySFdqZUQvNGUycTFMV1FOZkZiVk5SNFF3RzhvbkxOZTlQQ0FqLzRyeHBE?= =?utf-8?B?RWdNYkNRak93QzlzdjcyamFjZ3NmM0c1SFJnYkRsQ25XdTFmRmc0czM0dFlO?= =?utf-8?Q?vmHi6AIzOBld6atz96rbGUbsfABMzLt8zqt3GZ6?= X-MS-Exchange-CrossTenant-Network-Message-Id: 33e9a9b8-0daa-4148-850b-08d94b9eabe3 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2021 16:51:51.2606 (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: 3RCRm19wwu5KhWmSYmFZmi9Ou4q8Hrab7GE1cM1s69BCFziw8y7rf6ap2Hz9Lww1OvfyNrZW3bT5213geXg8aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4792 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 04/11] ethdev: fix docs of drivers callbacks getting xstats by IDs 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 6/4/2021 3:42 PM, Andrew Rybchenko wrote: > From: Ivan Ilchenko > > Update xstats by IDs callbacks documentation in accordance with > ethdev usage of these callbacks. Document valid combinations of > input arguments to make driver implementation simpler. > > Fixes: 79c913a42f0 ("ethdev: retrieve xstats by ID") > Cc: stable@dpdk.org > > Signed-off-by: Ivan Ilchenko > Signed-off-by: Andrew Rybchenko > Reviewed-by: Andy Moreton > --- > lib/ethdev/ethdev_driver.h | 43 ++++++++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) > > diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h > index 40e474aa7e..fd5b7ca550 100644 > --- a/lib/ethdev/ethdev_driver.h > +++ b/lib/ethdev/ethdev_driver.h > @@ -187,11 +187,28 @@ typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat *stats, unsigned int n); > /**< @internal Get extended stats of an Ethernet device. */ > > +/** > + * @internal > + * Get extended stats of an Ethernet device. Should it mention _by_id detail? > + * > + * @param dev > + * ethdev handle of port. > + * @param ids > + * IDs array to retrieve specific statistics. Must not be NULL. > + * @param values > + * A pointer to a table to be filled with device statistics values. > + * Must not be NULL. > + * @param n > + * Element count in @p ids and @p values > + * > + * @return > + * - A number of filled in stats. > + * - A negative value on error. > + */ > typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev, > const uint64_t *ids, > uint64_t *values, > unsigned int n); > -/**< @internal Get extended stats of an Ethernet device. */ > > /** > * @internal > @@ -218,10 +235,32 @@ typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat_name *xstats_names, unsigned int size); > /**< @internal Get names of extended stats of an Ethernet device. */ > > +/** > + * @internal > + * Get names of extended stats of an Ethernet device. Should it mention _by_id detail? > + * For name count, set @p xstats_names and @p ids to NULL. > + * isn't the 'count' part handled in the API? I think in the devops both should not be NULL. > + * @param dev > + * ethdev handle of port. > + * @param xstats_names > + * An rte_eth_xstat_name array of at least *size* elements to > + * be filled. Can be NULL together with @p ids to retrieve number of > + * available statistics. As far as I understand both _by_id APIs and devops behave same, so argument descriptions/behavior should be same. > + * @param ids > + * IDs array to retrieve specific statistics. Can be NULL together > + * with @p xstats_names to retrieve number of available statistics. > + * @param size > + * Size of ids and xstats_names arrays. > + * Element count in @p ids and @p xstats_names > + * > + * @return > + * - A number of filled in stats if both xstats_names and ids are not NULL. > + * - A number of available stats if both xstats_names and ids are NULL. Again as far as I can see these covered by API, not devops, am I missing something. > + * - A negative value on error. > + */ > typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev, > struct rte_eth_xstat_name *xstats_names, const uint64_t *ids, > unsigned int size); > -/**< @internal Get names of extended stats of an Ethernet device. */ > > typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev, > uint16_t queue_id, >