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 36C55A0C51 for ; Fri, 23 Jul 2021 16:46:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27A4940DDA; Fri, 23 Jul 2021 16:46:16 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3A9E24003C; Fri, 23 Jul 2021 16:46:13 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10054"; a="199093585" X-IronPort-AV: E=Sophos;i="5.84,264,1620716400"; d="scan'208";a="199093585" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 07:46:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,264,1620716400"; d="scan'208";a="496328852" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 23 Jul 2021 07:46:11 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 23 Jul 2021 07:46:11 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 23 Jul 2021 07:46:11 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Fri, 23 Jul 2021 07:46:11 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 23 Jul 2021 07:46:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwuBaz7+5EVUW0f/3vJtJR4/FyLnwmf4/2aOhMY3TBbdd/tZz2EU50l3LTr4vIleyvrx9gcNmPob9hjMeh9Dy8MIHt26X32NlCgElbwnPUPVZ7mmNALT2nnjNG1sQ3WHr+uQ7bzBWGnYkqOwY9W/9PaKfCm+JB5wRvja/oO71WuYIwyFD8sVXYK1mY/YviQAv5p+wb01wZuA6+vYVB/aRpFvc/BkmppBP21hXErySrlMsHH0bv+ds3KtzN18pe28IjzNzK1C8+BQbrSlJ2Fai1wozcg8fObesnBblsOhxZJ5w1iYBWtOgkh91VD0SX3FLSI/FsZlkQ5Hmx847Kzxmw== 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=Ets6SsQ3KPBzrWp5dTffqpzSUeUqASnbCA8c4HGAac8=; b=YVZTvqv1phJO97ygnVykrBazLQ8+fp0Nw7LNtwJEPg3BjtyBMQaMPhlU/7nrOcPkGwszwd30Bqw8k8Im/7nR3DYYjdnNKfYeDq6Kpji3Qrptg0zWZmKmMnaZ18SQNeeU0VqlOjpcFMEEo9P3Jp/EZyKwMeHR8l2eKu0u7tG9WelK5KKb9Ya9oHOks7HlcjNrgKC4Jf17zssrvINtpfqIDP1V5BQD/FTJxiEI5AZd82B8Fovq/yPPSim0UdlJexP9jQ2l8ARzwIiqZAd/S02qI1mfgyVQTW9OLmLU93mNcXIEOfw+SGPHjeynXp/7hJCJPgyBGaimWyNNi7PsB7DPLQ== 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=Ets6SsQ3KPBzrWp5dTffqpzSUeUqASnbCA8c4HGAac8=; b=QDIbxmdpreAUI7sJ9IELuD8y1oMGEpDJtnkrQ5H01BBeVKft46Y7RaIU9TyfIUJaFnxtXhILGy5pzKd30RxHKuotMGKX+7QgZSwqZLmGTr8HY+vC/xP2xtnNkGb7rl5DSN+GVujUI9LHIjSOhiFm1W82eF6erhil5ft7Xuo2m+w= 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 PH0PR11MB4967.namprd11.prod.outlook.com (2603:10b6:510:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Fri, 23 Jul 2021 14:46:08 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb%5]) with mapi id 15.20.4352.029; Fri, 23 Jul 2021 14:46:08 +0000 To: Andrew Rybchenko , , "Thomas Monjalon" , Kuba Kozak CC: David Marchand , Ivan Ilchenko , , Andy Moreton References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20210723131515.2317168-1-andrew.rybchenko@oktetlabs.ru> <20210723131515.2317168-5-andrew.rybchenko@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: <838842ef-72c2-fa75-ef52-4730e3959dc8@intel.com> Date: Fri, 23 Jul 2021 15:46:03 +0100 In-Reply-To: <20210723131515.2317168-5-andrew.rybchenko@oktetlabs.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0313.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::12) 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 LO4P123CA0313.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.26 via Frontend Transport; Fri, 23 Jul 2021 14:46:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d081cbb-c38e-44bd-6226-08d94de89b2b X-MS-TrafficTypeDiagnostic: PH0PR11MB4967: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BSwNKACTP9k9iW4CblxOHUG8aJhnt7mZnGlgy10o47HoFAHDdCY2QM5R421Rz9K0+nxahDiiJRJxiRMHRPFi2i9WzTCZe+kCq6/msMDe7kdqxYhc52Yjd24pTWGHbQX7X+ski5t7d03wZAykEWohLVsidkmEZq60e0E8J/oxjLY8InghK/YTCtykN3JwsBvyhWHkv6Fxq7GTRkEqn0erXfGTql0nvaEW8/nVHdGR9N9Ehs6ExRto5xARCFrDDPMahhFjASdfeGUBwNl+sJ7PTyMmZlrGkHJBHdHwyWtDpGQn620QNLC19ype6VhiviD8CVOQkUBe+kjmUPLhh3Z2a9F415xOMmBnHMBeh9hZ+bANcU71vBjhlpYs7qcdqHVfIr2lmsC91AtCaEPBb1zt3rA6kZE41Wzp+VmvRg2CPiyr8exmzIBq2caRis0NU9YwfwmsUVA4HjUccQ7B4MsezqSFElLnMqiEKbI7GGUKRUrORV2ml0emqNzmDmJxU1e10Vg9By6rm1XhyF5YSdhLiFvt4oNASeVI1sApa5BVABuwKVdKxECCNU9jwAYWxlcB1Bc5Yx007ExVylrLJ8SaP8Nt3p4fCCxX9nVDYP2ZWTzqP9gJfOmZVjEoW0SwTMfQcxmZaPBsECqZqrYIU60897LAohv2M1v+wxZ/7aFHXAXHOWHVEP5Qi+i5OuuYz+Yy4zBHq1hD+4NL30m/sifoyQ== 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)(39860400002)(136003)(366004)(346002)(376002)(396003)(4326008)(8676002)(6636002)(38100700002)(6666004)(83380400001)(66476007)(66946007)(31696002)(66556008)(53546011)(8936002)(36756003)(31686004)(478600001)(26005)(956004)(2906002)(6486002)(2616005)(86362001)(5660300002)(16576012)(316002)(110136005)(44832011)(186003)(54906003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WllMOU5NbGhLRnZOS0NiOXJPdlNlUllqUHloVjU5QW8zWjVWb01wSWJ4aTRa?= =?utf-8?B?QUNGZ1JoSFhKU0E1bmVRRGZwN2ZNWENUcFFXSzRqWGg4cStFOTM0T0hWKzVw?= =?utf-8?B?RXJpR0h4Q0ZXODNjTGRUSFlsZ0QyWERubGhiRHdqOEJOVll5L0ozTUIwbUJr?= =?utf-8?B?ZlAxRU45Szd0MWZLVWJvdzlScklQOUNBcFBneG5YREVSZy94Y3FpVkZmS3I3?= =?utf-8?B?YVFNK0VuU1RlRFBwUHMrM3ZMdWxiQTFySGpmM3Zn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VbXphL045dmdPR05rc1BpUW1m?= =?utf-8?B?ZmhVUkpwbjRVd3VjUEtSWkdPa2hQa213NlIydVBtUG10azFmNEhTSGtJWlpL?= =?utf-8?B?MTRvN1RBQk5NYmZJYUh0eW1jK3BLekxrMVgxbjJVN3NFbXlFSnFvUTY1clJn?= =?utf-8?B?bGNqMkRKV21aNnpKbjB6b253MWdZTlhsNVdDeWZlTTcwR1dxN3lGdHVWT3pB?= =?utf-8?B?OW5BSC9aU1p3K3pveVQ0N0ZCUEVaeklMUjdEZVJYRmY2bVdEdmpENWFmQnNH?= =?utf-8?B?aWNhZitLZEFWVVpGcWtqTG9Nb2I4WlY5c1hlWWhBQ0tWeVY0VmFuQjdSdzBT?= =?utf-8?B?VHI3ZjNVUFUyUVRjd2RTdkZpYnp6WG5CNUo2NVRLU1B0U25KT3hudkpFQ0c4?= =?utf-8?B?Z2VrZDdlZzJPTFlZU0JpNnhpOThBdVJBQ0lUd0pVcUlVaEk3Vm1yR205N2Ja?= =?utf-8?B?NmMyajR2QXhNNy9TdkxaOUxTMXB4a1ZTcDdXb0g3M2lvT3I4c0lYZVJUT0FU?= =?utf-8?B?c3BXMG03Y01WZVVmOGhxS290NnVIMXZHUzF2WDRiN2t6bEZHUDRENmpUZUxr?= =?utf-8?Q?z6oSirKoKacJYIto2R6wGZfB5IDP1hGsxNrKhHM?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2d081cbb-c38e-44bd-6226-08d94de89b2b X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2021 14:46:08.1963 (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: XNw3jS0H1RfYzI8ZkfAbUoFwLjy+VG94lUesXfmu2XKFKd8v4dKEjj2xCYL7+AsMKPQHYN2bImeUw2yFMEB6EQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4967 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v3 04/11] ethdev: fix docs of drivers callbacks getting xstats by IDs X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 7/23/2021 2:15 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(-) > Some discussion on the v1 is still valid here, so I am not putting same comments here until v1 ones clarified. > 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. > + * > + * @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. > + * For name count, set @p xstats_names and @p ids to 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. > + * @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. > + * - 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, >