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 25072A0C50; Fri, 23 Jul 2021 16:42:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97B2E40040; Fri, 23 Jul 2021 16:42:39 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5A5F74003C; Fri, 23 Jul 2021 16:42:37 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10054"; a="199092922" X-IronPort-AV: E=Sophos;i="5.84,264,1620716400"; d="scan'208";a="199092922" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 07:42:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,264,1620716400"; d="scan'208";a="513504898" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 23 Jul 2021 07:42:35 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.10; Fri, 23 Jul 2021 07:42:34 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 23 Jul 2021 07:42:34 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.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.10; Fri, 23 Jul 2021 07:42:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V/6kFeW5ojfsrh+qxwKeaccxGssMeQiJPFeDU6+nKBQHgRWfb7yrlCnLmsMldLGh52jzhexDf6RPW0n87ck3lIpWAWkJIxYtxP5q5mSwqUROwZ2jCeLz5XkzzPnK34bbHMBIReL+r91SoCTrxKfaDHg7VYH/4vncucx9FT0+zg8vngCQR12yakng77JeP1Yi09bASYXrDbLgj0Mu4u555a4N/vqgV07WQwMV4EqwvVBQwmLDjcylEHmNgnsebgxRIrABF1sMiGfT9JE5nyRG4GriJ+egx7eH43RLrzhM+Vk7vQk4xYwSAS5X1AtJV7/Yb35NNUrBAAVr6IcuBLkAmQ== 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=rnA52IC0zt0rzXvAaXH7JTv0ZJsJb452lkXeRc6JIts=; b=OOgfxZ9cfZs4S/i6CDD71xi0cT9YX5m6BgnPr9fByKWQqdOpH9A2xmVizGGhuuvYxZme5w0TSHHx3f05bPpEtDGcOtr5/Ls9aqOoItbNBEzPmTiqkVZQIB69KeW+mEiojPw1TfqJVdRZSP/kJ/nKp/i34NTr65ThmY+VhTtX0zF+l5e/SPrKrfJ3Fr8H+qmQCdAc1zlWtnyLO2PbaMA2rLBXqX8315b5Aq/6l9bUq7Z7RSRrAHmFKkYpJgs+n1A1XeVd/grJhc+HzDc3mxHrHCXnKkBuzCUSGmIlPJKlwoPthfIRExmCS+PiRPSEFGXkKW1IIyMplk8QgaaI2HkndA== 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=rnA52IC0zt0rzXvAaXH7JTv0ZJsJb452lkXeRc6JIts=; b=L2YnRbDO7jgknqfp/KauGEoyCZN6ifq81g/CUDp000nBrNoKAcrX9tUT5W1lItuFRKmGq7L1t0lTtj1GLYo5IDwPtBXPibl3ulznyfAgGRRIc3KXW3oG1/U4FDYVA6/qoP31sBqi7sQGq20cOooRArQNkLRqJIWtUlZfVeWigys= 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 PH0PR11MB4888.namprd11.prod.outlook.com (2603:10b6:510:32::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.28; Fri, 23 Jul 2021 14:42:30 +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:42:30 +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-4-andrew.rybchenko@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Fri, 23 Jul 2021 15:42:24 +0100 In-Reply-To: <20210723131515.2317168-4-andrew.rybchenko@oktetlabs.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR3P193CA0025.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::30) 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 PR3P193CA0025.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::30) 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:42:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3fff9f5-a74e-4093-8ced-08d94de8198c X-MS-TrafficTypeDiagnostic: PH0PR11MB4888: 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: yfrT81IiTDsWz/roc+w8Y/B6GyEtznrNPnh/P5HDhCw/x0bbQqhr7d/oCyuZETEoczdOZLo4IjBgfwNc6ddssfgvf5dk3ERCT83e8yafz4jhBPTeFeeeHN8E03TfAAPZNkDrSVUVsu1qUvXOSstHBPXBCxZF3SV5RVDGFHi08zGLffv4cVDnejbeipSQfxIBNFvxnOc+1m2y+o8zEdCgKnmWloaysVpUvoqcnJnpeZrSTdFWJ33IAAiv7+n49ZOoKKPmq+rszu26FGiRVK+3e+ZxSrfgPUuvDn7CiDu1pVALOY/hEikhP1gJxas8lftsp3zU3ln1wPHyIScfL6jeG9NFM12Q0d8F1E1GrWmnQoLtlEA5hTeUYKA2G0OSkFoYM7Md5bTW4Z5IjXbfKKQQrP2kBzCg3tB2fPCEedHB43x74ES7u0QlsbELdM2lZoaU3ZzJoQ8r8nMGxn8GBO8ZuiTNvShuR1YYtZbOyXV47/jrDIa0tlDnZbhvCAuS/NUe9l4qAhY9CwSmpmxiKksMlB7j2sDGda2wEWaVmpcpPl1rxkXzNWncdTpU3QQW1POTC98EYHTh1yYb89gT5FwVQLE28k6ioMFAm0MizWhTLMYjK2TDi9R7kJeEchgSXrSu8X5AjMM9l00At6XMiyIbhju0LAGsAvSNYX275228L27XY/CYboiq09qAgXOVtaOTDUMCbXSSXmK1vZmL1OuHdA== 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)(396003)(39860400002)(376002)(366004)(136003)(346002)(16576012)(6636002)(8676002)(66556008)(956004)(2616005)(8936002)(110136005)(54906003)(66476007)(66946007)(44832011)(6486002)(186003)(6666004)(4326008)(316002)(31686004)(478600001)(36756003)(86362001)(26005)(5660300002)(31696002)(38100700002)(2906002)(83380400001)(53546011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MnVEdlZXdTMwa0FpSk5XR2RXZlVPSUZPckVPaTh1TlRTNXNtTStVWkJRWmZE?= =?utf-8?B?aWw1V1NFVzZKV2swcDR0Y3BOWkhrN3MzYSt4SmJnS25nTWVOTURRT05ibFNh?= =?utf-8?B?ODZmZFI4OTZxaVQ3SnB3MUUwdVVma3JCNndYbDh3RVFTcCtQOFlPWnRta2dj?= =?utf-8?B?SlErYU1mTWZLam5tZXJYYVo4TVMxMHFSZ2FJOVUxTHhuU0NMZEZEalRpM21I?= =?utf-8?B?dk9oeEpoTjR6Mld0dnJKeWhieDd2YmdFL3cxTmVUN3N1NkRPUTNiZGpkWjBV?= =?utf-8?B?YzVRVW5lTDRabXRMYyt0N2xUakVGSDJhbGtPRmtwNEd6TFhkZXRWSlRHaElK?= =?utf-8?B?SUtmYnpkS2FoTDl2eEh1UitQREJoTmNrTkcvTzZyNjBwVjUyenBraFZYcTVP?= =?utf-8?B?V0tpM2tmUmpIZjcwRmNuWlNoc3RRcnVrQ25ZdDhuU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zMmlEclFya2ViajdBKzVmSVNSYVNJSnB4?= =?utf-8?B?aUl1VDk0b25oczZKRk9yOWtPbWVqUGRZc1oxNzl5dU9OK2RQUUhvV3psVHZy?= =?utf-8?B?bk5wdDdWMFBSZDBsR0l5YktVcDFUcjNmcjVwM1NnUHErcHBrekU4cTN5K0hY?= =?utf-8?B?RUlMWUh3Z0hXdk1YOWR3Rm9DVWRuWEYvVnFXTkpzanZHWlp1YUpLcGpWeFkz?= =?utf-8?B?UWNIUEhRTW81TkM3aFlPencrMFBPMG1RMjFZWlpEaWRabEovR095RnFlaDJI?= =?utf-8?B?Q2diNXBRbGt3VTFoam42blZCWkhVRDhkOSt2ZE5qWmVCL09JcDByUTFQL2t1?= =?utf-8?B?bWt3dFR5K1FwUjI2YVZFRUFqZmFOb0U1RnkxZFpDaDhJMTFDRnVTc3B0SVE2?= =?utf-8?Q?FVzKW5d9upgmeoXiVDJavpGye1oc7WtfUJfJjJ/?= X-MS-Exchange-CrossTenant-Network-Message-Id: b3fff9f5-a74e-4093-8ced-08d94de8198c 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:42:30.7133 (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: FJSLqljbrXINoBQPqAKNcjkR5tP+ZO1RXf6MrD+b1UYE0A5dEl+CwaDA6TEByOA/ZMv5vJE+8CalqGJPG3RMGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4888 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 03/11] ethdev: fix docs of functions 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 7/23/2021 2:15 PM, Andrew Rybchenko wrote: > From: Ivan Ilchenko > > Document valid combinations of input arguments in accordance with > current implementation in ethdev. > > 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/rte_ethdev.h | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index d2b27c351f..28440c46d3 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -2873,12 +2873,15 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, > * The port identifier of the Ethernet device. > * @param xstats_names > * An rte_eth_xstat_name array of at least *size* elements to > - * be filled. If set to NULL, the function returns the required number > - * of elements. > + * be filled. Must not be NULL if @p ids are specified (not NULL). > * @param ids > - * IDs array given by app to retrieve specific statistics > + * IDs array given by app to retrieve specific statistics. May be NULL > + * to retrieve all available statistics. > * @param size > - * The size of the xstats_names array (number of elements). > + * If @p ids is not NULL, number of elements in the array with requested IDs > + * and number of elements in @p xstats_names to put names in. If @p ids is > + * NULL, number of elements in @p xstats_names to put all available statistics > + * names in. > * @return > * - A positive value lower or equal to size: success. The return value > * is the number of entries filled in the stats table. > @@ -2886,7 +2889,7 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, > * is too small. The return value corresponds to the size that should > * be given to succeed. The entries in the table are not valid and > * shall not be used by the caller. > - * - A negative value on error (invalid port id). > + * - A negative value on error. > */ > int > rte_eth_xstats_get_names_by_id(uint16_t port_id, > @@ -2900,13 +2903,15 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id, > * The port identifier of the Ethernet device. > * @param ids > * A pointer to an ids array passed by application. This tells which > - * statistics values function should retrieve. This parameter > - * can be set to NULL if size is 0. In this case function will retrieve > + * statistics values function should retrieve. May be NULL to retrieve > * all available statistics. 'ids' parameter in 'rte_eth_xstats_get_names_by_id()' & 'rte_eth_xstats_get_by_id()' are exactly same thing, and description is same but wording is different. Do you think does it make sense to use exact same wording, to clarify that there is no difference in this parameter within APIs? > * @param values > * A pointer to a table to be filled with device statistics values. > + * Must not be NULL if ids are specified (not NULL). Similar comment on this one, two different API get 'name' and 'value' part of key-value pair. The description between APIs can be almost same. > * @param size > - * The size of the ids array (number of elements). > + * If @p ids is not NULL, number of elements in the array with requested IDs > + * and number of elements in values to put statistics in. If @p ids is NULL, > + * number of elements in values to put all available statistics in. And same comment again on using exact same comment on two APIs. > * @return > * - A positive value lower or equal to size: success. The return value > * is the number of entries filled in the stats table. > @@ -2914,7 +2919,7 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id, > * is too small. The return value corresponds to the size that should > * be given to succeed. The entries in the table are not valid and > * shall not be used by the caller. > - * - A negative value on error (invalid port id). > + * - A negative value on error. > */ > int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, > uint64_t *values, unsigned int size); >