From patchwork Wed Sep 20 10:37:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9961265 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 91169600C5 for ; Wed, 20 Sep 2017 10:37:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 813E928FD3 for ; Wed, 20 Sep 2017 10:37:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7562328FDF; Wed, 20 Sep 2017 10:37:34 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 EA07528FD3 for ; Wed, 20 Sep 2017 10:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbdITKhd (ORCPT ); Wed, 20 Sep 2017 06:37:33 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33814 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbdITKhc (ORCPT ); Wed, 20 Sep 2017 06:37:32 -0400 Received: by mail-wr0-f193.google.com with SMTP id k20so1247034wre.1 for ; Wed, 20 Sep 2017 03:37:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Kfx+bXY7gSvad/uHgAdrUBCXKYPQD6UoGNueyzxNaXY=; b=jKPbgYROOhTIJiEaCKKS92rC+5iiWw1zUKqPXRtfQOx66qZuWecWs5H/MnLERko3+M WyCeQg2o3drMdwAyUyXBwOjrF+2ohn27gA8q2h9vv6DAx54TT+XWCOGZqPCP8DFfO3OF HYLsW5RO2hZbs+DvYc8fMroRvBGP1Xb7L1PegHXuEe1B/FVrrC0ITuRbJyEP4/tyvawi i5Zf7BvSJqD7twkwbFZf7zKFoPwO7z1gGgxI+YmZM/wjI1yHkt/Liz/gRpo9IlHs5I3Z 0HIL2su0F4OU53OuahUVzSHnav3TywEz6Ip0khA8SxQjNSUSqOwihhJsKg9Xb6JRg/hY v3nw== X-Gm-Message-State: AHPjjUjZ7rkFrnH2npZIkPZ9J3sE5Z1Lrta4KIZ/H0T+sLMec0ro3ePF 1kptgQmyRt1eg4GVSKQc54o= X-Google-Smtp-Source: AOwi7QAXNI70/0nRzEi4qHtRscR8NdOujgVlNYWHuYuw+TJm6AukVaKkElTV7dLBjBgoIW/ZN3GtJA== X-Received: by 10.223.179.10 with SMTP id j10mr4520178wrd.273.1505903851167; Wed, 20 Sep 2017 03:37:31 -0700 (PDT) Received: from [192.168.64.116] (bzq-82-81-101-184.red.bezeqint.net. [82.81.101.184]) by smtp.gmail.com with ESMTPSA id z108sm1578652wrc.49.2017.09.20.03.37.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 03:37:30 -0700 (PDT) Subject: Re: crash in 4.14-rc1 with IPoIB To: Johannes Thumshirn , linux-rdma@vger.kernel.org Cc: leon@kernel.org, Thomas Bogendoerfer , Bart Van Assche , Christoph Hellwig , dledford@redhat.com References: <20170920095339.zhfymeyfbhiyepz5@linux-x5ow.site> From: Sagi Grimberg Message-ID: <7aac2d78-462b-c9ad-4443-9ec670a27b74@grimberg.me> Date: Wed, 20 Sep 2017 13:37:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170920095339.zhfymeyfbhiyepz5@linux-x5ow.site> Content-Language: en-US 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 > Hi folks, > > I wanted to try out Christoph's NVMe multipathing patchset on my NVMe OmniPath > setup and merged it into 4.14-rc1. On bootup I stumbled upon that splat and no > RDMA operation was possible: ... > is_valid_mcast_lid.isra.23+0xfb/0x110 > > (gdb) l *(is_valid_mcast_lid+0xfb) > 0x229b is in is_valid_mcast_lid (drivers/infiniband/core/verbs.c:1649). > 1644 /* If QP state >= init, it is assigned to a port and we can check this > 1645 * port only. > 1646 */ > 1647 if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) { > 1648 if (attr.qp_state >= IB_QPS_INIT) { > 1649 if (qp->device->get_link_layer(qp->device, attr.port_num) != > 1650 IB_LINK_LAYER_INFINIBAND) > 1651 return true; > 1652 goto lid_check; > 1653 } > (gdb) Why isn't ipoib uses the generic rdma_port_get_link_layer? Does this help? Tested-by: Johannes Thumshirn --- attr.port_num) != IB_LINK_LAYER_INFINIBAND) return true; goto lid_check; -- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index ee9e27dc799b..f2c70afea238 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1646,7 +1646,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid) */ if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) { if (attr.qp_state >= IB_QPS_INIT) { - if (qp->device->get_link_layer(qp->device, attr.port_num) != + if (rdma_port_get_link_layer(qp->device,