From patchwork Wed Jun 14 03:47:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9785233 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 6FABA602DC for ; Wed, 14 Jun 2017 03:48:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8178727FA3 for ; Wed, 14 Jun 2017 03:48:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7595028589; Wed, 14 Jun 2017 03:48:18 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 A84AC28294 for ; Wed, 14 Jun 2017 03:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754197AbdFNDsQ (ORCPT ); Tue, 13 Jun 2017 23:48:16 -0400 Received: from mail-sn1nam01on0049.outbound.protection.outlook.com ([104.47.32.49]:53120 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754044AbdFNDsI (ORCPT ); Tue, 13 Jun 2017 23:48:08 -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=v8FxzsTx1se5cbvTGjCRh+KHqJqnYU98LCVZtHl3Ufg=; b=RVLXZPLOjAiCTWpDEaluFfxG8xP7TXvGw2lzGd0EBaAwgqKevDt3Q/FC067DTWrZXMR1z2y0Ew9SDXbAsDikI2naaWlOwAY2eazfISejD7cKeiatX7UlXY8g5j3Y7llnr4mpKoWoKGokRQc4trqgXLxvC/TQMQyJpuAhdxIjIfY= Received: from CO2PR07CA0071.namprd07.prod.outlook.com (10.174.192.39) by BN1PR07MB422.namprd07.prod.outlook.com (10.141.59.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 14 Jun 2017 03:48:04 +0000 Received: from BY2FFO11FD018.protection.gbl (2a01:111:f400:7c0c::195) by CO2PR07CA0071.outlook.office365.com (2603:10b6:100::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Wed, 14 Jun 2017 03:48:03 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.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 BY2FFO11FD018.mail.protection.outlook.com (10.1.14.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1143.11 via Frontend Transport; Wed, 14 Jun 2017 03:48:03 +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.347.0; Tue, 13 Jun 2017 20:47:50 -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 v5E3lohY015483; Tue, 13 Jun 2017 20:47:50 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v5E3lo9o015482; Tue, 13 Jun 2017 20:47:50 -0700 From: Himanshu Madhani To: , CC: , , Subject: [PATCH v2 05/15] qla2xxx: Add debug knob for user control workload Date: Tue, 13 Jun 2017 20:47:20 -0700 Message-ID: <20170614034730.15428-6-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170614034730.15428-1-himanshu.madhani@cavium.com> References: <20170614034730.15428-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)(39850400002)(39840400002)(39400400002)(39410400002)(39450400003)(2980300002)(428002)(199003)(189002)(9170700003)(36756003)(1076002)(8936002)(4326008)(47776003)(87636003)(8676002)(2906002)(76176999)(81166006)(5003940100001)(189998001)(101416001)(48376002)(50986999)(106466001)(478600001)(305945005)(2950100002)(86362001)(33646002)(356003)(6666003)(50226002)(54906002)(80596001)(105586002)(42186005)(5660300001)(38730400002)(50466002)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR07MB422; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD018; 1:ZaK09RHU34vnUQEh/hXPWgo8xN1nNLEwZ7CN/PGIKnr5jLUU4e1i1IllyDh9963tqRhr4d1/xeWPvYMSBtWAXmIYTyG8wXwC86jyQvuesM0yCqjRg78AElxR7WAdgExQShDk4cbx2Ja0JIDeo3N0D1beOOf+zRCrvK/ywDcCbH1otUdgsy9aGNmlpesaq4Jx+OSZp2eltB/V+FwbNWnGufFnXOwPTM+5zlcJ/UidcqPK7dcHc36PPVcSgqiTHBHad9PLOjzeXwvB28QznDrLvj+igEk4VjOhnLQuiLTpVuXoXLLCswr6AZFysbef3tIPaIgVeMjhxgk4OnCqYDJpeLTWPRMGuXqnkiO/MId0JClfL+xqKoK28zZlwOJ4RKyKjhgIOMbRak3jjeDAFwMCKj+P8/sWUUJL/KOX+VHdi5RSuiH5g2tZD4texmg9NGAxakXsY3jporh3uoYV1ugGPwwRIRm60aSqzHDLqK88YIVAjC8hgG+T4QWt/s6Oc4UFnHxwwc8lhdSWuxmUo1Qsag== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PR07MB422: X-MS-Office365-Filtering-Correlation-Id: 9faf72ef-2064-4f3a-a228-08d4b2d828ea X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN1PR07MB422; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB422; 3:+rm30JpSn1hDzcBrq6gQ9tcUZjkbmaGcGrtc8g3DNCWQ4b5LcFGcLdE3Q7JU6ltHxTz+WZHVakBX6szG1lzg5mI7BxsrndWqTFkL7rpnoscfznHFr5mbes6GnKtYO9vYyXMz2n8DblrK2+pZe/riPIT+ONgsd91wcyUCee6av18+C6vFj7W0XnDIV7YJ5suH6XoUHoO/TDEAJKjtNK2qSDhU9yDvZGeqdMa9cpB/HqcEJ4I9GRtwHv6Ke+lAkKt/kRuB2pqLYukY+H8kT1tcLK4ucLmLpDpSXw4FMPe5dn6AvVLalRnTPtVl6tUvVe4CSKlUrP/10U5qmt9ZIpgu074in5FFtBwUOsSyHMLV9PUFcmUP7rLGJ14Z7shepSRfJG4qSdxxBbobBDzHGrCMeIkkPv16r6XchSt+2i58E31h4bW0phEck7QjUC3H57yIJ3qlDpuGXv9kEywPYxx37DhSI78vbKE5txl3t70tCpfTNcMZ60ViLLuCueSE9X8M X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB422; 25:IsgevizjTNuwwBOBo6yXcxUi38D/w1JL/D0g5ntL87X+gEjHhxiJwIMBFnTkyNCwhAnlVH3v38zMh9TVXl7TVEp6Ytc3Mh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YP1/t5Yy7lwjWfzayqkUUfjkNa9vYo4Js1C1FnEuhG9dLLGUJ8oCwNL7Q6CrYhjZiLYDkGmalVpnyafJPem7Qu5z33rO5298Yv74cZE16K8a3xTmH5N4OOwdLVTjZ/1y+Fg9OQF5uR89r3n7OCHT4KW7KMQiRe1UKFSR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN1PR07MB422; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN1PR07MB422; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR07MB422; 4:uo8zbnaanTMx1uPXgtO54Fj/Ur5Y8678nW2ARM135eg?= =?us-ascii?Q?BkS0E+mvAEWa9gixzLlHlvA5Hrptwkk7B57Ib3V1Y8uCj0wotQBMwFGg8wrH?= =?us-ascii?Q?Lp0jH5AML2XzXA4VvQyENMfa+z0bAVOt6IwMFRRapq2S4xn5+67HOphkifRH?= =?us-ascii?Q?fo+BmZ+WCmHnNl1VLlXSBqlWLVBwGec6Quywq3B6onRk9wZ1Y27WJqUMywkq?= =?us-ascii?Q?3BIfrB4LqimOrzpYPQdSdEJjlZIx7C+fpj3G061rKotUpaMw7rJ/eJQ2XhZL?= =?us-ascii?Q?rfCr3NONClN4BIBBBgfMFu/qsGjXUH5+pfIxaHsASL2oNPREz/KZj6PgoVJv?= =?us-ascii?Q?YLXxq/TkOXiX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ostics: =?us-ascii?Q?1; BN1PR07MB422; 23:cvQxl+Oa/PAxC9PWJXJB8toedyLjWbvMjE8ezzFzGK?= =?us-ascii?Q?5uYCcEDxirW2E3EMKslxQUl90sm7LeOQzpfu6e2bkXtmY83xTD0st7UUA+Dc?= =?us-ascii?Q?aR3WLkBbxX6EYBc98FziVpA0Qxfndgqq9K45pXUwtq/XJxPJ51WVQHcrWE2/?= =?us-ascii?Q?DUxrXncjbOpB45CJtnkjz4149f+yixOVojRBfcqkaFVvA3A0R0AZRRNb4IdI?= =?us-ascii?Q?HbKP0Mhv4pZTmayj5x9a1Hu0HS7WGcCb0dcyK1pM8HChlPCN7/C1BT/7w3D6?= =?us-ascii?Q?YsqNyfe2ZEFZXkyw87gPYrjvvGRy3f7XMWdfjsttLJdZNDep6oUJhqQAfk5+?= =?us-ascii?Q?7VH+4WdewN06wFiz87lfS6ARsXCJsIrH7aoWpe8/I5RnK929TBDm14HoApJk?= =?us-ascii?Q?DiWB/qo7t9qM5fNP1fBSxJr3MwjD7Rd0xEPs6qJmqepVSUar6EvRNNG68Y1w?= =?us-ascii?Q?oGgWuuGC5THdsuStEFtc+5fww9tuK2V5hhYpK9yiPpO7NHDqFOxy9qnJ8lna?= =?us-ascii?Q?MeIOV21IzxgZhKcwnMftw3uhCbouAhKryY/PRUiC3L15K3i5GhT8EHGCjN6c?= =?us-ascii?Q?RxQcP+f/uQToPQtBKD2v7PAItIP3rNfeaMIarBmufmhCTMpr/LBMmQ/GiGNo?= =?us-ascii?Q?JD7V/pMR/BBEIp59ZMLuvLY0S8cwr7AtCzk4QIPwputIgKGUXIsJ9+J1PG1b?= =?us-ascii?Q?Dku3IJbM+euAdR38gqllZlczAW+Ku+el4FmA7NFIFCTKFV3SbIPjkULJMe97?= =?us-ascii?Q?3/a2b4t2pa+hpT6HI/83/76oHvfDJKGaT1BYalBrqVPiHb+SI07+HLXhmlEw?= =?us-ascii?Q?MHXHyttAUtxEYFOHjIBdEv9taGavrk7EgzLKMauq+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zJWGj9142/NL820ahmk3EksE3QZhXwsyZJbkBDwLQyWBBzGdSBJHootM5IV4bbWYnZP9Gfz9OR3M2PtHhWlXYAFvr1CupQd8POF/ZBiLAjfOB3bJZS6tA4Lt8RwLKXX1hsIgXcqJYSUH2/99tFDYXZnTit3toouVA8TG8Y7RdGCaOstz/DR6VtMlkFK6hHgn5hUAHI6H7G4BMOVqfQsw6WSryZPMdf34x1aV8RbBEoX5FSkL0gmcrCKyd55Boo2R23vLBO9tb/35RzqWVT0ok32qU2gzv21+raWVHdAU7RPj+o97btyGzC0AS8UBIhEQXV1y; 24:hwuGBygXRxRxE9OTqlu/4r+DMMpPgfrfXWHuyRCTnP48ZXzayYITYIpudrzH44jWR2RPZDtDJ8d00WNbp9pZgffvl91z9hFYOLrRODXfqrI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB422; 7:QFbKN7epcOL2jcrstbDtTDg818Gn+5Bz9nU68wrIex2tJkYUVnpUhPsUpNNlXLHDhZaFRYd0eTetnbLYr3YZ5s9hLoda5miME4jgc5HDfO2Xm8LeDq+dJ14V3yNPW15uWbw7f1mvdKnBopAHNzUxDeLUbj1TFC5aHGEcRvuPrn0u4RaoX8l9osiajxywVQ288ZDQ5hN3rrTel5prZBkj2YVYi24M9MI2aL0hmA69EhrtxvfUpsuxbzi2ePBtmBVQOUdR6QV9Crx5+igSu2DRebx7h2zdZc67BJVMOafjdYj4+2QVRoHRPKh9hQ6rRGEad8Cvc5QbPTIUPsmwhKeu2Q== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 03:48:03.3044 (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: BN1PR07MB422 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran For Target mode, user can control the work load by placing qla2xxx's irq vector on certain CPU via the smp_affinity knob. This patch allows user to control the number of QPair's irq to be active. The irqs are allocated at driver load time until unload. The work itself is placed on the QPair based on user setting. Usage: modprobe qla2xxx qlini_mode=disabled ql2xuctrlirq=1 mount -t debugfs none /sys/kernel/debug echo 2 > /sys/kernel/debug/qla2xxx/qla2xxx_[host num]/naqp echo [cpu id] > /proc/irq/[irq id]/smp_affinity_list Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 7 ++- drivers/scsi/qla2xxx/qla_dfs.c | 89 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_isr.c | 11 +++-- drivers/scsi/qla2xxx/qla_target.c | 32 ++++++++++++++ 5 files changed, 137 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 8b52f431a812..18b37c864250 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3322,6 +3322,7 @@ struct qlt_hw_data { struct dentry *dfs_tgt_sess; struct dentry *dfs_tgt_port_database; + struct dentry *dfs_naqp; struct list_head q_full_list; uint32_t num_pend_cmds; @@ -3330,7 +3331,8 @@ struct qlt_hw_data { spinlock_t q_full_lock; uint32_t leak_exchg_thresh_hold; spinlock_t sess_lock; - int rspq_vector_cpuid; + int num_act_qpairs; +#define DEFAULT_NAQP 2 spinlock_t atio_lock ____cacheline_aligned; struct btree_head32 host_map; }; @@ -4278,6 +4280,9 @@ enum nexus_wait_type { WAIT_LUN, }; +#define USER_CTRL_IRQ(_ha) (ql2xuctrlirq && QLA_TGT_MODE_ENABLED() && \ + (IS_QLA27XX(_ha) || IS_QLA83XX(_ha))) + #include "qla_target.h" #include "qla_gbl.h" #include "qla_dbg.h" diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c index 391c50be2297..63d7374dce77 100644 --- a/drivers/scsi/qla2xxx/qla_dfs.c +++ b/drivers/scsi/qla2xxx/qla_dfs.c @@ -314,6 +314,81 @@ static const struct file_operations dfs_fce_ops = { .release = qla2x00_dfs_fce_release, }; +static int +qla_dfs_naqp_show(struct seq_file *s, void *unused) +{ + struct scsi_qla_host *vha = s->private; + struct qla_hw_data *ha = vha->hw; + + seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); + return 0; +} + +static int +qla_dfs_naqp_open(struct inode *inode, struct file *file) +{ + struct scsi_qla_host *vha = inode->i_private; + + return single_open(file, qla_dfs_naqp_show, vha); +} + +static ssize_t +qla_dfs_naqp_write(struct file *file, const char __user *buffer, + size_t count, loff_t *pos) +{ + struct seq_file *s = file->private_data; + struct scsi_qla_host *vha = s->private; + struct qla_hw_data *ha = vha->hw; + char *buf; + int rc = 0; + unsigned long num_act_qp; + + if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha))) { + pr_err("host%ld: this adapter does not support Multi Q.", + vha->host_no); + return -EINVAL; + } + + if (!vha->flags.qpairs_available) { + pr_err("host%ld: Driver is not setup with Multi Q.", + vha->host_no); + return -EINVAL; + } + buf = memdup_user_nul(buffer, count); + if (IS_ERR(buf)) { + pr_err("host%ld: fail to copy user buffer.", + vha->host_no); + return PTR_ERR(buf); + } + + num_act_qp = simple_strtoul(buf, NULL, 0); + + if (num_act_qp >= vha->hw->max_qpairs) { + pr_err("User set invalid number of qpairs %lu. Max = %d", + num_act_qp, vha->hw->max_qpairs); + rc = -EINVAL; + goto out_free; + } + + if (num_act_qp != ha->tgt.num_act_qpairs) { + ha->tgt.num_act_qpairs = num_act_qp; + qlt_clr_qp_table(vha); + } + rc = count; +out_free: + kfree(buf); + return rc; +} + +static const struct file_operations dfs_naqp_ops = { + .open = qla_dfs_naqp_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = qla_dfs_naqp_write, +}; + + int qla2x00_dfs_setup(scsi_qla_host_t *vha) { @@ -391,6 +466,15 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha) goto out; } + if (IS_QLA27XX(ha) || IS_QLA83XX(ha)) { + ha->tgt.dfs_naqp = debugfs_create_file("naqp", + 0400, ha->dfs_dir, vha, &dfs_naqp_ops); + if (!ha->tgt.dfs_naqp) { + ql_log(ql_log_warn, vha, 0xd011, + "Unable to create debugFS naqp node.\n"); + goto out; + } + } out: return 0; } @@ -400,6 +484,11 @@ qla2x00_dfs_remove(scsi_qla_host_t *vha) { struct qla_hw_data *ha = vha->hw; + if (ha->tgt.dfs_naqp) { + debugfs_remove(ha->tgt.dfs_naqp); + ha->tgt.dfs_naqp = NULL; + } + if (ha->tgt.dfs_tgt_sess) { debugfs_remove(ha->tgt.dfs_tgt_sess); ha->tgt.dfs_tgt_sess = NULL; diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f5493eda0110..beebf96c23d4 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -139,6 +139,7 @@ extern int ql2xexchoffld; extern int ql2xiniexchg; extern int ql2xfwholdabts; extern int ql2xmvasynctoatio; +extern int ql2xuctrlirq; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); @@ -856,5 +857,6 @@ void qla24xx_delete_sess_fn(struct work_struct *); void qlt_unknown_atio_work_fn(struct work_struct *); void qlt_update_host_map(struct scsi_qla_host *, port_id_t); void qlt_remove_target_resources(struct qla_hw_data *); +void qlt_clr_qp_table(struct scsi_qla_host *vha); #endif /* _QLA_GBL_H */ diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 9eb946cc8297..3c9f9aa7f2c2 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3227,9 +3227,14 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) min_vecs++; } - ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, - ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, - &desc); + if (USER_CTRL_IRQ(ha)) { + /* user wants to control IRQ setting for target mode */ + ret = pci_alloc_irq_vectors(ha->pdev, min_vecs, + ha->msix_count, PCI_IRQ_MSIX); + } else + ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, + ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, + &desc); if (ret < 0) { ql_log(ql_log_fatal, vha, 0x00c7, diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 8920b830722c..cbe6ff9f663e 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -66,6 +66,13 @@ MODULE_PARM_DESC(ql_dm_tgt_ex_pct, "the percentage of exchanges/cmds FW will allocate resources " "for Target mode."); +int ql2xuctrlirq = 1; +module_param(ql2xuctrlirq, int, 0644); +MODULE_PARM_DESC(ql2xuctrlirq, + "User to control IRQ placement via smp_affinity." + "Valid with qlini_mode=disabled." + "1(default): enable"); + int ql2x_ini_mode = QLA2XXX_INI_MODE_EXCLUSIVE; static int temp_sam_status = SAM_STAT_BUSY; @@ -4059,6 +4066,31 @@ static void qlt_do_work(struct work_struct *work) __qlt_do_work(cmd); } +void qlt_clr_qp_table(struct scsi_qla_host *vha) +{ + unsigned long flags; + struct qla_hw_data *ha = vha->hw; + struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + void *node; + u64 key = 0; + + ql_log(ql_log_info, vha, 0x706c, + "User update Number of Active Qpairs %d\n", + ha->tgt.num_act_qpairs); + + spin_lock_irqsave(&ha->tgt.atio_lock, flags); + + btree_for_each_safe64(&tgt->lun_qpair_map, key, node) + btree_remove64(&tgt->lun_qpair_map, key); + + ha->base_qpair->lun_cnt = 0; + for (key = 0; key < ha->max_qpairs; key++) + if (ha->queue_pair_map[key]) + ha->queue_pair_map[key]->lun_cnt = 0; + + spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); +} + static void qlt_assign_qpair(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd) {