From patchwork Sun Sep 24 09:09:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9967851 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 95291602CB for ; Sun, 24 Sep 2017 09:11:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83B3F28966 for ; Sun, 24 Sep 2017 09:11:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78A0228E02; Sun, 24 Sep 2017 09:11:19 +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 BFB9628966 for ; Sun, 24 Sep 2017 09:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbdIXJKT (ORCPT ); Sun, 24 Sep 2017 05:10:19 -0400 Received: from mail-sn1nam01on0069.outbound.protection.outlook.com ([104.47.32.69]:26767 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751630AbdIXJKR (ORCPT ); Sun, 24 Sep 2017 05:10:17 -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=WUTXMx1N7UXUYSCVhVYz11OaeC86aEmOd5To36UcV7Q=; b=Fglf/oIvmvYneJPTu5N2AjiWn8C1HRqRaImVfRZLuswbUiMuuJSGQqduIrOFUZsLnyHpR4rG79128344Vql1hJqYnsVbf1eVhGIEcyYrzPFkxW5P/4Wa6JogMv9NovSqrfs0A1AwMF4jqcoGcRyk2t/NPfID0O6Q3+5n+g5mjn8= Received: from SN1PR0701CA0005.namprd07.prod.outlook.com (10.162.96.15) by BN3PR0701MB1122.namprd07.prod.outlook.com (10.160.114.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sun, 24 Sep 2017 09:10:15 +0000 Received: from BN1AFFO11FD010.protection.gbl (2a01:111:f400:7c10::110) by SN1PR0701CA0005.outlook.office365.com (2a01:111:e400:5173::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.8 via Frontend Transport; Sun, 24 Sep 2017 09:10:14 +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 BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.35.14 via Frontend Transport; Sun, 24 Sep 2017 09:10:13 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Sun, 24 Sep 2017 02:10:10 -0700 From: Michal Kalderon To: , , CC: , , Michal Kalderon , Ariel Elior Subject: [PATCH v2 net-next 1/4] qed: Add iWARP enablement support Date: Sun, 24 Sep 2017 12:09:42 +0300 Message-ID: <1506244185-2129-2-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1506244185-2129-1-git-send-email-Michal.Kalderon@cavium.com> References: <1506244185-2129-1-git-send-email-Michal.Kalderon@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)(346002)(376002)(2980300002)(428002)(189002)(199003)(77096006)(106466001)(8936002)(2201001)(48376002)(50986999)(8676002)(104016004)(101416001)(76176999)(105586002)(81156014)(2950100002)(189998001)(6666003)(305945005)(81166006)(47776003)(5660300001)(2906002)(69596002)(316002)(107886003)(5003940100001)(16586007)(54906003)(110136005)(50226002)(478600001)(72206003)(50466002)(4326008)(575784001)(36756003)(86362001)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1122; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD010; 1:8naBRLnXJ3+7JNZdfvB255qjF6Ba1Vui/n1jDKwWuWPCLxtsmSKtLgqMvJ2WmIXlLCcZjkCed+GUGpQ19zuzEAoubkbOQ1sEjn+cHeRS2+DrLZumL1YB7tX4h1CF/Enw X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 25ea0152-0e18-4b88-c3ea-08d5032c1104 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN3PR0701MB1122; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1122; 3:x8MqsrryDf8rFHrOCqCP/qc64fziFYcAyPVtK+yfENXlMIYU0Lr2jSAFDruFqAEOzCkL5wHuS1pYTx5Pbu9Jp5NkbJ295fRhb1+iY1xc3KUCyGWODsUTm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lJ5sbD9w8KN5CIsRyX85g0V8dVeQ9w4gTfNqrllBTC63ZWXQLZlKJGWpjVe4f/ve2AslmyATVD2hApbm5Jrp9G0SCsuloHaSvE4m4VUHpB8g4L1HO713s/IPNqYe0hLD5/BNjGVh2eL8NxSbQr5qTI5HKRvqHv+KT9pMQgCeDNCuc809WH984NeK/K+0nhevzYfqs5m0E/hsmLWl7AqxsRzR2nnufsDvguDdPUqnYhAERMb3lfezNbJw0cgJ7Z6C2aYgA5/QZoRXHwaN+FN6HMGKk+DewR7s4y+oMZU5wnvnJKyfp3CiZJbanZi239HAJS368nk; 4:MnQ27aSjSMrfaKoJfJ4yFHcY7CFwNwNEsRjSDhNu5Ohw/g8+lNtGTFFUtBHBpUbX5WQBQYPY9mBamFmIutMDCaaOccMRc5uLcof/fZO9DPYQPHI61+ZzY/pxioYEDJBkrx07oX+spBR8LbAOtYQPbb70FxfKwRcjtegkknj2gPRFPFSuKDZsm5S23wYrZtmfz10wlI2/HhP9SkN6i7jRNDhWjMPYboS01l0v8aM9jdX7ujyi3eIK3Lkpo+2LHfSL X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123558100)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0701MB1122; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0701MB1122; X-Forefront-PRVS: 0440AC9990 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1122; 23: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tOWLmETiAcarSUZOmY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2017 09:10:13.8330 (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: BN3PR0701MB1122 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is the last of the initial iWARP patch series. It adds the possiblity to actually detect iWARP from the device and enable it in the critical locations which basically make iWARP available. It wasn't submitted until now as iWARP hadn't been accepted into the rdma tree. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 6 ++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 10 +++++----- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 5 ++++- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 1 + 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c index af106be..afd07ad 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c +++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c @@ -2069,6 +2069,12 @@ static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn, num_srqs = min_t(u32, 32 * 1024, p_params->num_srqs); + if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) { + DP_NOTICE(p_hwfn, + "Current day drivers don't support RoCE & iWARP simultaneously on the same PF. Default to RoCE-only\n"); + p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE; + } + switch (p_hwfn->hw_info.personality) { case QED_PCI_ETH_IWARP: /* Each QP requires one connection */ diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c index 376485d..8b99c7d 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c @@ -1691,12 +1691,12 @@ int qed_mcp_get_media_type(struct qed_dev *cdev, u32 *p_media_type) case FW_MB_PARAM_GET_PF_RDMA_ROCE: *p_proto = QED_PCI_ETH_ROCE; break; - case FW_MB_PARAM_GET_PF_RDMA_BOTH: - DP_NOTICE(p_hwfn, - "Current day drivers don't support RoCE & iWARP. Default to RoCE-only\n"); - *p_proto = QED_PCI_ETH_ROCE; - break; case FW_MB_PARAM_GET_PF_RDMA_IWARP: + *p_proto = QED_PCI_ETH_IWARP; + break; + case FW_MB_PARAM_GET_PF_RDMA_BOTH: + *p_proto = QED_PCI_ETH_RDMA; + break; default: DP_NOTICE(p_hwfn, "MFW answers GET_PF_RDMA_PROTOCOL but param is %08x\n", diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c index 6fb9951..06715f7 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c @@ -156,7 +156,10 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn, return rc; p_hwfn->p_rdma_info = p_rdma_info; - p_rdma_info->proto = PROTOCOLID_ROCE; + if (QED_IS_IWARP_PERSONALITY(p_hwfn)) + p_rdma_info->proto = PROTOCOLID_IWARP; + else + p_rdma_info->proto = PROTOCOLID_ROCE; num_cons = qed_cxt_get_proto_cid_count(p_hwfn, p_rdma_info->proto, NULL); diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c index 46d0c3c..a1d33f3 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c +++ b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c @@ -377,6 +377,7 @@ int qed_sp_pf_start(struct qed_hwfn *p_hwfn, p_ramrod->personality = PERSONALITY_ISCSI; break; case QED_PCI_ETH_ROCE: + case QED_PCI_ETH_IWARP: p_ramrod->personality = PERSONALITY_RDMA_AND_ETH; break; default: