From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 3E685C76190 for ; Tue, 23 Jul 2019 03:25:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13FAC21911 for ; Tue, 23 Jul 2019 03:25:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730712AbfGWDZK (ORCPT ); Mon, 22 Jul 2019 23:25:10 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2737 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727314AbfGWDZK (ORCPT ); Mon, 22 Jul 2019 23:25:10 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CA5B69C567CC47F18721; Tue, 23 Jul 2019 11:25:08 +0800 (CST) Received: from [127.0.0.1] (10.61.25.96) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Jul 2019 11:25:07 +0800 Subject: =?UTF-8?Q?Re:_=e3=80=90Question_for_srpt_in_kernel-4.14=e3=80=91?= To: Bart Van Assche , , "Jason Gunthorpe" CC: linux-rdma References: <16008407-2ffd-0bbb-717e-7e874a3a5ee0@huawei.com> From: oulijun Message-ID: Date: Tue, 23 Jul 2019 11:25:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.61.25.96] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 在 2019/7/23 11:13, Bart Van Assche 写道: > On 7/22/19 6:30 PM, oulijun wrote: >> 在 2019/7/23 2:07, Bart Van Assche 写道: >>> On 7/19/19 11:54 PM, oulijun wrote: >>>> I am targeting a problem about RoCE and SCSI over RDMA from srpt in kernel-4.14. When insmod srpt.ko and insmod hns-roce-hw-v2.ko, it will >>>> report a warning in srpt_add_one: >>>> ib_srpt srpt_add_one(hns_0) failed. >>> >>> How about the following patch? >>> >>> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c >>> index 1a039f16d315..e2a4a14763b8 100644 >>> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c >>> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c >>> @@ -3109,7 +3109,8 @@ static void srpt_add_one(struct ib_device *device) >>> srpt_use_srq(sdev, sdev->port[0].port_attrib.use_srq); >>> >>> if (!srpt_service_guid) >>> - srpt_service_guid = be64_to_cpu(device->node_guid); >>> + srpt_service_guid = be64_to_cpu(device->node_guid) & >>> + ~IB_SERVICE_ID_AGN_MASK; >>> >>> if (rdma_port_get_link_layer(device, 1) == IB_LINK_LAYER_INFINIBAND) >>> sdev->cm_id = ib_create_cm_id(device, srpt_cm_handler, sdev); >>> >> No, I did not find this patch in the latest kernel-5.3 or others. > > What I meant is: can you try that patch? > > Thanks, > > Bart. > > . > Yes, I will do.