From patchwork Wed Mar 15 16:48:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9626159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C550660522 for ; Wed, 15 Mar 2017 16:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5CEE2866C for ; Wed, 15 Mar 2017 16:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA9A528669; Wed, 15 Mar 2017 16:50:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11F7B28669 for ; Wed, 15 Mar 2017 16:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbdCOQug (ORCPT ); Wed, 15 Mar 2017 12:50:36 -0400 Received: from mail-by2nam03on0086.outbound.protection.outlook.com ([104.47.42.86]:35545 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753117AbdCOQt1 (ORCPT ); Wed, 15 Mar 2017 12:49:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K3fOVunRUxEWya0sKFkRQ9m1rNydwxqNj7ttrFHa5uA=; b=A3VEKUCy89AknKSXdQHcV4WgRbxINMlpKwvT6IVyA09SborjGXVLgpBZFJMoi2KuAJYapcsR/uoXf9azKu15FXyaytqO2TA+tl/n8868/XC3H2avl9qhUqjwfYHT9euUBDzlqC3X0DOjc1W6P0ah4mIj6bQDFpTC9k72xPyDe68= Received: from BLUPR07CA082.namprd07.prod.outlook.com (10.160.24.37) by BLUPR0701MB706.namprd07.prod.outlook.com (10.141.252.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Wed, 15 Mar 2017 16:49:17 +0000 Received: from BL2FFO11FD017.protection.gbl (2a01:111:f400:7c09::101) by BLUPR07CA082.outlook.office365.com (2a01:111:e400:8ae::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17 via Frontend Transport; Wed, 15 Mar 2017 16:49:17 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; linux-iscsi.org; dkim=none (message not signed) header.d=none; linux-iscsi.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD017.mail.protection.outlook.com (10.173.161.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.961.10 via Frontend Transport; Wed, 15 Mar 2017 16:49:16 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.309.2; Wed, 15 Mar 2017 09:48:58 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v2FGmw2X017322; Wed, 15 Mar 2017 09:48:58 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v2FGmw6p017321; Wed, 15 Mar 2017 09:48:58 -0700 From: Himanshu Madhani To: , , CC: , , Subject: [PATCH v4 08/14] qla2xxx: Export DIF stats via debugfs Date: Wed, 15 Mar 2017 09:48:50 -0700 Message-ID: <20170315164856.17255-9-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170315164856.17255-1-himanshu.madhani@cavium.com> References: <20170315164856.17255-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39450400003)(39410400002)(2980300002)(428002)(199003)(189002)(9170700003)(81166006)(6666003)(50466002)(8676002)(105586002)(2950100002)(36756003)(86362001)(48376002)(8936002)(50226002)(2906002)(76176999)(101416001)(50986999)(8656002)(5660300001)(80596001)(42186005)(33646002)(5003940100001)(1076002)(2201001)(305945005)(189998001)(356003)(107886003)(47776003)(38730400002)(4326008)(54906002)(87636001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB706; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD017; 1:1nSG3wYbfbpg0PEoztb5z+7Z3kD+9zA8TUviSiqCXaK9XLT7oHmh9MkyvioUZm5IqXlB57E8+GoS43rPbzdOs04WC23wbO4k6oopbZ8ZzR4g38r5mDJHn/2rO/gJLE7I1RkEux5jvZsUrUS5nDOBUypneundY8J8vNtyUE2UQ6X4wJkokWwCc5P3vA82QcaYLhOCGwVjMG/ixpDfqxUuMXW0ydPxg783FOHWN/bRk95ftuUuXbYKNwsfMi8+OyaHqi7+8PPkLCCofVtGMMYd2vFTGeWt8VwcM0i7RG/+isUrzeACn78/7wfxACsMAgorYy/b8+1QBvK+A0eHG+JxzfCxFKk0Wax/fUDlyGqT4ya/VQed/DzhE4GHl4ry8X+e4vnxVgRsDgUSGDDoliV/T6n8wHDK85OhlI8pXuOJE+DByJic0sZpEhIlTRktxHkYbfwXlhLscStUcH+WesuOxBbwfYHMK6Wm45Zv3pv5Bpmama+UXlPW6wearRVxD4T4UUPU56zfuc/Xv9oUF1TTpLB38d3nSebAVI3SRnx3Qvs= X-MS-Office365-Filtering-Correlation-Id: 41bdd5b0-49a3-4ab6-192b-08d46bc337f3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB706; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB706; 3:ldSnRBBktOovvjrEXwuudU0XDiRauWaKbDoe7aC14n8Ygc4yKbS1fmeX54C8IAYl8CZs+g+jAidJq89To0R/8oFFBHCAkMScbR7MHQQpDC5RD6xc8FWcNQvbrT/boYLuGu4G5Q4s7KNm9rZS9FH8BwlyaaYHHEAW4Z7Xk6wE5wXT27TUQQicAaOnjmoOZVKtRg9DErMKGx7rmEMBKOnHCGc88qTpLMfDgwph4dsGUYKgcJIxYSKzsX1uc5a3uxuNwKYDfHodYR0UTLsnFk29waU9i56J9VbURsjvOAbvaIpiY9mmZvL8Rivn+WOhXKnv5uwyq6HVJ43h7XgDnh/WjOz40NPL8v1+BTm6yNSVLKLqv4lEkEtmCVOvF3Bu7iIM; 25:fH+bbYxnWurKzakQNmMjZNBJXRmIPzG1kNgQv2VsYFpJjxweCOCyYaVf/fr1mz+TqG61M3X8Dxci/6aMw4DUDjj6s67ydMcBEn7lWBpxKOBWJH4oXkpW0Dn6fHvTGLz+z0uD1yGktfJST2QbaZgswPMkp+uuVwe1tM08uqsLgsg+HN8hP9/5XFx5jZYusQMqL0McshHPYoatM2KO7fpvErZ8b7HfAp2ximHsehnCS1lY8LZlp+rF0tBM1DX/wQDrSmsyFUNgaA7dx4Eur6bSptREpkIKdX+/mGzQItIDYDI5wJD78WToGB0VMJsXPk4AOlohrZT3RL0WK0AF1qfTIHGkRn7nR3NLeqlJYkIETeHj8GJZvBoejtJpESjjPxs0vLRFisoaXPwPtKT0ZaYj/YY7X9QpXlKGXHYYx5YpMKZZxvWH9rc/EBzjghAW0tEACCQQQeGt+3So6Pg7qqQt1A== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB706; 31:pum1Ypo/jpJRnAbDvLkG5f7CDxQy0K1Hbrh6f+X7bmF3S1iIxU8lle7lyL9EwFYFwiCobDxT3lmr4Y8OJQpTA0j3UA87rkyU/MCew5HW4OISmWDqBS6N1ksp5GQsvNs4QfkCejyyyEqbU0GqJOOLA9dqhOIHRXMDIrdESEENPQY88ZBi5tg/JE9334gG/sRlvp3k3wzyqWFjga48sAxUnHORoRbIBOA5d/cQxCSEZblhK8juqXgGbAfE3+BgTxauLkY5gf/Y7YZ8Ac7k1oqdMw==; 20:TT5Yt41SiIU/v8NWb34ZoDY2JOoc6ZMMci/DBI7gzX9MBTsSssAlMWOWzYGeitC8YIbVM8lXjzs4JlUcDV+hEEgWmd3GISA+sE7SnM3hx8vTA6eDcokirNWd5kRoDifW9obISA0VJWacSNhpnYfsVmtIgIWHeWtHIqddY8y/omapPQdpWOdnrvTtEDu4WUI3zPzt0kh/BPzud2hNtADMiMPxL6T//ToP+zTi0GcXq2ghEG3/dAI8FZyT06xgPUSYWiWhIrUpdt8gAtKfWNO8engxCZXfxBtVsZVbQ6m7iYeDS8x/ivGb1ym8lDd4eUGUGHMLfoTDwX/huWy1kmHbqYePDTgOiTj8QU0mAQxVYs2KrOAXO93oS6n5cJXpqMCbrZvI+9yb81Ti+f2UeiGBx6GJVhVtOKKtYZRfbHsbLMOz9kASCO5+EI+bZNFFKfQZlP1Qx0G+cn68s3tH6CBUtH1OhwLCao6DmdAPIHVZAbEj+FfLilZwl9we6oLzMVTr X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(8121501046)(5005006)(13017025)(13015025)(13023025)(13024025)(10201501046)(3002001)(6041248)(20161123564025)(20161123560025)(20161123558025)(20161123562025)(20161123555025)(6072148); SRVR:BLUPR0701MB706; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB706; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB706; 4:d2VI0qyoeE+V5E7NBVbII4HuJRjAMgy5DZSXrDtOpULR8SLuoRUfunC8ATb0dEATHyzii5VRx0QBgAqy/D00wugHgSs+ADNlyVdlIvr7FdqEyxMcFqy8YBM4PKTBPB9U0MO9GCRlcwm5Hr7nUPrbLLp8INn3IovsUDNtrEqhsL9xuTlsdmNjFXX28Xg3nVVv7QDVi5k5dx/ZT7Bp5A3RE70DyHd6v6erN61KpQRo1vAV+RAfNGpdN14kqWCcFME986exzk/gq/MrtXw5BI10b4RxpD9qJvzQZwDXfxw+BHy50iJiu1XmwOZyRlUNR17lNA/E1eEnRA+u2ZYFmbLVF9XCCct31LX4OdY5lUwFTVk4Fi0XFURcYd6YhZ05KBEfM9gqzOq07S0E4QRT3ynyyUhMVW9IEfPI9X01YfiuB7wwDvxNMdS/JiTS+fJOy8mV4YsgQSV2OokdBptbR5YX+IQp3DH3GYVz0UVWMFrstySFItO1fWCcA8cE3U2jYAAZwsJoN89ytn2veZB8/7E0epOAP9nZ0De05DedPA7D94uOlAtcsbInTiYLpDy9H5jDYrHVXFUAWyeW/1ku7+EvVOB+WuuhrjLQKwKy2tPp5f21jGX36MVYTDxBNH4x+ihEaRdSNtazexAG+og1BEJUSlof+4kBqWH1841QzQWWkMHj8DzAC/kOuLXDl/XsUnBSbjpGiYmab+ZaPRw+9Idz6w== X-Forefront-PRVS: 02475B2A01 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB706; 23:36lh9tsgnkFFeSD8eW126iTUJmbtEnq71CUY/jr2?= =?us-ascii?Q?LEAgy8gbSZKn24HCdLjN5bCevuGVYp3hYjGjfYzkWz/j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?sShsZiK9F4hZtEI+4iIsHOysOb1wai7ErKLBpV8IgPzGK49EabMtYqsImpAB?= =?us-ascii?Q?F4o=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB706; 6:L+6Odc11T4EzdD6MrWp8u5lMohfrK1GYlhTpcKksZKNtpOqO0/uIXHOOhqqa0ZaFBPAx2Q9A8YqMJnVvW3HEN6t2R3fBPVGkNHc4EL9EARy0WECt4xsrXrL4R9j9GVMfNnwwZdgG0BOuxiuNprCH2ctVJrLKduH9Hg18MZRbLWAqf5kwxvcOH/uBfQj5sDkvCnW5EN5177JYZOj/iQh3fJa3ZHB6BNhgpiSXso3c0K+CSC6QrlbqV71ql3jUWZiniO+4TL5JG9vhNbIFFJ4/HGJqcqh0oB0PAAnm6XgtRYEHyBFzJZo4BNlYTRzi3h7EBdAHfYTTn1SXPwWXwLA5p4JodCFHf3unJHG62OOI/SN8ieUufJx9cK28/T9gBrF7dkAahE9v1gp4iTGX6uP9dw==; 5:fGYPl61NNBvbp1fyJkdv4Mpf+eGKI+BfX0uRm/5RoXXHkqX1htS8DnS5rJNFcEXQZFgzUcp+OPJuS8YDxertMQWAOeAHkf3w0VvTlQQnMs+7CZ3A8NTGXu5He/I/hbpgKAqE21wLvyEWN//D3HK3HA==; 24:8yikyKr4NtWzGfES6gTL/mpC+0xmNjP2cQKmh3pykuBvEo2pNMYOgcitJRJehMJxNYKHnT+k5SWORTf138Ggj1Ip0CHZjnIg+Wghq9rJzRc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB706; 7:RxF3xV59TZcbQUvdYMs7khO/OxG4DdXoTTvVljS56f7jfoKz8DlSqiTr+Jn+tZZFu06kadSXjWDF4Zbtypn3vxs86puivpXzYE8ZovVvKbPpnd0DK7Q5B4kYfjcfPPZkMwZEhuIXaou/kAtn3uQXh66DwsprsYIu/bTr3tyQHWPlusMhcAkhyTB8uWIpm/AA7IZyC6m4ikVbLprwhwEFstst77UITQ29N2wVpk1ekGDpvDu12g2VCNsPY+r7i2DdRVjgjJXP6FkIiqGuLzjIqIP+0rEkbmNLXKc+dQgzmKKgAnP7ydiGqAmv019jq8+fiSXvPx2Qkiwk/rFzqaWfYQ== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2017 16:49:16.3967 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB706 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 12 ++++++++++++ drivers/scsi/qla2xxx/qla_dfs.c | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 9d1d3dcf1c87..8228dfac6a31 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3108,6 +3108,16 @@ struct qla_chip_state_84xx { uint32_t gold_fw_version; }; +struct qla_dif_statistics { + uint64_t dif_input_bytes; + uint64_t dif_output_bytes; + uint64_t dif_input_requests; + uint64_t dif_output_requests; + uint32_t dif_guard_err; + uint32_t dif_ref_tag_err; + uint32_t dif_app_tag_err; +}; + struct qla_statistics { uint32_t total_isp_aborts; uint64_t input_bytes; @@ -3120,6 +3130,8 @@ struct qla_statistics { uint32_t stat_max_pend_cmds; uint32_t stat_max_qfull_cmds_alloc; uint32_t stat_max_qfull_cmds_dropped; + + struct qla_dif_statistics qla_dif_stats; }; struct bidi_statistics { diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c index b48cce696bac..3b35905619b0 100644 --- a/drivers/scsi/qla2xxx/qla_dfs.c +++ b/drivers/scsi/qla2xxx/qla_dfs.c @@ -114,6 +114,21 @@ qla_dfs_tgt_counters_show(struct seq_file *s, void *unused) seq_printf(s, "num Q full sent = %lld\n", vha->tgt_counters.num_q_full_sent); + /* DIF stats */ + seq_printf(s, "DIF Inp Bytes = %lld\n", + vha->qla_stats.qla_dif_stats.dif_input_bytes); + seq_printf(s, "DIF Outp Bytes = %lld\n", + vha->qla_stats.qla_dif_stats.dif_output_bytes); + seq_printf(s, "DIF Inp Req = %lld\n", + vha->qla_stats.qla_dif_stats.dif_input_requests); + seq_printf(s, "DIF Outp Req = %lld\n", + vha->qla_stats.qla_dif_stats.dif_output_requests); + seq_printf(s, "DIF Guard err = %d\n", + vha->qla_stats.qla_dif_stats.dif_guard_err); + seq_printf(s, "DIF Ref tag err = %d\n", + vha->qla_stats.qla_dif_stats.dif_ref_tag_err); + seq_printf(s, "DIF App tag err = %d\n", + vha->qla_stats.qla_dif_stats.dif_app_tag_err); return 0; }