From patchwork Fri Sep 8 08:45:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 112046 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp1248418ybm; Fri, 8 Sep 2017 01:51:30 -0700 (PDT) X-Google-Smtp-Source: ADKCNb43t2YBYrWl/LwPrREqti9xkoDzz2JoEhq7mGNWi6bUP/6BuJJXnZGIHfmghiSyUF19yltT X-Received: by 10.223.198.134 with SMTP id j6mr1300520wrg.277.1504860690313; Fri, 08 Sep 2017 01:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504860690; cv=none; d=google.com; s=arc-20160816; b=ISAJm2M4EBkgZd9qLtUxHrNtFmFqfbH0GfszCp7121lg5NfPUq52UOrsdxLiCHnM36 b6TUoSIXB0+sfXQE/HCeMn8Mzpw7WVUEqEURJg2IL3/TFlaFPHUwcu53A0UpTAyNfCQq d4A7BfulwiAWpFJKI1LqyeS1mV/SkP9erW3A7LXCuUKsBDd8XlWhn8Ar0ohq2LdYyq7d XGa59Ehhgm1v2GHxCifQml04ib8iSIJVQr6Z3MMUyBebuI17ECOZvvvdNsKAC3e3W2xe RjRfrXkZmWZxJ7ickdAzEjlnIbVBFWqNuj7zLN28zd4TaBMP1snVfGuKHijUiNd/dEb4 zCng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=qbIR7g1ccVoPqdt9sZJ8KDPhM0NtCbS9szpMXPAzNvk=; b=drti0kr4IipG5id0MXnbjMI6+VpmvKFE2czI8dTq+iPNdWD4jVkj3YyzuL/3s3Qhvb ze2+FSmzWCQsBwAPQMBWdC2Tqg7ihpfUd/JwYCa1xz6MsOuM5X20weAUi6etqZLJyvxx 2Ig/Q3YlakQcXeCD1ohWjWtJh+hJjyDItmoYVP/O2Zkm+fEJWvFzb5XssH72izIQ8lm6 BHN3NdaXZuir8C/hvUQ1grxM6aK9zp7KKHB0sb6I7ogQyfQbrGH2wPoUc4aYCocQJByR JzhefU9ApBxPKLxwLzIimJowwbyHtf29mT1Xd91RAFHFhRT6GfHZziw91XYPbW5I7O0p NBjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org ([2001:4b98:dc0:41:216:3eff:fe72:dd13]) by mx.google.com with ESMTP id j34si1089040wre.302.2017.09.08.01.51.30; Fri, 08 Sep 2017 01:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 as permitted sender) client-ip=2001:4b98:dc0:41:216:3eff:fe72:dd13; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 2001:4b98:dc0:41:216:3eff:fe72:dd13 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8674A19A5C; Fri, 8 Sep 2017 10:46:40 +0200 (CEST) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0081.outbound.protection.outlook.com [104.47.34.81]) by dpdk.org (Postfix) with ESMTP id 280CE19A3B for ; Fri, 8 Sep 2017 10:46:38 +0200 (CEST) Received: from BN6PR03CA0068.namprd03.prod.outlook.com (10.173.137.30) by CY1PR03MB2265.namprd03.prod.outlook.com (10.166.207.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 8 Sep 2017 08:46:36 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:160) by BN6PR03CA0068.outlook.office365.com (2603:10b6:404:4c::30) 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; Fri, 8 Sep 2017 08:46:36 +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 BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Fri, 8 Sep 2017 08:46:36 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v888jmou023063; Fri, 8 Sep 2017 01:46:34 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Sep 2017 14:15:21 +0530 Message-ID: <1504860327-18451-25-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504860327-18451-1-git-send-email-hemant.agrawal@nxp.com> References: <1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com> <1504860327-18451-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131493339967532444; (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)(1110001)(1109001)(339900001)(189002)(199003)(8936002)(498600001)(85426001)(81166006)(81156014)(50226002)(8656003)(68736007)(86362001)(50466002)(48376002)(4326008)(110136004)(8676002)(2906002)(189998001)(104016004)(356003)(305945005)(77096006)(53936002)(50986999)(5003940100001)(54906002)(5660300001)(36756003)(2351001)(106466001)(97736004)(47776003)(76176999)(6666003)(2950100002)(105606002)(6916009)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2265; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:VhQxpIMLFDdSTM8wVsZg7nS5MeuXbdX84l7MorUauUzEt+wil1wP8nVe4A66XBpmvSuYNQLxsZBQVjwdX3zd/kvkvMFVv254ukVQQWuHY80pl5kRdN1gFo/rPPR9vJ2d MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8886f094-31b7-4a46-cc3b-08d4f6961d8c 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:CY1PR03MB2265; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2265; 3:mCmoRSTnCn+J4n/sM7GVxGnM5a/uSJ7qlC+TmEZS4vCbc5ItjKTIHphDnZr24aoMkuD5/QDj1AazC6RGNJTXUavvo3XuYHAiWVRtZrICbW4UYq02LWzPtd1mNxwK9G1FTM9+6R5NB7GxV5vX3CSs4LxI5Vabfqxyr6DYJZ+l7ZtY+zILGOGBOXkn00CMhlcTpJ7KN2RshWSetQEdExbJ0PLdeWgQ9rH++AhZxRiWdNbf7IY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XnQ= 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6096035)(20161123563025)(20161123565025)(20161123561025)(20161123556025)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2265; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR03MB2265; X-Forefront-PRVS: 04244E0DC5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2265; 23:lvsI6DcVKujy3VfWK0gkEurxglZLJT7AXiNRgP4AH?= /BHwC40keznsRj8U+Fb8jwtyeIXAtZHUGGy0CcdrCym/85KXnk6veDwJjgbQSnDNqHbHUCdldrxBOO2MY1eBxVLdHeiJBF6BUMb5NWabelXwT7sAd+0T3f2tKpAD+K9E/HjmFRajYAawYVsixw5lm9nuvwaYEgFCNy518vvF3UvVpFxqcX5L/TgooyL0TbeTijnUdveyJhvf0xtkGN1QvlzShhg7de1L/43arJsO73Z6+Fz1JnCzMKMr2+D9sW2jSQOk9lRpOG2TPR6KViq7V8ujX87mjoeP03iV8pDHEKE38XjFGysWv17erjr8grYDINhB8b3F6H4idSCm9TkQvY+D52SJpyX5DPV/s8x6kYGvAkkP+ptlym41OU3Wyko9DZbteatBChPqUKyYeDmxNN0n9jxv7Sk/vSDAIZL6+shFP6fXviEp9GnW9RY+Amm/zCawOAnTNt+O3CwNO1IT86loxdsY6FCPon+MoSP2IKNQato/CELtaEllaUMUips0pwpLInD2TjdDjpPrjpnh9uhC+qk803QT2J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ERSiBd5hTZZ2dixibLw==; 24:J2U+diXd+xIJPrPki7I6ZWWyVCxdYNpnkzXcd0eYZTkql3hqO03HC2R/p5VMk75oNPk5PbJ+xCmp9i06cN+OCJsf8MAEpM7ACxgY5/ozQ2k=; 7:FUwcFM0shpr57Kr0GDcciDTIt8I3XcS6QoDa1yZTCglroqZQcW2OGwy+mOCqGVgFUXdbuzyj78bsUIpuHYf8UhA5vYFWDEsvipj7XsdlpqAT36XduXBBBkhWl2QvySB5GLpwNTJcaXEItgrlaD1jqn3PtJijEMy18nDjX6OaQOvnq4sf65bsoghfDuzh8Cr5ovS40Pdy+LnU8pdCEXj1de1SBTDPGBCMhqT73xhCzNE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2017 08:46:36.5660 (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: CY1PR03MB2265 Subject: [dpdk-dev] [PATCH v2 24/30] bus/dpaa2: add support for hw extra stats API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman_hw.c | 30 ++++++++++++++++++++++++++++++ drivers/bus/dpaa/include/fsl_fman.h | 3 +++ drivers/bus/dpaa/rte_bus_dpaa_version.map | 1 + 3 files changed, 34 insertions(+) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c index be59858..90ded59 100644 --- a/drivers/bus/dpaa/base/fman/fman_hw.c +++ b/drivers/bus/dpaa/base/fman/fman_hw.c @@ -234,6 +234,36 @@ fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats) } void +fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n) +{ + struct __fman_if *m = container_of(p, struct __fman_if, __if); + struct memac_regs *regs = m->ccsr_map; + int i; + uint64_t base_offset = offsetof(struct memac_regs, reoct_l); + + for (i = 0; i < n; i++) + value[i] = ((u64)in_be32((char *)regs + + base_offset + 8 * i + 4)) << 32 | + ((u64)in_be32((char *)regs + + base_offset + 8 * i)); +} + +void +fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n) +{ + struct __fman_if *m = container_of(p, struct __fman_if, __if); + struct memac_regs *regs = m->ccsr_map; + int i; + uint64_t base_offset = offsetof(struct memac_regs, reoct_l); + + for (i = 0; i < n; i++) + value[i] = ((u64)in_be32((char *)regs + + base_offset + 8 * i + 4)) << 32 | + ((u64)in_be32((char *)regs + + base_offset + 8 * i)); +} + +void fman_if_stats_reset(struct fman_if *p) { struct __fman_if *m = container_of(p, struct __fman_if, __if); diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h index 421a581..9eeb3cd 100644 --- a/drivers/bus/dpaa/include/fsl_fman.h +++ b/drivers/bus/dpaa/include/fsl_fman.h @@ -87,6 +87,9 @@ void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats); /* Reset the FMAN statistics */ void fman_if_stats_reset(struct fman_if *p); +/* Get all of the FMAN statistics */ +void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n); + /* Set ignore pause option for a specific interface */ void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable); diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map index f231231..a8ac56d 100644 --- a/drivers/bus/dpaa/rte_bus_dpaa_version.map +++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map @@ -30,6 +30,7 @@ DPDK_17.11 { fman_if_set_maxfrm; fman_if_set_mcast_filter_table; fman_if_stats_get; + fman_if_stats_get_all; fman_if_stats_reset; netcfg_acquire; netcfg_release;