From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0088.outbound.protection.outlook.com [104.47.32.88]) by dpdk.org (Postfix) with ESMTP id 41FE43195 for ; Thu, 28 Sep 2017 14:20:14 +0200 (CEST) Received: from CY4PR03CA0019.namprd03.prod.outlook.com (10.168.162.29) by CO2PR03MB2358.namprd03.prod.outlook.com (10.166.93.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 12:20:13 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:100) by CY4PR03CA0019.outlook.office365.com (2603:10b6:903:33::29) 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, 28 Sep 2017 12:20:10 +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 BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 12:20:09 +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 v8SCJ72P008785; Thu, 28 Sep 2017 05:20:07 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:59:52 +0530 Message-ID: <20170928123000.1711-33-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928123000.1711-1-shreyansh.jain@nxp.com> References: <20170928113344.12248-1-shreyansh.jain@nxp.com> <20170928123000.1711-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510748098936970; (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)(7966004)(346002)(376002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(8936002)(47776003)(189998001)(8676002)(16586007)(68736007)(8656003)(498600001)(2906002)(2950100002)(1076002)(33646002)(81156014)(2351001)(5660300001)(6916009)(4326008)(85426001)(316002)(50466002)(97736004)(54906003)(53936002)(81166006)(48376002)(50986999)(5003940100001)(76176999)(77096006)(106466001)(6666003)(86362001)(356003)(50226002)(305945005)(104016004)(36756003)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2358; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:HMBy39eLsLHO5KsUhq43CrDtCvEWWOz9kU26H2r+rPZhWp8/jWiF+rRbpGxMWs1/gsSGndsxzhk858RxfREti1R2qxcH491Mzzma4SKESBFyVw+SyMAyjZ4bYaTMWeU7 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de24ae2d-740b-4aeb-df2c-08d5066b4309 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CO2PR03MB2358; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 3:/R28HdIbDC+ANZMD8/I3ovI6IzxlifQrY/H+a03mCwtcT/SCAgWKZaswSF+4ZBu9LDByi0l3lIdYlH2E1wnMxC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7gZbO3ZM0nOQM8yot7hcfK8QpFmZyS5VZi85MvndN4cGVd8D29MAEhWsnZzKl/2E+4INUW8KIorqnIQggS5sSxpo5anj3wR7MYM9Q/DQr05C25NpnYwOlo+5Xsd3b5NiFrBJCmkM0GIdmZrflu+MHfX9tY= 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)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123565025)(20161123556025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2358; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2358; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2358; 23:mIPMgUTE6sMXRxsVQRXu7LtDIAqgx1uA+FVAvMeLd?= =?us-ascii?Q?Yi8xXLJRi3YSEzUNez0BGKfF3gnZCB0sqosE5Rd1LNU4uEQ/ZoZBITjszgFT?= =?us-ascii?Q?KmU//g78zfUc+eCRWqNw6tPOYgQ7KY05cRnXZfUHxCkXj11zrApsol2b5qnf?= =?us-ascii?Q?YIdFJ16testc5wlTXecUzQRiCbD/VDyEKRmm802QRhyeRLjg+/k4hUa8dJXF?= =?us-ascii?Q?DxVtLzN8r9FJBPDeZysMg1uOEOjAXFpVa9T9sjbSCH1gvxetHvSjacCgMJXv?= =?us-ascii?Q?QFZv1YqOw0G2MasT5N4QQMx7IddD4xbuDRhY+f6FjAbmGRwEm7m4Xbj20ped?= =?us-asc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29D4r6c?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 6:7XyUhvh6j0XlmAJKyKvXIHXfTb/ofNbJ0x0E+0vf+iC/STn0JOXevDs2R4hely2XkVZ1qtWCmUQ/CqMp2bq7xU64qP4qSfNT3xaRLadQxMQpa4CaBQ4wB3l64RJv9R9JP5cfpIOLnfaOUNPYYV34+48CgSRG7gabROIhBeI2U18Xr4tKPgbbUde8/6MS/WZAwp1C/fLlxapqH2g5s0BnCRoWGSPdffG4PUw2osZ7jIIHI/vnUgxcmbCgYisvzebIEVUvIa2kW+EtFl2Lv9kyHD5k3uT8JQpk+YSKGftKyHI3nl+Xzatszq6s9/64QbdjLOwdbor3/ETTWNWKs6fyuA==; 5:b1bEArWUfH+PopZs9siWFGq8OBVTbINucO9Z+u/NEAJ+gZvUyEKEjE7mrNEneJyZ529akXlzVPwBn2fkeIQocHPZV31RxY8j/e5L+I4Nj4+zZckI8fWytp2ixrCSaMk0k685dae7Y0w16pGDqXDkqA==; 24:sacIYsulzCnhVIMjcsfZFII2FNbuR+v0cS5XSE3D2zohI86AmEpUJa1a8FDYL7PkmRbWXg8rcnILJsHUXqZteypAMLECCDhROV1eqH5wIiA=; 7:IB7WlrJfDWBqNWpfXxIN3A2LAfwBwuYO67fW+NCrOF+fJKzNG8Dxf5A3u31pOCtMHA70ekj3G3gCuVjoWJ3FoJ3JZUaGLK3AwpB2HWjbQZYr1rVkxjcwoxvZXe9n5cxx4uQUMVuNow/R/5bmigkTqHgFc8KY0KIKpjCkTAXOYTi7szTDg1VErQyVqnB/s/4AM3/FC3is1uFKwK85JMzr3Ac3QG8bLa6KgnofIkeiU7g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 12:20:09.6908 (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: CO2PR03MB2358 Subject: [dpdk-dev] [PATCH v6 32/40] net/dpaa: support 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: Thu, 28 Sep 2017 12:20:14 -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 893e7f5..bcd6013 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