From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0063.outbound.protection.outlook.com [104.47.33.63]) by dpdk.org (Postfix) with ESMTP id 0CC822BA9 for ; Thu, 28 Sep 2017 13:24:08 +0200 (CEST) Received: from BLUPR0301CA0035.namprd03.prod.outlook.com (10.162.113.173) by BN6PR03MB2689.namprd03.prod.outlook.com (10.173.144.8) 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 11:24:07 +0000 Received: from BL2FFO11FD053.protection.gbl (2a01:111:f400:7c09::109) by BLUPR0301CA0035.outlook.office365.com (2a01:111:e400:5259::45) 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 11:24:06 +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 BL2FFO11FD053.mail.protection.outlook.com (10.173.161.181) 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 11:24:07 +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 v8SBMpG8016035; Thu, 28 Sep 2017 04:24:04 -0700 From: Shreyansh Jain To: CC: , Date: Thu, 28 Sep 2017 17:03:36 +0530 Message-ID: <20170928113344.12248-33-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170928113344.12248-1-shreyansh.jain@nxp.com> References: <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170928113344.12248-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131510714471936482; (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)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(1076002)(104016004)(33646002)(50986999)(498600001)(76176999)(356003)(50226002)(81156014)(8936002)(81166006)(4326008)(2906002)(8676002)(53936002)(305945005)(316002)(36756003)(97736004)(5660300001)(189998001)(54906003)(5003940100001)(575784001)(86362001)(47776003)(48376002)(50466002)(2950100002)(6916009)(85426001)(77096006)(8656003)(16586007)(6666003)(106466001)(2351001)(105606002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2689; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD053; 1:8coMeNwNQ5zmNSk7XLco+KD0REWCI9BLyCEeRNezVjLaMMFRsNeKL4Nru/lHemfdjqP2ZLSX4NIeSNdLDaO5vpOAVeUUMVsww9CcRYmkxh93f/0jqODlly2vE/x76bJt MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0a16118-4397-428d-f1e2-08d506636eb8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BN6PR03MB2689; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 3:2SmCnWmh2+78LR8p0Y412Yh8uX6wPh+w6lQ75NxUmlnK+fnz6j/8u/kglsgcX5neY4h0A95MJCVbZK6y4zKxZTv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mmM6SAkCJLgpf2CeftdMjNasvHq2uoEEhKYDc08WNBVQusLnPh6MM0LlqF6Y8ObtLS7IzYjSNY3Ja/0h+nMJR/IbMqceJlEbjDk2RdSHiii2An85iac/ZI95650HFcskAKFTlrlFVhwuHCOfc= 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)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123556025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2689; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2689; X-Forefront-PRVS: 0444EB1997 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2689; 23:jz7iDoXx655i0ayrKpjbujmWGHDNL9b5OD71iUwvV?= =?us-ascii?Q?GYpvYbCSBb4aMl+Lb4NYxRZ3nB/LIqGlTUiXQ/h8yq59js+Wd7QYa4f3ei6+?= =?us-ascii?Q?QvJ3DTfnLAJvIrk53N5ZvK/g+hTzsLXP/klXrYP+anoOitaRCUWar8FwpN3J?= =?us-ascii?Q?wsT/kz5BFsDNeu/Yply/BUDp3SvP3M9VFScGhPbeLdF3pStNtOdLqTlTJjcH?= =?us-ascii?Q?rwQutmcFoH343A6YxI9xUERexRzm+mVrZLZotU7f5efpvvQMKzGwgoTOg+Eh?= =?us-ascii?Q?RnpH1qWsIkDXs2YyOaMAZ3TmGxdCjhH9+YFRakwv+2pK8tUR65gXhxyZK51M?= =?us-ascii?Q?9MZidf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-Diagnostics: 1; BN6PR03MB2689; 6:R2YmHSntk/hLH7AHLf0twAxElx22EZ3yhDlmq1IIJnZCvCLms2WUImJG+VaFi9XF7A5YSUmAmXd163uYAQrzueCGF+Wu1DxcabwiYmfayIORs3lSV2xclaskXDAOcPJW6dP50XmuzCnZaeGSZQiUS3B8fHBHfJYrbhcO8xHUj2SxDo8LucpqdqpJMAsxj2u4ADDqOyaBlB3TpHZ42k5xqwKLpoIFCanccBaTORaCWl1P3MLU5/p2hUK1X6Ne4fvBymL7Fw4QqLeiEy86QwuwiR2fhmUM6/I4X5oQhXl2Hk37KEIZxt3lpDgfUVyBwQ7s/ILRCfCyP1kVKcvY8Lf3JQ==; 5:Q+VrjyjZB6SlB4bPCPilhzlauJICIynrXSols670Q8uBzr9Zf8pg/1GEw6f68F6EdPC/6xdb7i+SKUz+XWJIo82+toN48WaklsOqvpcv3/Se0uD2rR6C3Cscc4G0PT7/DukD8UhIAWyL7WklXII8WA==; 24:3fAAu3qVIViNYtT+3Ptis7mg/PggCqcgF/auyRMKzb6c+HE+75J0J59Lh8X9ZEoLTtTKN1CupHExeX5acLSw5iDGxh2+KvJ4YB35lQrfdRE=; 7:BdDLI3jPqRFZyi65A4BXAp6fEWSw+avXkxF2O5WmBb6IIxsiV8vxrrMvvMCkn9grX/OZqMF+22ke/p5T5pbqefKo6Q+Jz11NgDdfUE+MlTA45ypOigmt1wjQKgi057a4AQsaikV3kgF5WJIL9LSvblNpeT7lYk3O5M23SNK9g6WK5EcpvdSpgKmEcNDU7IZ4YxmgcGtrdiHV6vhBJdZFNpJf394sZ8/4rUuPdSDhrmU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 11:24:07.0376 (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: BN6PR03MB2689 Subject: [dpdk-dev] [PATCH v5 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 11:24:08 -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 f1d0f75..23a9efd 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