From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0055.outbound.protection.outlook.com [104.47.32.55]) by dpdk.org (Postfix) with ESMTP id B2270917F for ; Wed, 23 Aug 2017 16:03:33 +0200 (CEST) Received: from MWHPR03CA0014.namprd03.prod.outlook.com (10.175.133.152) by DM5PR03MB3322.namprd03.prod.outlook.com (10.174.241.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18; Wed, 23 Aug 2017 14:03:32 +0000 Received: from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::135) by MWHPR03CA0014.outlook.office365.com (2603:10b6:300:117::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18 via Frontend Transport; Wed, 23 Aug 2017 14:03:32 +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 BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15 via Frontend Transport; Wed, 23 Aug 2017 14:03:31 +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 v7NE2Q3J004389; Wed, 23 Aug 2017 07:03:29 -0700 From: Shreyansh Jain To: CC: , Date: Wed, 23 Aug 2017 19:42:06 +0530 Message-ID: <20170823141213.25476-34-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170823141213.25476-1-shreyansh.jain@nxp.com> References: <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> <20170823141213.25476-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131479706116707605; (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)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(356003)(5660300001)(8676002)(50986999)(54906002)(76176999)(8656003)(104016004)(36756003)(48376002)(50466002)(53936002)(305945005)(2950100002)(189998001)(6666003)(77096006)(6916009)(81156014)(50226002)(68736007)(498600001)(106466001)(2906002)(33646002)(85426001)(105606002)(47776003)(1076002)(2351001)(81166006)(86362001)(626005)(8936002)(97736004)(4326008)(5003940100001)(110136004)(575784001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3322; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD046; 1:rmjDbf2G3/OCewN2VrRImG/l1uKm3YiBxIHW2QISyu8wDJGjC5oCg0MDYRhaYeipqcycFdm9BfuqvtaUF605Exts+BkSmFTbHxmMy05sZU7eNlEaL/8Km+8AKENBRVYY MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 806e4a1a-b9be-4888-f3b6-08d4ea2fbcb6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB3322; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB3322; 3: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8XhAQ7EvtcaakfsMYs0G4B7aYDb5n1yvtNlQIhbrkhI6uiA2CzNuj4nxJGArVdGN63qQaDQRTUHbqAtJIshOA0vybjh8FHD+TkPSUBgnqlI/IYdDXXlUY1kzD2Ati7wsnYhn+/fM8mXp/LNlBLsYQH9vSZkwSO+rFIn5KscaUBLmF7OquCTXWS/7nSG/kfkhv/WwovNOQ8IY5YfIkjr74SKXrO89+ffJRbussVkgkyxQdPlFSoLYCk= 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)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123561025)(20161123559100)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB3322; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB3322; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB3322; 23:s8UGt6d4Yo9qmszWptABFvdVaff1/Kfbg7kOl3lvY?= =?us-ascii?Q?/Vd/UNIEktPr3X+D0LHzsNaexz71TEdZe0hpgOZYUaNbIRskcWD8tYD+HFzH?= =?us-ascii?Q?Zfq7iZMZfocEZKghzWio6Ai8c7+Pq87AAFQi6nwRbENA446m3bkxUHFcKElH?= =?us-ascii?Q?WZqC4orBSC8khgGZGDlgg3fvL8F8gVgDcfkYrvMtb9pVRG37/H3vDhAoEF0H?= =?us-ascii?Q?SCsvD6p9J6RfMpgUKwEqPNHhNSXFMz/6pWA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ime: 23 Aug 2017 14:03:31.3431 (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: DM5PR03MB3322 Subject: [dpdk-dev] [PATCH v3 33/40] 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: Wed, 23 Aug 2017 14:03:34 -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 d7b0e16..062f23e 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) { @@ -374,6 +392,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