From patchwork Tue Sep 19 17:26:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 9959771 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 A6BDA60568 for ; Tue, 19 Sep 2017 17:27:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E6C727FBC for ; Tue, 19 Sep 2017 17:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81F7D28543; Tue, 19 Sep 2017 17:27:28 +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 5525D27FBC for ; Tue, 19 Sep 2017 17:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750892AbdISR1Z (ORCPT ); Tue, 19 Sep 2017 13:27:25 -0400 Received: from mail-by2nam01on0086.outbound.protection.outlook.com ([104.47.34.86]:34250 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751284AbdISR1X (ORCPT ); Tue, 19 Sep 2017 13:27:23 -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=kocWpFEvhqyeju0MAXX65aCKTQTwd01oXMmFd95IYC+aX5IIh6myAeRgdRkjVvJBz9Tf1ND72FLfkSSWcFwiF+CaxkMih0GUN3iv8NzHqpmUfnKENa+/SFau33C4YWqJnsKmeh4YzjsnHKuMCMvyphsZKOq4SexaGwos76fYiD4= Received: from CY1PR07CA0035.namprd07.prod.outlook.com (10.166.202.45) by BLUPR07MB482.namprd07.prod.outlook.com (10.141.203.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 19 Sep 2017 17:27:20 +0000 Received: from BL2FFO11FD056.protection.gbl (2a01:111:f400:7c09::168) by CY1PR07CA0035.outlook.office365.com (2a01:111:e400:c60a::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Tue, 19 Sep 2017 17:27:20 +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 BL2FFO11FD056.mail.protection.outlook.com (10.173.161.184) 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; Tue, 19 Sep 2017 17:27:19 +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; Tue, 19 Sep 2017 10:27:17 -0700 From: Michal Kalderon To: , CC: , , Michal Kalderon , Ariel Elior Subject: [PATCH net-next 1/4] qed: Add iWARP enablement support Date: Tue, 19 Sep 2017 20:26:16 +0300 Message-ID: <1505841979-26365-2-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1505841979-26365-1-git-send-email-Michal.Kalderon@cavium.com> References: <1505841979-26365-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)(50466002)(77096006)(76176999)(107886003)(305945005)(50986999)(101416001)(4326008)(105586002)(69596002)(48376002)(81156014)(8676002)(2906002)(47776003)(104016004)(5003940100001)(81166006)(356003)(50226002)(106466001)(8936002)(5660300001)(478600001)(72206003)(316002)(189998001)(36756003)(575784001)(86362001)(16586007)(110136005)(54906002)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB482; 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; BL2FFO11FD056; 1:B1oefVo1aEkCuH5czAnLhoSCwYxjOALpWzie/7Dt2yDvOvBu5MJ7+oMi4ERujkxxHuZukHUfcpy8e1uHSFfCAwPsZde/BRmxFDhr65iUvUjlR5g7x2b72SbyRnku+GOm X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa0759e0-9af2-482a-dabf-08d4ff83ae9c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BLUPR07MB482; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB482; 3:8xN1WOgv4gBreepeQlu5UxSsLTTqPT+2p6tcoH8c1+/lPhMrnpVlCVVxqqlWnX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/A7ixe+t1IgD/OcDDNxJI3xdfQ7AQ/TOND4494FHDBwT3x1bTh12KGecvOmB47bfnQncEYyew8w4i5sMuJhgsiqkD+1cbAMJcpDD3HKrQXjMFsU6FPqqrIsM2X/E7eSFNIl/5pSqN7u/P+gqth1fmPpypFmiZC1zZHLRftf/hsFQ9OoNF3dbdUniRNrqlcDIz/QkY4atcf58aS5HbQMCH8xmDWh9ShTnsxrc5QO9p6PlfKDGkEUICtdz+Ccb7XxVUtSjDQzlhgkjPlKX+DUS+qwRThiQUkyU3bNZyMfyHO9hMMo+YWK1VW1ESEGG7EalrzWRj3VIU8JS1UdkdNDo3VOV0DRR/ofdr4rotSkw0nOrdgmpWZG0xGEFVmxp9eiYAzAA4fj+i 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)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR07MB482; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR07MB482; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB482; 4:kwvx7V6Op7ClU2+U0RADqAt1tGBZrWhfvClzTQqBUIixFja1rXprtzDNieOjTqqqaT39kWJhgLAzQZaAYzxheJvFR4va3QyPTGOJXCZ4Omi7sujaiu7EqlHHPa17l+HcnMkMkqxGyLUs1KUnHsQ81p69nUGWEikBKswW8Seic0088BdZp9Pw2n+r3P9gHFoCwQskFC8fNaJPuXTncBe++AJONobPpjyPoqFkmaKXGPC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yzWqY0CIDw4PKucjHzBjdDbphjJ6qLEUll225VAz2U3tr3mKQ25U1wIkieIthIfOAA1GKEvS1ovCEY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2017 17:27:19.7808 (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: BLUPR07MB482 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: