From patchwork Thu Jul 1 15:47:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Dalessandro X-Patchwork-Id: 12354451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C57D3C11F64 for ; Thu, 1 Jul 2021 15:47:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7EBC6112D for ; Thu, 1 Jul 2021 15:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233748AbhGAPth (ORCPT ); Thu, 1 Jul 2021 11:49:37 -0400 Received: from mail-bn8nam12on2101.outbound.protection.outlook.com ([40.107.237.101]:45345 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233702AbhGAPtg (ORCPT ); Thu, 1 Jul 2021 11:49:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZmfRvKCM1KeiIHElb9GXK/lcwIeT9ySmFC0ktehhq+8pl171jow3uYRz4CjWmRBZsU0triFlNdPRJZ7kGpBp1ZREEJ02RyUviHZpqeZQobGHkHvG93f5G8mcQR7kO+zXpy/OEKbYANcesotskHh1WqcwC2FucxY76yHIBmUyPddsvjfFs1q43BKyL4CmiYJE6vtRN+h/5HutOpbXgQjfErGIPOYJ37LhdjwZg45V5pv2xpqjcBPBsyc5Prt/ANMIF18aHLmD8vbm7IYsnycVbnJfCM9jzQwT7kvJdI1wlmtZjPqq8D9dCkD5enqKcyo9uiBSUPIKHfXeqP37aiulw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fEdDncfcTlCiUO+viW70pS6dpWNyVBoJ9kx7UV0+0gY=; b=FbEWZL35KCXc4c+gjap+4UDni39q90Ul+DscUN+64OMwC4UT1tZDZAWMzp8/bvXLsIuNXrZyWSSQtav5epVC1V8WJi+tmpSUEda+FAm5lZ+c+yWR4o8SHh85i3k7NoJ5sgcXD0N704H1wnzSYSn+rFxanSPLdGLLchUE9J7tmZYomz4AfWe06+2l9WZm58uxHDKaDhVZyHOFs8tfiUKZLP3jO7z5/tpfwcvVYkldTBMeFrIkrttkVznPhGPJ6Q93VBdmcjWqPOcUElYwd9RfL+Z3XNRnK56+WOPhKqaxGqU6WgIYoXsUgIfu6BSTo0a3kvVYWhV6OhGq+Upd9OoW6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 208.255.156.42) smtp.rcpttodomain=cornelisnetworks.com smtp.mailfrom=cornelisnetworks.com; dmarc=bestguesspass action=none header.from=cornelisnetworks.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornelisnetworks.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fEdDncfcTlCiUO+viW70pS6dpWNyVBoJ9kx7UV0+0gY=; b=GuGOfAWX1lFo0qPmFPmWSBYmpaXwm9pnLjMWqY5/DnUrOhRTQnw6aseQVDuGbJgWNmDs4WuBMpMHtcgr8RZ8uyNAOAE5WROF/6h98qhiXe2UCqdTSlCRGBfJ8NEYi0igsWRQc6jldYhXo6e9gOxXsW7XUKFCOK1c/MyFubDCkeafYccUqzSbnMFtCMeLPqKiJQbrMsZA7+RUuxV/nZ7cJ+c3bNQTH6y/MouB3XebpifwlI64kqj1RGtDNwDdmwdzrJw3UBIN716S4aKL8DU68p2om+qhYtvfFdpvg2z0mGUTKPFKDoKtxXOn1BQzEs5BgicY+wFBNPsKBdqIlWF8ZA== Received: from DM6PR02CA0075.namprd02.prod.outlook.com (2603:10b6:5:1f4::16) by MW4PR01MB6242.prod.exchangelabs.com (2603:10b6:303:71::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Thu, 1 Jul 2021 15:47:01 +0000 Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::88) by DM6PR02CA0075.outlook.office365.com (2603:10b6:5:1f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Thu, 1 Jul 2021 15:47:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 208.255.156.42) smtp.mailfrom=cornelisnetworks.com; cornelisnetworks.com; dkim=none (message not signed) header.d=none;cornelisnetworks.com; dmarc=bestguesspass action=none header.from=cornelisnetworks.com; Received-SPF: Pass (protection.outlook.com: domain of cornelisnetworks.com designates 208.255.156.42 as permitted sender) receiver=protection.outlook.com; client-ip=208.255.156.42; helo=awfm-01.cornelisnetworks.com; Received: from awfm-01.cornelisnetworks.com (208.255.156.42) by DM6NAM11FT044.mail.protection.outlook.com (10.13.173.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Thu, 1 Jul 2021 15:47:01 +0000 Received: from awfm-01.cornelisnetworks.com (localhost [127.0.0.1]) by awfm-01.cornelisnetworks.com (8.14.7/8.14.7) with ESMTP id 161Fl0Vl102197; Thu, 1 Jul 2021 11:47:00 -0400 Subject: [PATCH for-rc or next 1/2] IB/hfi1: Indicate DMA wait when txq is queued for wakeup From: Dennis Dalessandro To: jgg@ziepe.ca, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Mike Marciniszyn Date: Thu, 01 Jul 2021 11:47:00 -0400 Message-ID: <20210701154700.93459.5335.stgit@awfm-01.cornelisnetworks.com> In-Reply-To: <20210701154318.93459.18982.stgit@awfm-01.cornelisnetworks.com> References: <20210701154318.93459.18982.stgit@awfm-01.cornelisnetworks.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c230db3a-e1d0-40bb-5017-08d93ca777c1 X-MS-TrafficTypeDiagnostic: MW4PR01MB6242: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Z+bKFibhCn3VZcASsexVIKViy+SuhKX+oWeRXf23i16Bp9KiasQyib8oGb0ZANTXXBeUlfuof1zvj3JROn6u78Hgfiww9vt+lnHnCemvvxm4+c4OlEeczOgzMefh1hL+Cfi5KNDMFzElRZomjEZggEXHDAph/nMFfMS38EoWNSGUUhzkfxmICDqZUC80xedaBluJ1Jyouyf3ug0tQqtFLRgvBQ1J6B4sn4CojUI/NxvzFZ4SqHneUDf/defw5k5ohgKfxP+VXVDOGfJY9ZJDyGj0obxfD3rwRRbRR1voROcFU3I7PuKvVibaGdxrf5VfMgYjScY6B8ihoV4PC+NCkKRvC2nXsOtdCOwCGObntlInxtjVmgRKuDu5R8t/8A5x+YpOIbZaSBWWVBXzT2u1hn4OxCyfXo4VKl+RWe7VKUxWgsBNuZrWBCYpMtnPAIFD829rJ2cfTMctEA+ffM9jSfNrshPsE4iqMzAnmbhAxpNg8+huJG28YfcRu+LuBAVQ9ahVy7oT4hwnlUb1UkYvujGnzX3As6lWPqFDclEMLn7YM/KiI+1qjm4H6biFmNka0uZka88w3TYh2hJ5cJ0gehKISwHxiEBMUcSUiaEwamljdROa/HzCKlVYOThSftUmmR98kBJko1n3Fxjb42rGW55XRxUZTHprPUrdlcjkPxkOEndkCB8sXJ0bCFy/NrJnHku24TondqtR8KjI7KjY7LygbyuIwHt86gdkRF8Pls= X-Forefront-Antispam-Report: CIP:208.255.156.42;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:awfm-01.cornelisnetworks.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(4636009)(39840400004)(346002)(136003)(396003)(376002)(36840700001)(46966006)(1076003)(5660300002)(70586007)(26005)(186003)(55016002)(103116003)(8676002)(36906005)(8936002)(47076005)(7696005)(86362001)(107886003)(70206006)(82310400003)(2906002)(478600001)(81166007)(4326008)(83380400001)(426003)(316002)(44832011)(356005)(7126003)(336012)(36860700001)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: cornelisnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2021 15:47:01.5218 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c230db3a-e1d0-40bb-5017-08d93ca777c1 X-MS-Exchange-CrossTenant-Id: 4dbdb7da-74ee-4b45-8747-ef5ce5ebe68a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=4dbdb7da-74ee-4b45-8747-ef5ce5ebe68a;Ip=[208.255.156.42];Helo=[awfm-01.cornelisnetworks.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR01MB6242 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Mike Marciniszyn There is no counter for dmawait in AIP, which hampers debugging performance issues. Add the counter increment when the txq is queued. Fixes: d99dc602e2a5 ("IB/hfi1: Add functions to transmit datagram ipoib packets") Fixes: c4cf5688ea69 ("IB/hfi1: Indicate DMA wait when txq is queued for wakeup") Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro --- drivers/infiniband/hw/hfi1/ipoib_tx.c | 3 +++ 1 file changed, 3 insertions(+) External recipient diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c index 993f983..e74ddbe 100644 --- a/drivers/infiniband/hw/hfi1/ipoib_tx.c +++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c @@ -644,10 +644,13 @@ static int hfi1_ipoib_sdma_sleep(struct sdma_engine *sde, /* came from non-list submit */ list_add_tail(&txreq->list, &txq->tx_list); if (list_empty(&txq->wait.list)) { + struct hfi1_ibport *ibp = &sde->ppd->ibport_data; + if (!atomic_xchg(&txq->no_desc, 1)) { trace_hfi1_txq_queued(txq); hfi1_ipoib_stop_txq(txq); } + ibp->rvp.n_dmawait++; iowait_queue(pkts_sent, wait->iow, &sde->dmawait); } From patchwork Thu Jul 1 15:47:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Dalessandro X-Patchwork-Id: 12354453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53A59C11F67 for ; Thu, 1 Jul 2021 15:47:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E7FF6140D for ; Thu, 1 Jul 2021 15:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233702AbhGAPtj (ORCPT ); Thu, 1 Jul 2021 11:49:39 -0400 Received: from mail-co1nam11on2132.outbound.protection.outlook.com ([40.107.220.132]:56160 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233828AbhGAPti (ORCPT ); Thu, 1 Jul 2021 11:49:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BcPvyaeXhjm21TZ011rmPIOK+l1pzby5O+nUqXyOYIXbvj8yjny9BC5boYau/tOwAJADRonPdiEO1sUSio0wcuaRq+7Xlnc2ely65ETnw2ZxfBk7HRsT5AWrpXsFZhjXXbcDyTkqt+Is48T4H/QK8QuNdtHilHxFi71y7JeDmhiDB3GyMA5LwgxsuCEyilNbMkOEd5N23p+VSpU8tN1uDwwBEjRD72T1XFM8STpgIln8aBGDRo8+ckcMBXeV7wRAyERSN5RfJ+g2+GUDO7rfV4XCh3ThjHGKYXrzeFOxm2vjckTb3/wN+8z2GRmq7FhBm3YXtgaCz5O5THYLs7YGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oLKzO6hAZuCarD9+VYB0YruqudUKlW2Rbuh00GfOFtY=; b=BiTJnlgTemEbeiivdtORfLDSsofVGMdwzdOV++hqoQE3NT2Xdba3DEpt1wKLCYZbIS2fYx6MTaF4xV88eLBTKn2Og9DxrIteNEfwWa+H8syTZQFJCs+awaR1/qAR8zbuu0EzsiI16WLKW1fJbLo1/ZOf2Iy5IStWOt8nql+D+jD1fnBcwaESFgzxOoYXJzFyoww+Eg9mgP3+Ue+k6OUrDhN6qHrfri2o2yUKMoXo/ZCMqCD8o3TsuAnifuFhliME11bpeN243INkF56PW+/ff/wCGSk/EGc6Gomj3m27H+r/8mjWjlLGZGZTQDS3ycQbrcuI8G0daRO8UQV6TtuTkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 208.255.156.42) smtp.rcpttodomain=cornelisnetworks.com smtp.mailfrom=cornelisnetworks.com; dmarc=bestguesspass action=none header.from=cornelisnetworks.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornelisnetworks.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oLKzO6hAZuCarD9+VYB0YruqudUKlW2Rbuh00GfOFtY=; b=Svqc4mTqzbeHauOd3NDJrO5ls6KRTHQMm+ulW06sGmNm8gjLCCkWdfPiZympCOi4o4KOWeWJdM8rNt6+fSH4YbO5Eprw1jW7IIpsMGAZCv87kM0NZZwdJwuCbckiQpnDlQD+Ac8b/vqBl5wuDUJ68DscePiU5GtRABZUzWwsSePrB40tySjDYDuUSM62HXPnrQ+qUbH0YYnx1p9Wx4CHrcI9SqZq1BoRgSrtS/d6pzNtBQB1aRgKybCwl9nIikmh6OjPjjeTE2U/1JpE+D0UzbIENPVLcvRTnlwcZBO+/IHM5M+zre028y4hQdiCLzACd94o+/LSItBIdPpkE+EFVg== Received: from DM5PR15CA0059.namprd15.prod.outlook.com (2603:10b6:3:ae::21) by DM6PR01MB5098.prod.exchangelabs.com (2603:10b6:5:5c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.26; Thu, 1 Jul 2021 15:47:06 +0000 Received: from DM6NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ae:cafe::47) by DM5PR15CA0059.outlook.office365.com (2603:10b6:3:ae::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.21 via Frontend Transport; Thu, 1 Jul 2021 15:47:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 208.255.156.42) smtp.mailfrom=cornelisnetworks.com; cornelisnetworks.com; dkim=none (message not signed) header.d=none;cornelisnetworks.com; dmarc=bestguesspass action=none header.from=cornelisnetworks.com; Received-SPF: Pass (protection.outlook.com: domain of cornelisnetworks.com designates 208.255.156.42 as permitted sender) receiver=protection.outlook.com; client-ip=208.255.156.42; helo=awfm-01.cornelisnetworks.com; Received: from awfm-01.cornelisnetworks.com (208.255.156.42) by DM6NAM11FT021.mail.protection.outlook.com (10.13.173.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Thu, 1 Jul 2021 15:47:06 +0000 Received: from awfm-01.cornelisnetworks.com (localhost [127.0.0.1]) by awfm-01.cornelisnetworks.com (8.14.7/8.14.7) with ESMTP id 161Fl6L1102418; Thu, 1 Jul 2021 11:47:06 -0400 Subject: [PATCH for-rc or next 2/2] IB/hfi1: Adjust pkey entry in index 0 From: Dennis Dalessandro To: jgg@ziepe.ca, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Mike Marciniszyn Date: Thu, 01 Jul 2021 11:47:06 -0400 Message-ID: <20210701154706.93459.5955.stgit@awfm-01.cornelisnetworks.com> In-Reply-To: <20210701154318.93459.18982.stgit@awfm-01.cornelisnetworks.com> References: <20210701154318.93459.18982.stgit@awfm-01.cornelisnetworks.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d87e798-5afb-401d-7eaf-08d93ca77ae7 X-MS-TrafficTypeDiagnostic: DM6PR01MB5098: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wQCWsunTq3BjYXakXbxVQfVOzbYSooQ4/pEOUzpVNkyjrBpVmNRtZKgqdiF46PT1Af/iuIvSsr+H5GHAod0EJHO8xUnJrcWVl85BlrvUm9mHqBPBmwB0/Nd1gvaJJqzCEffan7vBSpsIvdgRdH6aCbDx3bf+pIgsg8uyjqVdYrXXd7DvmaZ4Y58sQ4ust+VXuPHMJrJozWRmhZt6jBoPnlMpLySDd98L7LgN1MBdNwi0fjKTUfwy2Wf/koRxt65PVUyULMr666HKLvwLouZB7kSaXE4O8ah5Z8h0fK/P8gOHvfkSjB2IOcPxmgN7wFz4aiDsqqP8mUBwzkgJQOG8blZy/Hm6WD3MVP0bfbxwMrSgjvR+CtB+N0t/XYU01U3lpYh91Bb1aCtTx90kmt6NiQXe10opufqhgjSBjr2mubajF/RGgD0T++mlt6b+/QseW5Bx8eR5bBfyuzB07ssGU8hnbK73DGJbS3WS1QHh4TOOuzmOmM00Wb35IX+mk3JUbWrTJo9UFoEKAb7NWXZ3bh9U/o/9Ifyf9B5Un9R9CColwqp16TV82kLSrtBseU8GBYE4uQMgOAF4mGDKwM4Jl5+53YnsFpiUiZAuuWgMrzWHjJLgw0esfIz6+HshtE1lYWQbjnDW7jboV8ueh0h+4baVkc6VVPtzOgoit00jVmwVzKRbTe6jpgUehbZzXS2bvg6oh8a3evRCYbEVFbE4v2k5A3nS19NJYTp7+A2Jays= X-Forefront-Antispam-Report: CIP:208.255.156.42;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:awfm-01.cornelisnetworks.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(4636009)(136003)(376002)(39840400004)(346002)(396003)(46966006)(36840700001)(26005)(70206006)(186003)(7696005)(70586007)(81166007)(5660300002)(1076003)(55016002)(478600001)(107886003)(4326008)(2906002)(316002)(103116003)(8676002)(47076005)(7126003)(426003)(336012)(36906005)(83380400001)(44832011)(36860700001)(356005)(8936002)(82310400003)(86362001)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: cornelisnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2021 15:47:06.8002 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d87e798-5afb-401d-7eaf-08d93ca77ae7 X-MS-Exchange-CrossTenant-Id: 4dbdb7da-74ee-4b45-8747-ef5ce5ebe68a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=4dbdb7da-74ee-4b45-8747-ef5ce5ebe68a;Ip=[208.255.156.42];Helo=[awfm-01.cornelisnetworks.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB5098 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Mike Marciniszyn It is possible for the primary IPoIB network device associated with any RDMA device to fail to join certain multicast groups preventing IPv6 neighbor discovery and possibly other network ULPs from working correctly. The IPv4 broadcast group is not affected as the IPoIB network device handles joining that multicast group directly. This is because the primary IPoIB network device uses the pkey at ndex 0 in the associated RDMA device's pkey table. Anytime the pkey value of index 0 changes, the primary IPoIB network device automatically modifies it's broadcast address (i.e. /sys/class/net/[ib0]/broadcast), since the broadcast address includes the pkey value, and then bounces carrier. This includes initial pkey assignment, such as when the pkey at index 0 transitions from the opa default of invalid (0x0000) to some value such as the OPA default pkey for Virtual Fabric 0: 0x8001 or when the fabric manager is restarted with a configuration change causing the pkey at index 0 to change. Many network ULPs are not sensitive to the carrier bounce and are not expecting the broadcast address to change including the linux IPv6 stack. This problem does not affect IPoIB child network devices as their pkey value is constant for all time. To mitigate this issue, change the default pkey in at index 0 to 0x8001 to cover the predominant case and avoid issues as ipoib comes up and the FM sweeps. At some point, ipoib multicast support should automatically fix non-broadcast addresses as it does with the primary broadcast address. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Suggested-by: Josh Collier Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro --- drivers/infiniband/hw/hfi1/init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) External recipient diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index 0986aa0..34106e5 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -650,12 +650,7 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd, ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY; ppd->part_enforce |= HFI1_PART_ENFORCE_IN; - - if (loopback) { - dd_dev_err(dd, "Faking data partition 0x8001 in idx %u\n", - !default_pkey_idx); - ppd->pkeys[!default_pkey_idx] = 0x8001; - } + ppd->pkeys[0] = 0x8001; INIT_WORK(&ppd->link_vc_work, handle_verify_cap); INIT_WORK(&ppd->link_up_work, handle_link_up);