From patchwork Mon Mar 5 08:50:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 10258399 X-Patchwork-Delegate: jgg@ziepe.ca 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 2A91D6037E for ; Mon, 5 Mar 2018 08:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19FFF2899D for ; Mon, 5 Mar 2018 08:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E9BC289A5; Mon, 5 Mar 2018 08:51:20 +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 73CC42899D for ; Mon, 5 Mar 2018 08:51:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932868AbeCEIvS (ORCPT ); Mon, 5 Mar 2018 03:51:18 -0500 Received: from mail-bl2nam02on0071.outbound.protection.outlook.com ([104.47.38.71]:63616 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932872AbeCEIvR (ORCPT ); Mon, 5 Mar 2018 03:51:17 -0500 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=fbI2j1gNFmSjXNOvs5hcspiOJc12shcX5y0IHF17ElQ=; b=F0Uo+1mlY/F33+eupmkX/OoP21+5/Yx13WK9JS1TXnKI6CQ7XyAU/2dIugu24ebqb6Vc+Sy+u3ztejD2v3Fc7s/Isp/77DNOTgqj1XxGdopu8UW5hwRzO4nicZa0ZyiKiHpg7wmElwxkVoEhMnaQqde0+G47MmqmkWeylmZkZKk= Received: from DM5PR07CA0046.namprd07.prod.outlook.com (2603:10b6:3:16::32) by DM6PR07MB4219.namprd07.prod.outlook.com (2603:10b6:5:bd::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 5 Mar 2018 08:51:15 +0000 Received: from BN1BFFO11FD029.protection.gbl (2a01:111:f400:7c10::1:175) by DM5PR07CA0046.outlook.office365.com (2603:10b6:3:16::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.548.13 via Frontend Transport; Mon, 5 Mar 2018 08:51:15 +0000 Authentication-Results: spf=fail (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: Fail (protection.outlook.com: domain of cavium.com does not designate 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.527.18 via Frontend Transport; Mon, 5 Mar 2018 08:51:14 +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; Mon, 5 Mar 2018 00:51:12 -0800 From: Michal Kalderon To: , , CC: , Michal Kalderon , Ariel Elior Subject: [PATCH for-rc 3/5] RDMA/qedr: Fix iWARP connect with port mapper Date: Mon, 5 Mar 2018 10:50:09 +0200 Message-ID: <1520239811-10934-4-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1520239811-10934-1-git-send-email-Michal.Kalderon@cavium.com> References: <1520239811-10934-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)(39380400002)(376002)(39850400004)(346002)(396003)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(305945005)(106466001)(107886003)(2950100002)(6666003)(356003)(4326008)(69596002)(47776003)(86362001)(336012)(85426001)(2201001)(5660300001)(48376002)(50466002)(2906002)(36756003)(105606002)(76176011)(51416003)(8936002)(186003)(77096007)(478600001)(316002)(72206003)(16586007)(104016004)(54906003)(110136005)(26005)(8676002)(81156014)(50226002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4219; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD029; 1:bBL+72kp7aram7e8Pt0+fQl0a/pcVEsujNqm24+Q8Ysavv0iolcyKmCyq2ZGRybA6S4kx408CT0yreHriqXLRGpcYulqTxO1s1jL4TEAkH3FcBIMvOT35KxSczrTmhCU X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d06abc1f-67a4-4de5-97dd-08d5827640ec X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:DM6PR07MB4219; X-Microsoft-Exchange-Diagnostics: 1; D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AxDHTAgbmcoqq0eC9PdicQi4PiQAJTg6uHABgCp3EWXCvYZhOz5w2LhCLj8F82hIx6hr36VehTf8o1y8nIjy/aGY4pd/MxAKq1r0h/k41K0OFClgCdfXER7CllspcSF2KTrDZ/pudLLS47/hv9fDikOCt+yrwyF5Y73RPT3MmdI9Rm/deLPcWSeKWtCOg99+I/arxXvvubeJ6AQHg2rL6Kr/Bb33HtOvo3ifMer2m+eZj3oGUqey0/z0FQ6RJEnRFEFUpWOg6YejbSWJLtj4FCnqLo4aBRYDWgSQ/dCrS/reonNoKshgp5Ypq58FHs1Ebbda6rKsUcXAP8gRwvUFuKydORW6OMmnf7IdWzC1z1ZD81nPtttaNur2AtFm88/FV/oT6msjriU2X02GHCDTukVWLWVq0rhfT91mELhGAbHUkalHJ5aWUuFQ4vWze1a0VvmuHhY8NXI3lQEBmApPNlpfLjWKkat X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM6PR07MB4219; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4219; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4219; 4:wDOIhmbuvsQx7/ZhwSwszqahYDLwGP0pOU2JsOBhMfUNWjVEjYOuBe9PXcHJtjoZxL1gmkw3wtUm71WPausk4Malk9fpKRpydjKM8eDunlqFy49rtrjXmr5OORaFCfoAx2VShD0F6rv3yoXkC/Xyif+kKtP4bFEFRybKccgRnkDmEB+RcTfMUZb0dXnIWB/Jb58HaxyqhQWKeGuvmWKywA8VYjzSazt00KYoe8MC535OYAJfaHCL/OSs9AwBp77IycyBmJNvXvzu/TLXTvY9QoQP+k5MpwwjEaBfy/EbaqCbNeJVgjVmACK4ianePbF7ZL8vO4wOe3TBlq6mUljt6oSud80JT1/3mVhUTFqTCH0= X-Forefront-PRVS: 06022AA85F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4219; 23:/kcerYW2UrNLjWn8k0rUgR76XwTAtnycFF1r0cIxA?= =?us-ascii?Q?K04TzViZsnuv/3JSz4TG2TOsTZFmA5TL965GiEQNbHF/nzGDFWDjkGmETcMq?= =?us-ascii?Q?hSCHjD+6maRfgMCb9ABmKDTgbeB/ULuMV/LG0M420Ha3xfmh/0YXVo3enXx8?= =?us-ascii?Q?/kRKMi8gocZADbf0G0sUvFgoz8WaSy3mNM29udBFZsHho6lWl8R/gVKEI9hx?= =?us-ascii?Q?ye6VZ5dTkDOQtuEXpXN1bGCgUvypWLwqTY13smow1nHnAHNxjZ9odWZpZ9GK?= =?us-ascii?Q?Qq1rP7pW4c8QlYCBvH0zAJdYhmJAyVoQe6woiXZW2PitS5u+rPu+pUpLmKJC?= =?us-ascii?Q?loTauDqGZoj8UfNrRztepQ8y1bcqtjEpPppse1tsMMfjg4pw2qYnC/SssOee?= =?us-ascii?Q?NlzNy0rFBM55n55u/djgIybYcc9sx6HiL6giJXypIxRQLxBBmnnpdFM+mGd8?= =?us-ascii?Q?5AIl6AZs43Z6V0RdkXGnI40nrIGzLBqiSD6SsdvEv4MKTUWDs6TbB/mi0kUD?= =?us-ascii?Q?kKKu4GdxmUaQIu+ImJDiWC9S7ta4mbhvyNK+jU8c/Vq7DWbfaDVm5RtqkmE8?= =?us-ascii?Q?gqNzF08jczwKTJLmQ+ugs9AzCuR3h2pP1gBuuU2WHkbAyoyR3rGZTMRI0voq?= =?us-ascii?Q?VFhc3ir9TdRga+/ChaBnpu9iQ0TXzk73bXkHylt1vjMsQAKem+BMbrPviCU4?= =?us-ascii?Q?kSSrxtRM9iaL4NEniMIijyEStVZahNT70DA5VhgzN/pQ++mrE7CkddD6hMyH?= =?us-ascii?Q?0lXlIrSOuDzNRB5f9aBU2QtyEGOD2GQhKy5GJ8/IvOraAsceIrw680+9vhv9?= =?us-ascii?Q?mCxtSYKwb6pAy+djV2iPLifDquSMRSR9fwe9cSB1vwRa/n3CuJIvRqx62ATm?= =?us-ascii?Q?KgSCORrEq6hrJAzN+51GhEtIAEvQehMmNA5rpOKMPuWcld4l+q7UmSK5EIZc?= =?us-ascii?Q?btS0kdJrWDA9z4CrFimA7br6+7HjezX8UNbohBUOP4ly/L0GtXvxESwOegaL?= =?us-ascii?Q?Q0uWY0tMx9KzbpdlO9aCiwrhQQ5FmkdhtGTKjqmRvfinxKe3J0pPWLmwGeRA?= =?us-ascii?Q?LLTRQryEtnw47bOgFtXStmWdXYZMk7mhbkv++HzSwE7inxGZQ=3D=3D?= X-Microsoft-Antispam-Message-Info: 3VSBcRv8No2paEHNlrNHTHMpzNbe+gSMKtpxi0Y01oY053AVOIOiQ1VnSMDETdIyW8FbxgVxztXnOzk1szNMj+qx/IA2+0vs1B7wd+2ffQW4CMcMDEW1d1D0abcO9lmF6YmYIW5nDU0OwsPVEe049PH7m+AHDcDtmrU+QfSE//zdEziFvgcv0hCckK2VW2qR X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4219; 6:1l4RzgscnNNoYDmnAE+wT//7soGoNu2mr/WnNCQ/pOt2BV4ZWt5ymR192nmhm5V1lcB9PXpjlEqu/bukoq+bqk5KBEPv8JWyPgtI03mve2azWQJH1oDlP9RNChnNiHauBg884Dpf670jbb9m+hyzi9++5wQIp73aHj85ycVCpy2zWVEa5CfjlhWEbMEdHoYAPz6R8oX7Jt6jPTBfuzuln29KcTkf49BdfDrlB/TivaSVCXT8/dGpPY9UlKUY57cYpHbTP1s21+6TweEb+dgUhULgcHpJ1w12srDT5PRd9cXmXkvoQlu20fcTJ+hVsWBv9iyY9eJ02OUVHKzCb/NallRykJrVo4PWv4vdIOoXQXA=; 5:Sn4xFwRf9EoE33WctH4ESU003F5hZD4d94ovTongH3SQsEedfATlqUjRWkzgtI5cY1uZ18bgzVf6LtFtMBY7R/q7YrTybdy8ybTQO9xVHQyHQFolTJLh0a7j878o08wI23gXQH6P5eCNTmqIVe7LKCcK11H63pSSswaz2l3ctLU=; 24:ChXFrr5ypezzuRmMMjx/pmj7iAYKymRsyqvXt6JhSbUp0SZuuJ91jDenlajkXgRjgqcjvi7GhqSx0KnDjhephlV4KwDj0DNJDQpj2eGLEBs=; 7:rwn3ZfEeCXKpt48lwu5o7h/cCurNktA1UAw0GuMLeGrzVO5A5J444COo8Oxe2VuMYym5+aM8hxSgaUVEvx4L/UqdVCAQbRjojx4K2m3fSA0vPF5gC/Yx78FpgL38g1DBU6fGDMcDkg5m0pswF6ERRMGlMHVchcLGSlkQGXckHvkwozIuzJokSttYV6H9VjddTrHt4/JuxuYyLIBxS82/Jo6gcq5ZydYM+1Oy3vZTqyKxptEnJpGMo77uA92eL4HN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2018 08:51:14.6360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d06abc1f-67a4-4de5-97dd-08d5827640ec 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: DM6PR07MB4219 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 Fix iWARP connect and listen to use the mapped port for ipv4 and ipv6. Without this fixed, running on a server that has iwpmd enabled will not use the correct port Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c index 1a3f87b..3ed5b13 100644 --- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c @@ -493,10 +493,14 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) qp = idr_find(&dev->qpidr, conn_param->qpn); - laddr = (struct sockaddr_in *)&cm_id->local_addr; - raddr = (struct sockaddr_in *)&cm_id->remote_addr; - laddr6 = (struct sockaddr_in6 *)&cm_id->local_addr; - raddr6 = (struct sockaddr_in6 *)&cm_id->remote_addr; + laddr = (struct sockaddr_in *)&cm_id->m_local_addr; + raddr = (struct sockaddr_in *)&cm_id->m_remote_addr; + laddr6 = (struct sockaddr_in6 *)&cm_id->m_local_addr; + raddr6 = (struct sockaddr_in6 *)&cm_id->m_remote_addr; + + DP_DEBUG(dev, QEDR_MSG_IWARP, "MAPPED %d %d\n", + ntohs(((struct sockaddr_in *)&cm_id->remote_addr)->sin_port), + ntohs(raddr->sin_port)); DP_DEBUG(dev, QEDR_MSG_IWARP, "Connect source address: %pISpc, remote address: %pISpc\n", @@ -598,8 +602,8 @@ int qedr_iw_create_listen(struct iw_cm_id *cm_id, int backlog) int rc; int i; - laddr = (struct sockaddr_in *)&cm_id->local_addr; - laddr6 = (struct sockaddr_in6 *)&cm_id->local_addr; + laddr = (struct sockaddr_in *)&cm_id->m_local_addr; + laddr6 = (struct sockaddr_in6 *)&cm_id->m_local_addr; DP_DEBUG(dev, QEDR_MSG_IWARP, "Create Listener address: %pISpc\n", &cm_id->local_addr);