From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680049.outbound.protection.outlook.com [40.107.68.49]) by dpdk.org (Postfix) with ESMTP id 1CE6C1B1FB; Tue, 10 Jul 2018 08:20:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5hIAzI/1WeTKRkVeVfv9lc8TphC6o0x8SwF/en265ps=; b=gyvcZOM1k97x7B4e+NzD8J0qHjwDvf0+c0gK1Io0RfmKYsWNuKkYFKlNZhyKSLMC0SvfFyEMekwWdsUgc9IRKSxexjUJPXPbvTn86miHHoFjih9yQPOP49gOg9yFBkoctqwGZlNWEN6WbjG7c4oStRdyAsHOrmR4+lgpEfQtu04= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (223.186.177.226) by BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Tue, 10 Jul 2018 06:20:48 +0000 Date: Tue, 10 Jul 2018 11:50:31 +0530 From: Jerin Jacob To: Ferruh Yigit Cc: Andrew Rybchenko , dev@dpdk.org, thomas@monjalon.net, stable@dpdk.org Message-ID: <20180710062023.GA2600@jerin> References: <20180629094443.26540-1-jerin.jacob@caviumnetworks.com> <22d74419-6842-044c-9c61-7855925bf41b@intel.com> <47d3c4aa-04f7-110b-f889-cfb07fecdfca@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [223.186.177.226] X-ClientProxiedBy: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::29) To BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38395b00-679a-4e6e-8ea5-08d5e62d4990 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2516; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 3:uqmAQmZeL7lwjomHoYsoehUPzRb5OXOEla2AGslNy6eUSE69d2zTAKvEXecYD2dbyxhJCawIJp+zJmjbJbFVfz/NYA3TnDDU//CeGM72I8/NuuWt3BQs0gyjrgdLFyQkGoiImPvvfGqaoFSxB/kVcyTQcps+dDLM5/kPhOcLqrPqGZ8nrN4Aq3wUZPCjhU8G6FpxeKS5mUFh4xaZcoAN2gwsUiEVxwUCSyxcginaxyl1FG8qethncu4X3NoAYgLY; 25:9nHRIm973aRI1uSglYwvy4zwGGKUZE4Pn+I9/dxba9betKJtjwAEZCbNChgLjftEYiFxWsNbnGS9v4rEEXt5W6k35cKqGumEpulVKE/JcI/ERKRr6wB4slbJ9mp3glP3Hxosn8ELqxzaZ4IT89r5FUu5yi3yK4AAWX5GRJOTKSM/MzPsb1XoAgDo2s9HqSeMUvQf3sVfGACtIz3015sBH4/yrGpUSy2+TyTiaJ5974SWBF6lU3VvnkoDuzrtrW7zGwPeAysxkYIeeRby7VJ5ISRY5aZmGA6pn6Rv0iMtEKA5tdqBXBoFQA/n0RNgq/NIgkDVMVOnH3mQP2IgqE7j0A==; 31:QTzNefgo1XAAUEJSLKX1CEfJHntpIA9nrQCpjbjViMFFC9mNVRGCKlfePLHnAy41kRtkvjRpz821xdDhq/nGIbrKvPKUhU9hwKg3aTHlJwKYdu6QfjKtmk+ZaD0ln8EtvpA5cG7TCYc4AisofYSLfcDbQ/5aZf1r5xPfv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15 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(93006095)(10201501046)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2516; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2516; X-Forefront-PRVS: 0729050452 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(376002)(366004)(39860400002)(136003)(396003)(346002)(199004)(189003)(13464003)(66066001)(956004)(476003)(44832011)(486006)(305945005)(478600001)(6916009)(446003)(14444005)(11346002)(6666003)(106356001)(105586002)(316002)(33656002)(6246003)(16586007)(25786009)(50466002)(53936002)(93886005)(4326008)(72206003)(2906002)(7736002)(229853002)(47776003)(8936002)(6496006)(81156014)(42882007)(52116002)(81166006)(97736004)(1076002)(23726003)(26005)(186003)(9686003)(386003)(16526019)(3846002)(76176011)(33896004)(6116002)(33716001)(5660300001)(58126008)(68736007)(53546011)(8676002)(55016002)(18370500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2516; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2516; 23:5PfnLMQLwN+kjQf/ORBIe6yrWyUdrFJGkLxrx4/Az?= =?us-ascii?Q?v3/7n3DFE4DlVTTI4KodzKt8yNYBcZu00WKsGcpm9agCxnY1PEXFxUAuBe5H?= =?us-ascii?Q?E+2HC3JsPW+/Oh5xYhUlvrAh0GmuC5cNhcGT2bq7StlU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A8Wf/4cdzOwfrZJOOjAkrH9VAmOIqfs7NhWb?= =?us-ascii?Q?6jXFqdFFJqnPE1tTYucAurE/1ZVe9Xkf54i6WVJfWtJm1aV4q6drBdirI3dL?= =?us-ascii?Q?1TezvD6gbk3gKnbZNmUWPG94sfzutnonaw93koZyqnL22AsTZdl5IbUA/o0E?= =?us-ascii?Q?ls44OLeHMIQCx4Hd6Ppt+XPDebyGBxSDGzsts1IhLfSRqfSLErD1eKjKkdj8?= =?us-ascii?Q?RfqnuFlig1ZQumrKFNwmCy20PvGUvNfb9clyCTJ94xoqNGExX2LmF2u832kg?= =?us-ascii?Q?ATrBosdbYRnqYzXYd2/pMRHsYBepReH8YV2R/qcneWpfqmuNkVX6+xNymeDU?= =?us-ascii?Q?ZcLD9dOJtoaKrUuAvwzyanauEdIYpMGskeFUOSBsyEYWGaW0sdATWImPZwW5?= =?us-ascii?Q?MoKnF1qIMDN01JMxJHn4XsyrRSKYjtj4uC8qHn60ahI2S1/OF3GLa0f5sGCE?= =?us-ascii?Q?42kUc/VppJCtA=3D=3D?= X-Microsoft-Antispam-Message-Info: 8G4tMRdnvRch+NX/S75Tu48ARKtt6bkOh2z624S1eI6NJZAJ6bOzgDlu1pK6iEsYtDXGGoSTzvECTHm647RIxHtUlL/57usHsQsJyACJdivjz+YznG8p1mCoDOzM7CL9RInwkmwuTm2SWp6qrLHrU5KSdduvMhJgh43EudBT+02fTrEuyGhHU90A9US7hqvy8NYg8SldKy83MJh4D3P9MqDqSuN/ZIVadmZdHhLGj7isNb/uBlLtYBVD0Po9LRrNLvB/5C/QY38U/EqhXB4BDjrGkfx+KEmbuDJD3B9ica5pwsxh/SVkY37hkpBR9GxbA8WaZgFi28kEWk73uSa7+osetnPWCr6t78PIZ8CQN3Y= X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 6:I0X8evZfFbXIIjV98lO8+PLymPGb51EAATOOIwehB9aERu5P/im2HRk9posMxhYjEyGIiwHgKlXyfb/hez4+SeuOaDkaXP/daEO1Sd6DWQmmPGqyyP+Yj3BoIzB1Ssr7unc/wFNsfeOeJL/xoUdM9oInHk2MCvD/sblXCzLsoaTcEocwDPGLour8qrI8RR5PTorQD3nOeVQJMe6OqpGyiEGsYYEQoY9jcpzIiSFdkG6d9+53r3KaHZHchwJqVtQDjdlSmH3DOoFcBrol7U4u17NWxzBMF1rLhBvoPdS5gIH2EZ9apj+ghkWZmomb0ipAgfemy4vGuUNwy/OQWyf6l3s813fEPHqfTtB7jFwrtwjLVxNz5/+vIVgub9PGL3MI7aa4mHuSDowqYN2UVctHRK4WwjgmNfWJ8xKYu1ufTIc1vVkJ2in+j6cDFir/zKbzr1hgV1f5vmZAT3lQADv/QQ==; 5:MeP9EBibxO7bZPttwJRMA7kw0sCklMlptE+mHTzAmZ25Yn1iygwHr/lposepQmdcAn7AGIuMZj3iFkDeln1rylmdvUNVSuz+2CaYzeZzsNzlCnhZqg/GtfmB9b2BmtvLwfgRMcWCevVBdqtVfxxeXpEtkRHfqkELMm9izAmaZ+s=; 24:SMm7+HVWVH9xUQojacC1tMbLtWAy+azcaNzwLdYO5SUAt+NxjzTVtozMAh+cxvdqClyDMjQR7JpyqAmmixu8cr6gXxqwOPSNcJ0o7PsTb/I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 7:c1qGdwMVAR2ny4uH97cnecmBx8UTcutbhqJtrf0D3wsqAfJ4MAZrIItGLd7LLTFLg497SUWXt5MzIrQwfJ2URge4owRGRilCJB2S932jLIyhZLYt4KgYkDgoQ99jJS4fugEFoS4NA6hIULtu8pI8dMFOLr4UvlBxjot8bZW+vNj3s3uAT7n7QtIIFk/hCQitSsbIe6v3tKdovDQAjCkSViASwSr1xnZAWVSLWOO/kaRd0YjxbdmV1nYqxjzr3qeH X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2018 06:20:48.9700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38395b00-679a-4e6e-8ea5-08d5e62d4990 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2516 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix queue mapping documentation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2018 06:20:55 -0000 -----Original Message----- > Date: Mon, 2 Jul 2018 16:45:33 +0100 > From: Ferruh Yigit > To: Andrew Rybchenko , Jerin Jacob > , dev@dpdk.org > CC: thomas@monjalon.net, stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ethdev: fix queue mapping documentation > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.8.0 > > > On 7/2/2018 4:32 PM, Andrew Rybchenko wrote: > > On 07/02/2018 06:08 PM, Ferruh Yigit wrote: > >> On 6/29/2018 10:44 AM, Jerin Jacob wrote: > >>> The RTE_MAX_ETHPORT_QUEUE_STATS_MAPS does not exists, change > >>> to the correct definition(RTE_ETHDEV_QUEUE_STAT_CNTRS) > >>> > >>> Fixes: 5de201df8927 ("ethdev: add stats per queue") > >>> Cc: stable@dpdk.org > >>> > >>> Signed-off-by: Jerin Jacob > >>> --- > >>> lib/librte_ethdev/rte_ethdev.h | 4 ++-- > >>> 1 file changed, 2 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > >>> index 36e3984ea..375ea24ce 100644 > >>> --- a/lib/librte_ethdev/rte_ethdev.h > >>> +++ b/lib/librte_ethdev/rte_ethdev.h > >>> @@ -2144,7 +2144,7 @@ void rte_eth_xstats_reset(uint16_t port_id); > >>> * @param stat_idx > >>> * The per-queue packet statistics functionality number that the transmit > >>> * queue is to be assigned. > >>> - * The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1]. > >>> + * The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1]. > >> Yes RTE_MAX_ETHPORT_QUEUE_STATS_MAPS doesn't exits and comment is wrong, but > >> RTE_ETHDEV_QUEUE_STAT_CNTRS also slightly not correct. > >> > >> I think how testpmd uses it increase the confusion. > >> > >> In ixgbe there is no stats registers per queue, 128 queues are represented by 16 > >> register set. stat_idx here is the index of that 16 registers. You map queue to > >> stats requester to get queue stats. > >> > >> Also there is RTE_ETHDEV_QUEUE_STAT_CNTRS config in the ethdev API, which is the > >> hardcoded size of the queue stats, its default value is 16. This limits number > >> of the queues we can get stats from but saves allocated space. (Why not dynamic?) > >> > >> You can increase the RTE_ETHDEV_QUEUE_STAT_CNTRS to the max supported number of > >> queue and ethdev code will be all valid. But "stat_idx" can't go beyond 16 (for > >> ixgbe) because it is hardware limitation and it may change from hw to hw. > >> > >> Also technically it should be possible to reduce RTE_ETHDEV_QUEUE_STAT_CNTRS to > >> a low number, like 2, but in ixgbe map two queues into stat registers 14 & 15 > >> and display those two set as queue stat 0 and 1. It seems current implementation > >> prevents this and forces the queues mapped should be less than > >> RTE_ETHDEV_QUEUE_STAT_CNTRS. Overall it seems there is a mixed used of > >> RTE_ETHDEV_QUEUE_STAT_CNTRS and stats queue index values, I assume because both > >> are same values. > >> > >> I suggest updating it as: > >> " > >> The value must be in the range: > >> [0 - MIN(HW Stat Registers Size, RTE_ETHDEV_QUEUE_STAT_CNTRS) - 1] > >> " > > > > Technically I think it is not a problem to specify more than HW supports. > > The function should simply return error. RTE_ETHDEV_QUEUE_STAT_CNTRS is > > a hard limit which should be checked by ethdev. > > The reasonable next question is how to find out what is the maximum for PMD/HW. > > I think it deserves entry in dev_info. May be not now. > > Yes there is not a way to find out that limit by application, setting > RTE_ETHDEV_QUEUE_STAT_CNTRS to 16 and using it as limit solving the issue for now :) If I understand it correctly, in the documentation, we are specify the limits to avoid the segfault etc and if the specific PMD does not support the range up to RTE_ETHDEV_QUEUE_STAT_CNTRS, It can simply return error which makes the documentation semantically correct. Considering the above point, I think this patch is correct considering there is no way currently to detect the limit supported by PMD. So, 1) Should we keep the patch as is? -- The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1]. -- OR 2) Change to -- The value must be in the range: [0 - MIN(Device max per Tx queue stats, RTE_ETHDEV_QUEUE_STAT_CNTRS) - 1] -- I prefer option 1. But I am okay send v2 if any ethdev maintainers prefer option 2. Let me know.