From patchwork Tue May 23 13:19:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9742573 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 348B86032C for ; Tue, 23 May 2017 13:20:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22F01287B7 for ; Tue, 23 May 2017 13:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17D07287D5; Tue, 23 May 2017 13:20:26 +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=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 3D72C287DA for ; Tue, 23 May 2017 13:20:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937129AbdEWNUC (ORCPT ); Tue, 23 May 2017 09:20:02 -0400 Received: from mail-by2nam03on0056.outbound.protection.outlook.com ([104.47.42.56]:31264 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S937109AbdEWNTs (ORCPT ); Tue, 23 May 2017 09:19:48 -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=qsKBEof8YHSKgvN4mVJ3bHj8NqMJx/Uh79gZ0pCqtgI=; b=Ukp3gOhLFSmgVxcyF64bZZtOKy7UuG52LMVm23BMXYozG3c+P6Gh0bT+35w2neGAtC6XTkT5Xt29ZAkA+lJElnvoZV40Hi6fUB8rtggnH6/zGuWbPKFAZ3aOMyENoOfet+MIWhLaxBql2bde65lx0fquslTTcQhHWTxA41mNjJI= Received: from BN6PR07CA0022.namprd07.prod.outlook.com (10.173.33.160) by DM2PR0701MB1020.namprd07.prod.outlook.com (10.160.24.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 13:19:42 +0000 Received: from BN1AFFO11FD012.protection.gbl (2a01:111:f400:7c10::136) by BN6PR07CA0022.outlook.office365.com (2603:10b6:404:3a::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Tue, 23 May 2017 13:19:41 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none; oracle.com; 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 BN1AFFO11FD012.mail.protection.outlook.com (10.58.52.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 13:19:41 +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, 23 May 2017 06:19:32 -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 v4NDJWfP001828; Tue, 23 May 2017 06:19:32 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4NDJW6A001827; Tue, 23 May 2017 06:19:32 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH 04/15] qedf: Look at all descriptors when processing a clear virtual link. Date: Tue, 23 May 2017 06:19:20 -0700 Message-ID: <20170523131931.1777-5-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170523131931.1777-1-chad.dupuis@cavium.com> References: <20170523131931.1777-1-chad.dupuis@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)(39410400002)(39400400002)(39450400003)(39850400002)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(189998001)(101416001)(478600001)(50986999)(36756003)(8676002)(54906002)(4326008)(38730400002)(50226002)(356003)(107886003)(110136004)(81166006)(5660300001)(8936002)(305945005)(5003940100001)(76176999)(1076002)(50466002)(106466001)(48376002)(105586002)(2351001)(80596001)(42186005)(2906002)(6916009)(72206003)(47776003)(2950100002)(33646002)(6666003)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1020; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD012; 1:YY2t5ZvR4QKIefAGrL+Wjny3lTFfZaQpgGKVvbKtGVq1jMoSvT32CQ9ieG6a/okYmgZysPEujo/zeL1ZWwluUC/SOoX9lFZzdSvNJ/PFgWbYvGayIzGP544XQgaWDn+ti37fZBNJ4buiPBidyN9g1sg2OYBC3To4SNXqglw86ifSvjuXayMoTmYfZbil+kXY2KJx3iRd/eXQgWfYldlpI2bEgZueuIcSPd80HT7MVkYccTM24jlQRP6bGF0pKGUIjVUcKovSuZxdHpHgjAGP611m/YntD9n9tQK/bYjoeioxaKzsJ5U0spDpwklxaxR/wQ3VH1iXoGZw/myw7cmjJu4mJirL6MP8WD2wQr8GEH1SP8ModBEIsp9CNgMItxAZ5Psa5MmcX6RSJWG1hILK6ibAXTnpsze8dXHQNcCmxOBtQtQMpSm4GN0TUvDWYyI6AkEgxAn1M/81BY1M/d131zLnTrVsr8X924Xoo0zm1V24N9lsbHzd1bCbUDwVcxINNwU9FOut80IxhIlXvGLumw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0701MB1020: X-MS-Office365-Filtering-Correlation-Id: 1891803b-c4da-40d8-7bb3-08d4a1de5f51 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:DM2PR0701MB1020; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1020; 3:+iMG8chb0eO1XCoGKfijE3504exv7HiwkLffIV8xKJJ3mgB1QH+p3FH84hwpGKJ3v9pEEB/NnpgAtlu4DACjiO1M9nToMqGwTLaavTv2K5wOICxA87S+UzVe4TOPFI8Oz2JB7kkzSDJmxi+y9zCdbMyYwZprivzX+L2vuuAUs9cy2GSCM/U7OoBaeJJ+dAugfU8/v9iHZ/gSZD2dOELRBgoxXUBTMY24fENlWTAa/jeCGY1IINrnLFiLTtiZgcEyFnod3gC759wCp8PNNID+zmYcJz5s7hg9mU+cmB56pNgaEAckLVOYyQMaT2KUjmI92qPT3oigWvj9+fdDtq4SOuB67K9SB46IOJmdvKcsKVjzbGztEeVb7WTzHL7+sGCIbkY8NM51MeXvSozkQIJSxHC9cy0vicP0paciJo62Pgk5fC+fFqJ5mzxGul0M/kAa6C9u+NujibZkidnQfb/8Jg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1020; 25:aVjP/ECLyAJcFZYwgmk0nzUI2jiWIvRBWfUAk3Y9RSjwtsGuBI/Sh/7WGXgwpLO8RgMVCImEqoE6m+Mdv1cc4CKvNZ2eSEM423ns14AvhuIlIfb8eSCYJm9EAWgjjz45OrG0ko1ks+pIuoAUnXppL/kokAEMChX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ICTom1vF+iL9sAWv4pOA2RguXXiJ2HXFcPqEThK4t/DJZPWy2HRPlcwzD/rZjr9tlBgOXb7R X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(13018025)(13015025)(8121501046)(13017025)(13023025)(13024025)(10201501046)(93006095)(93001095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:DM2PR0701MB1020; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1020; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1020; 4:8vAiPBOrzb08JHz0Y1Keh4hrWcxO/Ec+BzqLwc7cuL1vKdODtJVgHElNy5XcyfKWgMX2lur459lPI/RCP8k/gOhPskvM2CfGfBCj6/X/E/G2cgg9wcwX8tEqECpCITEbmZ+t4mU8VidQUtbJhUZwkeRSh59G6AU3LTZiSFsGM5FtinDbIsgF1NEVJDWWfheF0CB2Jh6MCSKF5y5oKz2u4bdBS5wPGSES7PR7k7OlAQ6oHOjR3tRlEoQ5IF64XLjsMgTI/iAD3VJl8WWQG1UkwLxRnqIjFFN66f3NwGEafM5oYIdyafssQe0+PXHuRZIrqMcdf5c0tXRZwsgr0OmHt7RcFcWa+0RwQyrvavrUPRp6BuSRhbYJ8QNlTG0Oa6vjlOVPmzgu0/O2339ocqctatweSM1uVNEMGkkMj7cp5IORv4WxIGxuPxwYviVyZPCU1k2J+f7S7W8FKpnpcRiroCYdA1qviVzHzM9qRYziXiM7XTdW0VICjPZ36dahLzUone5/lSooZJPs6CJGQPEQzkeUtWM48GGEW63yULZFIj29c7Pz9Jl2Ft30gb5IgJqj3Aqie5ebKjCkLRg3y5mUzi6V2tz5wTEBewJCs52hyJIGt6S/m13IeCHf8Y4XyjOZZkenN5pW0DmYDEd0kQzh/sTcjxPbg2tG4HX1iU/Ne2k6yj+HTDWWjbuUUfa/pClpgI26XRYfiE8Ew3l+pJygmfSgL69I9Gs4NhEARFOWf9bajhxRqiegpk2L2veUBeyDE3WNwG8kgib7KVLh7eXkbZT5zuoHnj5KGlHYADuFmtXYQbV4KStf7rTrhZD5M1M6G2020qp49JFGcrpBiwMcciJMpnV4bdHzvFeDh8gUjpJ8Uz2BA2h1LHVfswZr+DrB X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1020; 23:KgMFOJJf01hK5vzndXEy8lNBhPJgNvisB2DPk4Z?= =?us-ascii?Q?FdNkCuQYLYCZqQu83gDzZ4IUaki+VCV6RnZoS1ivyP9onKSb+cgc3IxtDMb1?= =?us-ascii?Q?1iIkO2Y4w+nspytoMb7qxgiSBK5TAE8FPIsXn2TbeWgVrAdtxwA5kAh3xymQ?= =?us-ascii?Q?5DsUlFyZm79pMBcVZ6WUSVyjIbowQ/yVYlaPQhe+RS+724vGPzEbYvYnz77c?= =?us-ascii?Q?YpyZAPPhgwIHEXopLYKhO9hiK+aqevfVO59siDe6+j2RxzfwEWYq/leXt5VA?= =?us-ascii?Q?DqayQn2azxhnJKYpP3SiVbz3AdrpJsGVal59tExiuktS1TzwItjiXBCUdznw?= =?us-ascii?Q?h3EdUpa0fH26rzCAJw0nNcvEZAJQUXVPdR9TG9wiMvKNl3tMe9baaB8YTHmu?= =?us-ascii?Q?Ze2fyOmIzm9Wdotyf6nuEx7ivAlBq485CCJICal8yIAweVakioLqQ1mJLaSw?= =?us-ascii?Q?pWuZ0oB86ZvPuVwmasLJcQocZTIyeAvJLwsc5u4LdApD9nZ04h/SCSmIMc6/?= =?us-ascii?Q?dd56/vVxwTq82xuc/d22Fon0cS3OGrFuUDIVrw28j4Lypoq8iBpxU7EfOEQL?= =?us-ascii?Q?ihegfTdB4wllFs2tZkxu6bNJbpUuvwPqyDDowJGs0CriCqU6b/prGZBej/DZ?= =?us-ascii?Q?5C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o1+w0AJMJykp7dX0y02PniNGR68byKPwl9zQbSo0mIyW8DASpfaWA7H3CEGSYi/rjYpdalryy7YWWY4ojn9Mrq9Scw7e7I4gN34LkyTafKFnl3aBONMX0z2JEAHEw==; 5:DEGm0ZFaOfY4aH9CWaUpI2Fi9KrJXouFV2XK4l7901MFGKxKCsvfsmJ8INKJoUrIz0f4nyb3F/6N9Tqm+18pkzLyHHIPLMGHwqm48T2qS/9qSQn9gtIBYRK40BOmWKp+agPl5TZR87vBKqMn61N0ZQ==; 24:ZspQEKB35Xm3sZJjZugxPSBd/62MMQ7lqflmtlRuN1d63GM8KJ3BwNnh0LKDvR9+PSXA6xK4o/YlBKtQoHUtnjUUpPM9aUDoMXRk2ycP+6s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1020; 7:qRLbJApKercdJEHOL3KKeDClUfvRYoyUjoYg8uHtnZ1n6ZaPiZxT7sB+gV/GIdPqo4k4WWXV09RyK42PWfGj/ezannmGoRdNCb0xSzE4UnyL9a7d3PmkgibAD3kmAdQ0jRDzHY8kVKufyAhKVoJhCmgeDS0GjMq8+ZakqS039lGGdJquwgWOx7+dUUTiykEZYnZ4A5qKU+r/CqnY5Ja31DsW4QLi7IJ1rgM2lOXhi2dcUWgcoL2+zIHItzmvKGLlYleESH25G5wj3XZL5JodnQwFFjcnUZqr1Nfjjc6eqMdEX++OhqkkyICk0FxE1eK4b6ED5ZO7HNVICak4Vqdcpw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 13:19:41.6637 (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: DM2PR0701MB1020 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 If there are multiple descriptors for a particular type in a clear virtual link we receive, we will not process it correctly but rather take the last value. This can cause us not to not flap the virtual link as the value from the descriptors that we compare against the our stored FCF or fc_lport values may not match. Change is to do a comparison when processing the each descriptor instead of at the end and then set a bool if we need to do the reset. Signed-off-by: Chad Dupuis Reviewed-by: Bart Van Assche --- drivers/scsi/qedf/qedf_fip.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c index 2dfb817..64b04f2 100644 --- a/drivers/scsi/qedf/qedf_fip.c +++ b/drivers/scsi/qedf/qedf_fip.c @@ -156,10 +156,9 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb) struct fip_wwn_desc *wp; struct fip_vn_desc *vp; size_t rlen, dlen; - uint32_t cvl_port_id; - __u8 cvl_mac[ETH_ALEN]; u16 op; u8 sub; + bool do_reset = false; eth_hdr = (struct ethhdr *)skb_mac_header(skb); fiph = (struct fip_header *) ((void *)skb->data + 2 * ETH_ALEN + 2); @@ -190,8 +189,6 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb) return; } - cvl_port_id = 0; - memset(cvl_mac, 0, ETH_ALEN); /* * We need to loop through the CVL descriptors to determine * if we want to reset the fcoe link @@ -205,7 +202,9 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb) mp = (struct fip_mac_desc *)desc; QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2, "fd_mac=%pM\n", mp->fd_mac); - ether_addr_copy(cvl_mac, mp->fd_mac); + if (ether_addr_equal(mp->fd_mac, + qedf->ctlr.sel_fcf->fcf_mac)) + do_reset = true; break; case FIP_DT_NAME: wp = (struct fip_wwn_desc *)desc; @@ -217,7 +216,9 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb) vp = (struct fip_vn_desc *)desc; QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2, "fd_fc_id=%x.\n", ntoh24(vp->fd_fc_id)); - cvl_port_id = ntoh24(vp->fd_fc_id); + if (ntoh24(vp->fd_fc_id) == + qedf->lport->port_id) + do_reset = true; break; default: /* Ignore anything else */ @@ -228,11 +229,8 @@ void qedf_fip_recv(struct qedf_ctx *qedf, struct sk_buff *skb) } QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2, - "cvl_port_id=%06x cvl_mac=%pM.\n", cvl_port_id, - cvl_mac); - if (cvl_port_id == qedf->lport->port_id && - ether_addr_equal(cvl_mac, - qedf->ctlr.sel_fcf->fcf_mac)) { + "do_reset=%d.\n", do_reset); + if (do_reset) { fcoe_ctlr_link_down(&qedf->ctlr); qedf_wait_for_upload(qedf); fcoe_ctlr_link_up(&qedf->ctlr);