From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0048.outbound.protection.outlook.com [104.47.40.48]) by dpdk.org (Postfix) with ESMTP id 8D0C01B1BC for ; Thu, 21 Sep 2017 15:15:32 +0200 (CEST) Received: from BN6PR03CA0022.namprd03.prod.outlook.com (10.168.230.160) by CY1PR03MB2364.namprd03.prod.outlook.com (10.166.207.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Thu, 21 Sep 2017 13:15:31 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::115) by BN6PR03CA0022.outlook.office365.com (2603:10b6:404:23::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Thu, 21 Sep 2017 13:15:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Thu, 21 Sep 2017 13:15:30 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v8LDFQki014598; Thu, 21 Sep 2017 06:15:27 -0700 To: Ferruh Yigit CC: , References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170909112132.13936-42-shreyansh.jain@nxp.com> <3332a9da-5e28-260a-68fa-ab665f907403@intel.com> From: Shreyansh Jain Message-ID: <58ffe1c0-308a-f730-a6d1-9bcf8ddb3d57@nxp.com> Date: Thu, 21 Sep 2017 18:56:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <3332a9da-5e28-260a-68fa-ab665f907403@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131504733305355647; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(376002)(39860400002)(39380400002)(346002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(199003)(377454003)(189002)(24454002)(76176999)(69596002)(53936002)(53546010)(4326008)(316002)(23676002)(93886005)(2906002)(54906003)(31686004)(6916009)(498600001)(58126008)(2950100002)(97736004)(6666003)(6246003)(230700001)(5660300001)(104016004)(8656003)(83506001)(85426001)(8676002)(105606002)(64126003)(65826007)(65956001)(65806001)(50466002)(81156014)(47776003)(8936002)(106466001)(81166006)(229853002)(54356999)(305945005)(356003)(50986999)(68736007)(189998001)(36756003)(33646002)(31696002)(77096006)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2364; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:uZaVozSVpHSjSzCkaGYdwaJjxJbo1dLsilVDgPvy9kKR/a4tJxrTH6MVQmED09NehwB1HsRYKzAArz6TPWPF0mHBpiReGkcsztfE1Izy9P0Vejm9b2uLyoS4reqPYJPd X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1b13f18-4fd3-437b-b297-08d500f2d556 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR03MB2364; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2364; 3:hCunVFn305RRFXbp1yV21cT7TLm3jQVKev5cNFo9SrjsMFXk6+2hUdofp1fJsG1fGqQErBbSSRkhf6Iay/pOMzHEJlfgnTPRfyTfz5H37sHliYNTRfIvqvPRjl2FnpQMaQapwfyhn4NWt46nQCLluEeGZq2/GYEXqVKq8oDIXGCSwE+tz4YK5DiNZjNYmuQ8fKqbdBhmyRNqfN5v+tOiEPH0QilU38OIj5QW0lWtFTkCfaKR7fhoanDd6LwPx6VURQVB51bcmrV/QxJU7JBVHtSve4be7ZUDec6or7tg8wtwVjTQOKU2JnG/b0UKWliSngHYBK//Y99M1965EFoXEry7PUPMGQD4RyI0M6aV1vM=; 25:pnwj4XlZP5kr/KCQ36IXkzv1Z5NXCJhpZIuU3TxtMnev4gH9ilUFQYbWL+wnJzcOl08E/hiYOl70hoGOcP93zRe0ga2hrZc0h0dstbe/bFEuQ8i2Shr9c9laESjCYSCFMrC/ug5h7LCqx4NzeiSiSurWcTaIHKmXvAyP58xbpkhE8BveDg+iZRPibvvQfYqh/VZqMqjnbXMxXAN8DtbhmFM2tu/prm4tH1xq1v4mRSFgr6bAZKERSXJ35wTyhBWQtgqu/YeqO3kvh1yk58jO8qxmVnUHhLLt/wAMyY5Pv6kAC9eq8w7JjW4SUzAM5tnFOPkmgDqbDSL+FgnzKNep2A== X-MS-TrafficTypeDiagnostic: CY1PR03MB2364: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2364; 31:1347j49iYPEvZlQ/xldZSKfWhyMDUoF8YbiYFt5PVsKZ/Zh8GgZSlcKYj5dFP6fO5MDIZECpnO2YwADxb5JgEBDiGWdgUxTS/vXOypUWfkoJ1E16goqPU7MDQUzGzj13h3PRq0DpMre93pAuUGGPCqlkW8l4PG2xNkdeJnqRkbwyx6NS0Zwq3k+a69mwkJFu16jU5EgY2mQV0Bx4uxZmQjyiiqNa3wkEbXrZsi7W/+A=; 4:Y3DHYujEmfkbZO9SGcX8+30GGQNxTRZd9vJv8svbN/u8cQnbP679j5rCKC2aRZBOpHSN37UCzZaORKeQShJ4HaY0VICL1+3KOOUGciMxvDUKH3OiUbJUfsE323QDgkUpOQTp4vt4eOdJJvAl6UKZt3axAYWmKSFPK0aQl8bCurJDRFo6ry0vxx2iAEkIn98ER1Gc2FhkRmQ9/m8gT+vx+jyuO8lxRUssAxvCybj9Cw70hWUw/5aR3jmR/fHE8ws85yhiyPMw8bQagK+6DlB7oIZ42/qWbNg9P7UHKSZvrYQ= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123563025)(20161123556025)(20161123561025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2364; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR03MB2364; X-Forefront-PRVS: 04371797A5 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAzTUIyMzY0OzIzOjJXbmYvSWNBc0lzVkw1SnhxZWFScGNlenlV?= =?utf-8?B?aThzR2JkQmhKRGZQV0NlSmlJSTYrUE80ajhOUitYL3ZvTXV0aE1VTmN5SX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X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 13:15:30.1923 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2364 Subject: Re: [dpdk-dev] [PATCH v4 41/41] net/dpaa: support for extended statistics X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 13:15:33 -0000 On Monday 18 September 2017 08:27 PM, Ferruh Yigit wrote: > On 9/9/2017 12:21 PM, Shreyansh Jain wrote: >> From: Hemant Agrawal >> >> Signed-off-by: Hemant Agrawal > > <...> > >> +static int >> +dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, >> + unsigned int n) >> +{ >> + struct dpaa_if *dpaa_intf = dev->data->dev_private; >> + unsigned int i = 0, num = RTE_DIM(dpaa_xstats_strings); >> + uint64_t values[sizeof(struct dpaa_if_stats) / 8]; >> + >> + if (xstats == NULL) >> + return 0; > > This is a little not clear from API definition, but I guess when xstats > is NULL, it should return num of available stats, "num" for this case. I > guess there are PMDs implements both, can you please double check? Ok. I will check again. > >> + >> + if (n < num) >> + return num; >> + >> + fman_if_stats_get_all(dpaa_intf->fif, values, >> + sizeof(struct dpaa_if_stats) / 8); >> + >> + for (i = 0; i < num; i++) { >> + xstats[i].id = i; >> + xstats[i].value = values[dpaa_xstats_strings[i].offset / 8]; >> + } >> + return i; >> +} > > <...> >