From patchwork Wed May 31 13:33:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 9757057 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 CD09960390 for ; Wed, 31 May 2017 13:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7BB021E5A for ; Wed, 31 May 2017 13:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBF4420952; Wed, 31 May 2017 13:34:45 +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 1C25C20952 for ; Wed, 31 May 2017 13:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751011AbdEaNeo (ORCPT ); Wed, 31 May 2017 09:34:44 -0400 Received: from mail-by2nam01on0057.outbound.protection.outlook.com ([104.47.34.57]:35328 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751161AbdEaNem (ORCPT ); Wed, 31 May 2017 09:34:42 -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=C29pMFxiq6b5WV2jQUAO7BwOLe8zZbOAXv26uxd9rxA=; b=jE84pIK7Qs7ez5XgpGCwt8rOxhKu2SFy7pLe8H4CwXHOSErKommZQVsdDB/Qmmg+tRotkzYXUlBe4/tyWbz9jHSVsMHuPmRpsF2tOYuTRlOcGJBk52MgEPvvQN6EgDuAvF5EujZgLrKRnAGctAvnHA6YtX5X1bgJtTnLcHH42hw= Received: from DM5PR07CA0043.namprd07.prod.outlook.com (10.168.109.29) by BLUPR07MB419.namprd07.prod.outlook.com (10.141.28.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 13:34:40 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::145) by DM5PR07CA0043.outlook.office365.com (2603:10b6:3:16::29) 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; Wed, 31 May 2017 13:34:36 +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 BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 13:34:34 +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; Wed, 31 May 2017 06:34:04 -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 v4VDY46O016704; Wed, 31 May 2017 06:34:04 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4VDY4NB016703; Wed, 31 May 2017 06:34:04 -0700 From: "Dupuis, Chad" To: CC: , , Subject: [PATCH V2 10/15] qedf: Add non-offload receive filters. Date: Wed, 31 May 2017 06:33:57 -0700 Message-ID: <20170531133402.16629-11-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170531133402.16629-1-chad.dupuis@cavium.com> References: <20170531133402.16629-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)(39450400003)(39850400002)(39400400002)(39840400002)(39410400002)(2980300002)(428002)(189002)(199003)(9170700003)(50986999)(86362001)(76176999)(106466001)(101416001)(2351001)(6666003)(80596001)(2950100002)(36756003)(6916009)(42186005)(33646002)(8936002)(81166006)(50226002)(189998001)(48376002)(105586002)(1076002)(50466002)(356003)(8676002)(87636003)(72206003)(478600001)(2906002)(4326008)(5003940100001)(305945005)(47776003)(5660300001)(54906002)(110136004)(38730400002)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB419; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:7EQp1I1wVFQj9T+JfCPRQcqFANJ86Sv/6KMpEDouoSX4iJ5jBWNd+BhaTOYeBL76H4KPsanZJHd+Rj74NnfhGuFlKOffGrT02G6LjeoR7jntc52b6IH/mRXsat3FVTgD3RvoYdNPtDxf9aqg5zVFRID8dtJY2M4dSWt4zSIbeXeQyWzY1d0NjsWDTBhOCr8pGm+Q94Q0TW9j98oWKbpXtPYeCUuiJ9+mh+s2nKdVgWhn/8EHvRBuFzUAXaLbUIlRQydH4gf2MlFQ6tB6Uvn+OhrMPIBujojiQIEjvJLBrH0Pe8L3DtVLfOOIXkdwbezFkVjV8HFUuiUVWP17OJF02+O5fEVmWhxIged1T+UR4EC2DpLTg+riPzrGKHqJ+BHuOntiu45saaapEmpQ1W6TeivwB38YcclnLlPJ2Us1n/M2i5g76FRR+kx02lounDBxZXb6XmEKTf9a5mPHxyNpuA== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR07MB419: X-MS-Office365-Filtering-Correlation-Id: 7ad63cd8-ba9d-4220-7e0d-08d4a829c766 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR07MB419; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 3:C2UjtWQ50I6pmYM1mf36OrHdSGV2JGNcD5jlS6iSKK8jeHWuopclJwCwAPcTVyqJS6Rth99+UWDNbisDeEWd1Q9H2OKOg8AfI6iUhBegX90m8ODr0zm3SBPllKASiHhv/I/6tADZYTcJ9evfD2N24ocUf5v8KhSTzs3zNxkFEI+EzkchIGzBH1Zh0V444j+qc0LZ1m0CqliRP4Glh6/qENWnAdSwiw5pYPYSdRJGy6NIFw+8+fiV74agPEXm6W9qiyaH2EaF98G4klMDrhuHabiyXykA5GgvwDRTnQpx0aJ/j78zPHXRK3+eUV5ooRVU7I0vu9sbZ2tFJ8IHLoNuQ0H3AbKmxJc9wlfwfrN3rTSBx1pXW5y/z/Quue352X9ppOdnew73/k2RId/mCzCpMN4KD7tAn0lReuHGqFh/GJiKSGRjcPNfNw3It03DICUU3Jo/wyW/hFYHvYfyjh/UjZTZA75G+KXG67fiJEX3LHAx9aCs+1eG6OZofIrotFfV X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 25:L9D28RbKOZ26zBFUsF1wPGJCL08L2R9lx91Cj3zYlL80dcUz6HTtt801A8DH3inarZG2OgaHhKFm/ytFoHyjUeECy8GGAT/Goz0w7g7CJczUE0fyyM05jV38WDi+UL6kwRKKUCJ0ISCcG8B/rOlZ1m9tnGk1IQqEaiR3gKVjH7eYVk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ymGKF3rU8CZigD8b3JzlXFbJy0Iyn2vsSYC37UPzijDJOwA9Lv+bWax3lmnNxhXm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:BLUPR07MB419; BCL:0; PCL:0; RULEID:; SRVR:BLUPR07MB419; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 4:3ru9VAhGdQ4B6AT21/L92bYmPFxXNfiGEd7CIb5qrPrVFwv4wjUf3e5jzE3aBRM7+Hu4iqSrWLd7FlXXnVathH5Asbm3Sm9yzHakI3cy8HTig9d3HA4ABrVcgDTTirm1lmQcAFhcY9da4g2YGsCeXjR1dcGUkS1t7LAgYkz74+edpTIVabOEYWphDNmx5NOw1c7P0htJMhNI+iE4sPWuO5ctOncvBDE9kCf21JvWSnoAt82qIy7mCioM3TY4lAqBXWkAptXNOEl5DJF1ojdrfArLuDGeHvQrBbphYTcmZRS2DbpeyBt1daRJ6fLYqCCi9vk03D6YrVI1HWAoNuTtCIAPTq4uuDYc5BUUsm1wq14Rs+UXWnn9LRtgNWFTj3g14nrPXMARQj9gUoMl2/g9aVCRX2B1OJ37jNxLJ9I4KVDbSVLbdhpb3AlYxIh1yDGW9YzKIy8GiPlbj1tqjZ9B2cmrBHvB+Z8MenMt4bxxeQklpOPqJ+Bn98ku4wN3e8RjZJDuJOcvUEEXjzvwX9J0inyqiWlyCpbFoML7kkJJowzXpa7SIXctYvIyvO8pFg6q7T6M3W1RnR2SixRa/Ext71x+Ad+JG8j6P+0sXPT8DugQIDYpsjpsLL103fm8q7OkQ2dZy2BL2WgWDrymyMrETyVJ8UQCn2mqv0VWr9UoHE+s3+z4vgKqZRG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XUAtkh5HesKdsIAdrBnUHeepuFO2aGl8DzGe2+ib2dhcHaO/EWFnYR/1DkZlQ8OJwySnymz+Ig==; 5:oz5N1BDxbsZdD1I3rATEfNOd8BGR4/IHs8L/fY+bsVwzuUK4Fnf5+li8OgIZEikgaxT2Oj1ifmOEhF5kQl5rpsb5i1vG1uY0USjpDzCtQfc+SNZeLuc7h5tOfqFlLCe6gyi1GZsX2iC+kFyHc+e5Bg==; 24:0Rar0VOWTDrnEVAXDjqpgwuMgGihgzp4vGqIg9/DgHww8KyZiJ2oBCuDHn6btXfGFLHXqzgjbU+kY19ElWevZYQWngSzDsmdfXir2gbisPQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB419; 7:bFwn0W4onqlp2ctDooIm7RBvJqRZcFAsLRdoCPgnzdUP+7DdpGlAbfhwrLrWH/zPJ5OPoIdDUHcVSwOinTwOJhgTrw1HYMRUWJ5AXLwL2f6xC87zdE1RX5LeeVpHFw0VyOJNo7brE8msU28YEq1xaWJZAg1fAlRQd0xVMltmq+0xgSTqcb7ZOs+D9W4S/qdWC/8WcwPrGqjXa296aGjMP3rzdb8SHp7O8iHQwGrC+X8dc475ngt9qh/UG5OIu63ZPaIHgbB2fTDXakn4mSE2fNnTkMC6zKLXtxWQ+ObTh2dwq2U4EShjl6IaGG8l6EyriFCHmJSNA7IPKH7L7/mxYA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 13:34:34.6579 (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: BLUPR07MB419 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 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index d762b9f..45c741b 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2087,6 +2087,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) { @@ -2123,6 +2125,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 */ @@ -2148,6 +2154,43 @@ 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