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 9451BA0C43; Tue, 28 Sep 2021 18:50:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8317D410D7; Tue, 28 Sep 2021 18:50:25 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9A3E340E3C; Tue, 28 Sep 2021 18:50:23 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="224790926" X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="224790926" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 09:50:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,329,1624345200"; d="scan'208";a="587527313" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 28 Sep 2021 09:50:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 28 Sep 2021 09:50:21 -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.12 via Frontend Transport; Tue, 28 Sep 2021 09:50:21 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) 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; Tue, 28 Sep 2021 09:50:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzYsGREHef6+q7ifNIOybXk+n4WUi3ozMPb7CkmYsFOk43ZfYORkTPjypI0AWqn65i/l/A0rJgxWlPZgl3RCSAt/SMvptA74jcpJginHU7UzM5WBuPOonbnLMZwPamS6ak1Av7/cI1M4FUDkKhc53ffv95nJDQ5jgxLrOk+jF+0SipDU9Bq6HcGGan8eY0GKWYVZh0CV8B+sO9aF/s5q6+47uVd33/JElzbCfj+sNMHGIILw+Et+Rth4gANzdotjNPP4wcNzNGnSmXmC2uGrn3muUx+Ol58RFcxTmxi8DCVV5nPo/jCRJbfJWcXVS6R5zxl2XUVaV+AKqqJTerUZbw== 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; bh=teKgcvVXv8Bf5pDHhNaJT+TJRtUvC3SG0RSP2NPv9uQ=; b=Uo3xHHlv+ORtoi7Q1OZBmEqUukYBM5pAJus27eOi6u0RXHwsLHg7Afi/JVBJtV26BcY7ouMBkBbaub2sYPzqRqXJHljhg7nymWHkzJdK2W7m2+Y64EIkVhNQ3bNQ4GolkGGGBHM+1VCR1O2PjzG8ntXlhSpGEvM4gnqyUcksTPrp1OvKNHLz2oF+4JKosLqf3PKYjAPqRqXw40berVx7VyAEDdg2o8qj7X7sV/NHe5toB6p4g0Ud6MI0KME0H7eGqIwaQJ49WjYdOTYGzoCbFnggYC/4bcCN0Lv92FywyaDMaumrKQuetpQ8uDLcIHi2YB9u+q8qwHzT73Ny1N5OTg== 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=teKgcvVXv8Bf5pDHhNaJT+TJRtUvC3SG0RSP2NPv9uQ=; b=JnHY1/XMJkrv3b/Znau1mYYuaYmU9xLTHbs75l+sXSX4t+TCw48VVvIXQS/XdRge+4rnNX3oA52Se6/b8q4hT8g0FBCfRi0V71I4t74nNj8sodTqYazVbC3J/JYxjDwFgVpzSuCi1G+HJHGyAqvCt41+qSCNjlmDBpZsX76sluw= Authentication-Results: xilinx.com; dkim=none (message not signed) header.d=none;xilinx.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5077.namprd11.prod.outlook.com (2603:10b6:510:3b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 28 Sep 2021 16:50:19 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4544.021; Tue, 28 Sep 2021 16:50:19 +0000 To: Andrew Rybchenko , Thomas Monjalon , Kuba Kozak CC: , Olivier Matz , Ivan Ilchenko , , Andy Moreton References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20210928120533.834334-1-andrew.rybchenko@oktetlabs.ru> <20210928120533.834334-2-andrew.rybchenko@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Tue, 28 Sep 2021 17:50:12 +0100 In-Reply-To: <20210928120533.834334-2-andrew.rybchenko@oktetlabs.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB8PR06CA0036.eurprd06.prod.outlook.com (2603:10a6:10:100::49) 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 DB8PR06CA0036.eurprd06.prod.outlook.com (2603:10a6:10:100::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 28 Sep 2021 16:50:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 045ba8bb-f2ff-4bce-85c5-08d982a00e4e X-MS-TrafficTypeDiagnostic: PH0PR11MB5077: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kds+sQYwFRbdIjrdZb+U7b+XuYlkwdYIYCZNnAONWRXm+q0tsP8ordri+cm7+3l96I5M1f+02w6+3tEd36q/ZOl0K/9c55LnW7wZCKfH6yOYD/RVlEIl81IcqRHZH7dAdcJQK2XjYfsDaRDQw1D52+snPdNSn+Bax/DL9r/IeHy0Ma15OdLzW81DdmA4deW8LidkM75NP6+jUE1j+h8QgdFEX20vQ1PFugtz5oFfSh7oQZVwhZgLXSHyg9il0wA0Or8/svikdPVZX7lQLgGfRc3jJRfEP57fUCmnymw6t06t7EMli44m7/6/KNOlpFEBK9r0XIDB/tOpAv/LVFhdJlWZWWcrtr3i2JODyygKb4wLH4SQbgTVkDdUm6dbUh+X/AWqtDJf58hLm2Or6kM+y4Dbl9tLH5mjQHsS//sLvsJ8GBBgxE38RzullOiJjspn2D1UFPj009sclQeRYUSMzd7wBy7LbESoqpQixGKeSRsaGpJvYQbSu19F7+okaSVHqAVxdRBHgSI25TiB7PRKB1d+slNhcOu2wHb8XVnB0T1aXu4sWWLZWNSi40U16/rzkuEQCURGrAz9cFKSbe/Jap8HwRVIDfR3qEjPzPoWD+cLEuc8L31uvIQJ4IZcIljHhyrAymbGHXmKhRIOVEtJWdVKrXYD3CfBIO582pRpSff0y23GbsG/+vA7TRQyKwVmSWa9eNhvZySHH22z0JG4uQ== 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)(31696002)(6486002)(6666004)(4326008)(38100700002)(53546011)(186003)(31686004)(86362001)(8936002)(8676002)(26005)(5660300002)(316002)(66556008)(2906002)(16576012)(44832011)(36756003)(66946007)(54906003)(508600001)(66476007)(110136005)(2616005)(956004)(83380400001)(6636002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M3ZuMEdVQkJ6eW55elpuT3gydHBLL3VSby9SR0NqY05ES1FxSWZjS1dNc1B2?= =?utf-8?B?RXVSM1YrRHErR3g5SXhWTldPYkFuWWRUQk8yRzZQbUhudFBXejRQRW1Qb0Ft?= =?utf-8?B?TGthL0RvRlFzUmx0aVRzZjZiN3ZmUTkyTC8vVUFtNUlBenc5OXRTaSs5eTJ2?= =?utf-8?B?K1lsZFZhc2lXaWlzYWxQemI4bWNzVUdUcVpUUGJRWVhTVHBSK0dxZCt6VVRS?= =?utf-8?B?bjFwTHIwb0t0cEFpSHRhdDIwaXpJekZzNmtvS0I5V3hWSVEzUWtJTjJZZjB0?= =?utf-8?B?U3dzaVpJN3NKRU93WnpuMTNPYkw3OUZsMUwrUnVjbmFNRE5HUEFsWlhzcjFR?= =?utf-8?B?N1pBdkxHLy85V0JGdmNWbzNYL3lUQ3UxY3FUbk42MDc0eGVpVVBoblZRWWdP?= =?utf-8?B?YkdQYjAwNFNmRys1TWVXc1BuSUMvWUlCY1J2QitCZDFKTUxkKzk2NTdwclVB?= =?utf-8?B?YWNaOGdrNll1NllSYUFWUWRldjFseTI1TnJ5Mz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xalBRV05FSkZONnN5M1BWRzhnbTVnRjlCd2FtWXR4?= =?utf-8?B?VU05SUY2djlUSkIzY0FnQ2tBKzdKdTRoSzBSSVJCMGdMUFNKb3JnbExtdGJM?= =?utf-8?B?MnoyM25TOFU3bFNrdVlPNml2UVJTSlZHMjdPRzNHWTZNSnVsMEU0d3R4UVZp?= =?utf-8?B?SU9uNnJJc002QTIxTWhveTV2ZmhyTjdjai81bVZvZHZEV2NiekRVeGhZMzlY?= =?utf-8?B?dDZKcFlla0pCalRyVS8yT2M1cGVVUzQzNUlKMllVcTVDRStlWXFHM2xSeTg2?= =?utf-8?B?azdNM0lZcWNROFZCZUdmYWl1eXJOdm85TXRJaFFVOGN5dlk2dkdXekZ0RGR2?= =?utf-8?Q?wU8dkO259BnXitT8OVcFyGbK/05caOlmbA0Opfv?= X-MS-Exchange-CrossTenant-Network-Message-Id: 045ba8bb-f2ff-4bce-85c5-08d982a00e4e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2021 16:50:19.7504 (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: KOgpCcFNA9WSdmg+bH2NgX75X92BrBkmTA7W+4F7L5Gm65fyHYzkBzaNLtgXehJOy4rU4cUTT8wPhDVVt4BTwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5077 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/2] 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 9/28/2021 1:05 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 | 42 ++++++++++++++++++++++++++++++++++++-- > 1 file changed, 40 insertions(+), 2 deletions(-) > > diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h > index 40e474aa7e..c89eefcc42 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. > + * > + * @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,31 @@ 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. > + * For name count, set @p xstats_names and @p ids to NULL. Why limiting this behavior to 'xstats_get_names_by_id'? Internally 'xstats_get_names_by_id' is used to get the count, but I think this is not intentionally selected, just one of the xstats_*_by_id dev_ops used. I think it is confusing to have this support for one of the '_by_id' dev_ops but not for other. Why not require both to support returning 'count'? > + * > + * @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. > + * @param ids > + * IDs array to retrieve specific statistics. Can be NULL together > + * with @p xstats_names to retrieve number of available statistics. > + * @param size > + * 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. > + * - 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, >