From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0067.outbound.protection.outlook.com [104.47.40.67]) by dpdk.org (Postfix) with ESMTP id 28AA26D45 for ; Sat, 9 Sep 2017 13:11:37 +0200 (CEST) Received: from MWHPR03CA0040.namprd03.prod.outlook.com (2603:10b6:301:3b::29) by MWHSPR01MB180.namprd03.prod.outlook.com (2603:10b6:301:7b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Sat, 9 Sep 2017 11:11:36 +0000 Received: from BL2FFO11FD024.protection.gbl (2a01:111:f400:7c09::130) by MWHPR03CA0040.outlook.office365.com (2603:10b6:301:3b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Sat, 9 Sep 2017 11:11:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Sat, 9 Sep 2017 11:11:33 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v89BAUhX026326; Sat, 9 Sep 2017 04:11:31 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:24 +0530 Message-ID: <20170909112132.13936-34-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170909112132.13936-1-shreyansh.jain@nxp.com> References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131494290953166526; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(50466002)(2906002)(1076002)(8676002)(68736007)(47776003)(81156014)(85426001)(81166006)(54906002)(77096006)(8936002)(2950100002)(6916009)(48376002)(6666003)(4326008)(97736004)(50226002)(36756003)(76176999)(5660300001)(5003940100001)(50986999)(86362001)(104016004)(8656003)(110136004)(305945005)(498600001)(356003)(53936002)(2351001)(105606002)(189998001)(106466001)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHSPR01MB180; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD024; 1:a2IhGdaoCsTYkKN3qv9B4u8LekkEWOGz1m75BPZKfUOKiCDgStvjiVp0eg8tYUKPgpxKmiaamXM6r6T9BkgbRcrqgkdbXHZ2RHywjXLd+68Og/dYhatlyQInLuXZMC1M MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e231494-24fd-4b79-f255-08d4f77388a2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHSPR01MB180; X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 3:f9483vnXe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gYkNhM/mpW7LRfd6R+qfn9Fkr+xkPS61Jind3qp9MCzajuPG/YkKYz62jsm4QB9emQR0W91eCij2oQA9GFnZecIp3cAaIfLym8PfI8FVhIPHbiKl57Ep/enX4PXgV5uld6eicnz3aHprKq65Lcj2cfLjvXjm370+ycQq0NkT+NGbWeKMtAvVXSfThFP1xTluJcdlWTERqXfLBDQhJ/9ldWKs+AVc84zk= 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)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123561025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHSPR01MB180; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHSPR01MB180; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHSPR01MB180; 23:cAbvQJIkbPb10e2aae9oiRrxwaJbEZmAholy0myjw?= =?us-ascii?Q?yAxIgpxDiFiQoNWh1D2odEXZxM6B4KxL3wKOn8UaBa1fOQ008NqGKAxGleBK?= =?us-ascii?Q?7GlUrEO+SMlnT4PAGp+BSd8+kwhK5kBSp8rorDRjWM6VGfcKk7avgG/QXI/N?= =?us-ascii?Q?anXsud5eQa3oYaDrg0iPUfWdzOfVwOAfsauMH2PgjMeVxuDLH5lt3Fp/Xk9+?= =?us-ascii?Q?BwCV3h0A0cp63SNRA0sInT0yubqTaRD3RWjMuxhy38KkBSqTHawRCXKoUA8P?= =?us-ascii?Q?Gz+RVBjBvHYprbDbfn8b7ycnz2VcOTsYimH35kTamYDTvJ7RGZUmrd97N5fJ?= =?us-ascii?Q?pi3409iwAsoQMbNYq8SC8tbOUEM1MqY97QGxAMLbf7xhpFIPuLKQMwV76Ysk?= =?us-ascii?Q?I2uYy8/4L8EsUwcCMn5JOEpOFj1ecQjuEdp0JOV6yiQ2X7e+lxl0Dxq3GfG2?= =?us-ascii?Q?uVNFd5JYSO8icEo9EsbmlFL1fola8RaCZLl0cpoaPur1z7re79bYFd26c+We?= =?us-ascii?Q?cipK1UT0wsr44EzrKegerFF6Np5Y84TbON8X2U8J/N6EriQXWAGzLcpo+lsS?= =?us-ascii?Q?CeDP+P8r6xNjSy4pJAtm/MiGCWx1jKx9rdIdUHZhwTC1LmWbGJjDPVykrh8x?= =?us-ascii?Q?61/C44dJBqVuaieihTvwfWzdI10DQNKf35UNqt+no/EQi0LO4HySgAGlxyaV?= =?us-ascii?Q?b/hoebaEx3GdcgaJf92gWTptK9W2AAPL4J/1/uXdNaCu445tP2D5iAgdyhhr?= =?us-ascii?Q?JC8VUZkeqCEPT3Ws77hZJVZEQ42J3o9i4qpdkf74PnfG+6/56SX1wlpMuJ//?= =?us-ascii?Q?ZggZN1IcUpDWdzW/DFPReH7ioruvGHaQUCPRvyOe4aTon75s0IF4iAgeqMqz?= =?us-ascii?Q?uzkoApxVRTJ1HZVkEZ4mLAbumFguMc//hSs/OW+12U2Kv4ItM2PKHWubLfNy?= =?us-ascii?Q?+7PI6uM+q6BLsVkpgydnv8RgFslCa8vXWAGzfeNI8utGffdD6IRCRwpH0KmX?= =?us-ascii?Q?LkOLC/JuE72VL5OKpeOkPLBfK5rWeKkbKbemQ9Xvknif2hysiz7S6Zs3TVgr?= =?us-ascii?Q?tvB+nKhLyuJYjBm2iYU/Ij3hvp3Yx/UGKtUxKhjYmSGTZOVhcIiWoBOAj3Hq?= =?us-ascii?Q?avobgnn9yQGSreVCDJLBX69uVg5T1J2?= X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 6:e+wgHs/xpXnw5ToRsX6SWkgj6Rmt8/Ya+GaXzZYL4fZ9UUo0qDYc3VXNH6dCDglWn7IIs+GRdpwKyvPPHal0r7+Q1zoBc49+J3fwjkwnVEl2zTXgEDLwBZw3f4PkLs67mb7QWW9nUTIT5Hrqw97WfmY+lEYTXvXj1lwiB212ge6BOMPzg71RCbdaMBA9XBSicPY0gi4UKN7G7fs0NJpdThOzZ8OhuL/vHiTLII3g3jGHSSu4aMajKRFKq0XCVhurUM/aKZA7ZSCNlKg5OEcSuFnCkXfj0fqiHzPWs6Z4ADFML9qoIyU5KQ1KmBICpHCnBe7g3SWLfnHzYXY9eTZp4Q==; 5:fNnp1IimNFgMSJSbyQhyX4KHn8sATj/ev1JKYTUh0579KOQC54RpKZNm4S++p87kBVUHyda+FVWyZ40hoJSA7FPs4mHyhcu3xmRs9FOI7VL3r8eAZdaeaivz+lU/YZqwql0r4EAOGLYyLemQ2BersA==; 24:C06Ec1ckCrL2afO0jlz64QxyrC6WKB1Tl4SJicwDbDuZhmdmDoIzKjrAwVRDOzbEZ5K/fon7YJAfKpMjwLi26F/hpPkwSEfVFbLOzO6BBYM=; 7:o7vUDz6oBBRgEq2HO1lGaC4tYp9s2QXjNJEa0uguWGsydPBr9BckBlME/OUvYZPuhkPo93V+/iMqpBxdws5fJjQ0pQgtpGn2pwkF3ayEZZCGvJOOaz8cKBaSUenRAi+WXORJrtmZhIkijwZSZd1ko76br3nOvssGYLPpoYh4mf1oMMEfxAk8wR+Ub4pLuohGpBiDvrqAtwgvFJ9TAiCbCG0+Iv8js4Fq6+XI8UYIe/k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:33.9906 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR01MB180 Subject: [dpdk-dev] [PATCH v4 33/41] net/dpaa: add support for basic stats 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: Sat, 09 Sep 2017 11:11:39 -0000 Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- doc/guides/nics/features/dpaa.ini | 1 + drivers/net/dpaa/dpaa_ethdev.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index cdf5e46..c09efd8 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -11,5 +11,6 @@ MTU update = Y Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y +Basic stats = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 437943e..178508e 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -183,6 +183,24 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev, return 0; } +static void dpaa_eth_stats_get(struct rte_eth_dev *dev, + struct rte_eth_stats *stats) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + fman_if_stats_get(dpaa_intf->fif, stats); +} + +static void dpaa_eth_stats_reset(struct rte_eth_dev *dev) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + fman_if_stats_reset(dpaa_intf->fif); +} static void dpaa_eth_promiscuous_enable(struct rte_eth_dev *dev) { @@ -367,6 +385,8 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_release = dpaa_eth_tx_queue_release, .link_update = dpaa_eth_link_update, + .stats_get = dpaa_eth_stats_get, + .stats_reset = dpaa_eth_stats_reset, .promiscuous_enable = dpaa_eth_promiscuous_enable, .promiscuous_disable = dpaa_eth_promiscuous_disable, .allmulticast_enable = dpaa_eth_multicast_enable, -- 2.9.3