From patchwork Tue May 23 13:19:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9742571 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 939416032C for ; Tue, 23 May 2017 13:20:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82265287B7 for ; Tue, 23 May 2017 13:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77190287D7; Tue, 23 May 2017 13:20:25 +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 DD65E287D5 for ; Tue, 23 May 2017 13:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937116AbdEWNUK (ORCPT ); Tue, 23 May 2017 09:20:10 -0400 Received: from mail-sn1nam02on0067.outbound.protection.outlook.com ([104.47.36.67]:51129 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933691AbdEWNT4 (ORCPT ); Tue, 23 May 2017 09:19:56 -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=hVVOYftUy2Gw/eLN8UM2F/gxOhhUBqR4hzeBK7AW0lY=; b=QHFYefoXPd3KPN+FxpN/YEoqdAPaCyT+NcP66xhdT+n1rizQtMbuwDncBAHLCOUY9pcuMTkbJqijWIwCViQAgl2/KN4rDcBtE+SK5uFKM8n7MsihpjcXgOVfJ3v1P1UDjdVB5++Yigar3fFjQs6RHyghCNmsh94ik3H+tTXbQxE= Received: from CO2PR07CA0048.namprd07.prod.outlook.com (10.174.192.16) by SN2PR0701MB1022.namprd07.prod.outlook.com (10.160.57.148) 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:50 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::174) by CO2PR07CA0048.outlook.office365.com (2603:10b6:100::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 23 May 2017 13:19:49 +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 BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) 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:49 +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:39 -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 v4NDJdtJ001860; Tue, 23 May 2017 06:19:39 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4NDJdBl001851; Tue, 23 May 2017 06:19:39 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH 10/15] qedf: Add non-offload receive filters. Date: Tue, 23 May 2017 06:19:26 -0700 Message-ID: <20170523131931.1777-11-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)(39840400002)(39410400002)(39400400002)(39450400003)(39850400002)(2980300002)(428002)(199003)(189002)(9170700003)(105586002)(5003940100001)(356003)(38730400002)(107886003)(42186005)(80596001)(72206003)(4326008)(478600001)(110136004)(106466001)(2906002)(8676002)(2351001)(50226002)(33646002)(86362001)(5660300001)(36756003)(48376002)(81166006)(6666003)(2950100002)(305945005)(6916009)(47776003)(50466002)(189998001)(101416001)(76176999)(8936002)(54906002)(1076002)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1022; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:iQIvnhYvJvekJZuRf0hIXc4rc87vZC/91jB1S5bm3N6TWPyKDsdgYM9WPsS/kQl/3+oMRDesOR2KgZzQI2d3URgot6mUacB6r0CClmal9sKZRs1qpa8mFL8WCy94RhhAka8QK1Md+wYFNnKkkVXWT+zlpVg8ivp9wmPjEoiSZgX6fLueDi8GOiXUHqMS5sioVxGh7n2UoGxX685OfkH59ndpDh0gv9rL3lueVyAY9VwFAItbi46P1Y9GOfUF+DhFjcBWMWgnTiBdPGK+SymvewGPTC6dscTnHoFnROdasfxHSdT8mgNTIOSH52OC1rDQpFx0P/39mUXaqIDk7CVU2TjSCg0wrSLjV1fqRGU8BOGuUmJ4eBwPEivaYAfv8qqtjWQqoP0ibyEaAVEj9EHFitbRBS/P8+Vkb3WdvXHzwmMlI1npOODY/hNJIZ4t/8x7ih3of7r+2S1X4g+WwFhS6+M4UOdN9deHGoYGR6YgXj/BBuzWYUdP/T9v4e2UcE4D1b9mJto4gtkcptXyirB/0w== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN2PR0701MB1022: X-MS-Office365-Filtering-Correlation-Id: 8fb4b775-7e5c-4677-c6a4-08d4a1de63cc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:SN2PR0701MB1022; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1022; 3:iVqNJSrByNcr2zMO5E8dqNMbtbJx09hzoevvjp5H8aHmmTe5jYBpGRdKfZ7JZ29Qrhcd5NORPBz/iQFzTCW6TQucuYIkCcRYpjrcjwFrMCzooCfp/p6IVWHBNB5I6otHU5dP9oVOT02oAzfbdQe++lRRhih32yOkjgMKqwgypSJFRGPSgAANWMBgZtKzRsFLvy0y3lm+Ftrlo4kK3jjIAFqUq3geUmcP0gyw6B6sGBFawfnWKUWXqSlPl2YzM2U0eAfOOdQ1cNTQJQtNnLRlJv2N3W9RVg45IVR3LJtRRoON8C1Y5AYYG0ZitPuAng9Id2yy56EoQEJi2BpE1heZgaroPdBcHn8Lzfv/wq3TJ3swDJVLLpBTSS2wOT+hnwktC0h8hzVhCVw8CAp3LVNVLIXEN0B00JfSmCtMoLoxOtY74Tr+F7StY1xjH1mhTwNQEFE55kdh/P57oKYdX/pHJQ== X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1022; 25:54FLo+uv7Gwr00J8WwiLsHC6W+Z4+d3oBfnBpfZBoWwMKwydFzndF0sbrqO/pL9Dr5H7TiyGfOt2+HiXQjaONjYHmHiiZDK4R7DrcerbqswUwL6XF1ODPURc8jyZcOH1YNcHr8Hc7Rgn9araxaWDPIb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KM9dHTqJlHCA6AnTzsW0cyBBf8PECCS7kIXTRcZLteDtbkWbHnDXx3SuhnRMIDWlAJ8qVhu5vzXcV0jOjC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13017025)(13024025)(13018025)(8121501046)(5005006)(13015025)(13023025)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148); SRVR:SN2PR0701MB1022; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1022; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1022; 4:jz4FxO05DHj+U7ETWVEakpvk4Xf6l/zOdVS/DWfZSN2EH8Fcv9KwAr1uva4YTZyv/q5fUIxgLdbai9MHU7/mL30ZeCbagZONFiDluzrH8fnLkCPOz/n40ZBW5GPYrOC0GvN+qCkdqLLBNCnyRExIl5Gy2l0qML1VnxO9Ae/79NiC5K4NowRl5PZSUST+/1+IPQLtKRFQvAWu8pTLs0UpH5zzYirC/Xd/WjOLUZzZHAF9pr+/p5+MYHJv3W3wZ60dN1T548H/fyAunH+R98sr81LRqmXJNiliGmp89+vy/36zSu25Gy64Wl8vWHLV0Em/3Bcw3srk/6dv5VcfCBwWNOSCyJVqRK5/oPzcvH1+FDM746hSRFD4TCN5srC9Wc2xnOwprEut4pybWljyuW+baWsH7+H2phUOAWe066g/IvVzmfNQHZx4/JR2SOblhMcTPSvcfOHNwZL8M5NYXsemXla799ruGPn74svgJzYv2ycJuZ0jWJ68ACgxB21LKxgn3Zu6i8NoS4sAW3VUwOZiFmzCkdXt0AV9gqTSZwQWAsvauVpIltamJFHTX4RNVxPU5d8aPYYA5oce2BOT50/V2vF42HvATRrcGbWGubjHzZ/9GpkDNHqnCDner73S3POjOO6cKDcH55c/MZPovdjVUxLk3+P8zKK4x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VQfkQ+sTeL1ZdPqWkR4wR2ugVNTNil9lcKCbv0Ow9K7KM/JfqmeAN+LBQ0cvPtfZWsceu1qzD2evam21czERmkLiq6IpUYpNAcwRdkPMXX7UE8bKK83wHcBFzKRrq8zxgkEw==; 5:jTEwNb5+SjjzYKbiIbY1RpTv845eG78xBHyv7sHC0WeJPhfFFDOC3ITG0YXts9Pgo8MZwVFI4v3sJtkD0Wok1kQU6CHY2Xg4jm9vXoXoaITdqu6SeS7tSzqWXMCQyj6ymd6ksXyO0MqrhMUCepiIKw==; 24:lInH6N1eFFcCt8XP3DdZB280fd9lW11pw8fWtFwx9lUdVcY+0iW3EZozIG6XVFpuWDm9aUIKUP+xxn0gmb1XapEvwwZp47klNgELK3e0luI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1022; 7:Gg4q7mCeJ/1oUoj3w2aV49DKDK8UAtiPvujO+YnvE/UqWjU5cXPkEk06A7vpvzAwmM5BOoAxUktcPrrNMhzi0Xc2EeKvly5hUGlH9FieDDTBlLy78Xe0H8zqvUA8IWPuvb7KWffL/VP3J3VEZhXonV1V7uHPjrXmi6OCmnQYNXKm67hzNxC9Nmyjyfxu0n60apGIkdxv3XnrNLS77cIhwnac073mER+iP/lOSvGqh6jEMcRJ1MdrwvvLrt6WJvzeBavo56/1uYTakQIAn0jdypTLgGavWzLqfcKDePaXC/4iYrYOqXLilRDgywOnc4QC3/TcK/pvnh5K+xFrh5p/fQ== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 13:19:49.1826 (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: SN2PR0701MB1022 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 Drop invalid or unexpected FCoE frames that come into the non-offload path since the FCoE firmware would not do the filtering for us. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 7dae915..7d1a953 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2088,6 +2088,8 @@ static void qedf_recv_frame(struct qedf_ctx *qedf, u8 *dest_mac = NULL; struct fcoe_hdr *hp; struct qedf_rport *fcport; + struct fc_lport *vn_port; + u32 f_ctl; lport = qedf->lport; if (lport == NULL || lport->state == LPORT_ST_DISABLED) { @@ -2124,6 +2126,10 @@ static void qedf_recv_frame(struct qedf_ctx *qedf, fh = fc_frame_header_get(fp); + /* + * Invalid frame filters. + */ + if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA && fh->fh_type == FC_TYPE_FCP) { /* Drop FCP data. We dont this in L2 path */ @@ -2149,6 +2155,46 @@ static void qedf_recv_frame(struct qedf_ctx *qedf, return; } + if (ntoh24(&dest_mac[3]) != ntoh24(fh->fh_d_id)) { + QEDF_ERR(&(qedf->dbg_ctx), "FC frame d_id mismatch with MAC " + "%pM.\n", dest_mac); + return; + } + + if (qedf->ctlr.state) { + if (!ether_addr_equal(mac, qedf->ctlr.dest_addr)) { + QEDF_ERR(&(qedf->dbg_ctx), "Wrong source address: " + "mac:%pM dest_addr:%pM.\n", mac, + qedf->ctlr.dest_addr); + kfree_skb(skb); + return; + } + } + + vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); + + /* + * If the destination ID from the frame header does not match what we + * have on record for lport and the search for a NPIV port came up + * empty then this is not addressed to our port so simply drop it. + */ + if (lport->port_id != ntoh24(fh->fh_d_id) && !vn_port) { + QEDF_ERR(&(qedf->dbg_ctx), "Dropping frame due to " + "destination mismatch: lport->port_id=%x " + "fh->d_id=%x.\n", + lport->port_id, ntoh24(fh->fh_d_id)); + kfree_skb(skb); + return; + } + + f_ctl = ntoh24(fh->fh_f_ctl); + if ((fh->fh_type == FC_TYPE_BLS) && (f_ctl & FC_FC_SEQ_CTX) && + (f_ctl & FC_FC_EX_CTX)) { + /* Drop incoming ABTS response that has both SEQ/EX CTX set */ + kfree_skb(skb); + return; + } + /* * If a connection is uploading, drop incoming FCoE frames as there * is a small window where we could try to return a frame while libfc