From patchwork Tue Sep 29 10:59:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290830 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=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 5431BC4741F for ; Tue, 29 Sep 2020 12:27:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0632F2083B for ; Tue, 29 Sep 2020 12:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601382467; bh=1JaYy5yCw2TbJaabWH2Vep8NT5shJjMGXmf8AlzkHL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dRkp9eZxDLor5hbVhrWnm7YvbntX0V4BYDpC8G7hYwR8TLP3fEnFQkgJxPDMFU3Tj 4sRiLJBHJClEUUmHkXQ1SGZ+Z1kAu791j7chqxuauBHU84N2jgV1dX0G5M3OxZ1IQz FVnQcOf4JsyJr7quLhWqBmyOR+bWmRdDaAHwigcs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732414AbgI2M1d (ORCPT ); Tue, 29 Sep 2020 08:27:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:48450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728989AbgI2LdO (ORCPT ); Tue, 29 Sep 2020 07:33:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 396F823B32; Tue, 29 Sep 2020 11:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378761; bh=1JaYy5yCw2TbJaabWH2Vep8NT5shJjMGXmf8AlzkHL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0h4HZVmmWbKsOlCvbgfjbFd0wOQ4+uNNJhkyFzrNAitXtMmfGxww2ngxYu88RSGCR UA21/ZTLNNDpOdnLjtIacD/HG96aNamG6rlnaLqXj/OKMVKKcAhvLccPGqEzL8Bzob eifawgoItZt6zpIpGlhgLFq9v4fAP4UbjW92e5+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhu Yanjun , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.19 129/245] RDMA/rxe: Set sys_image_guid to be aligned with HW IB devices Date: Tue, 29 Sep 2020 12:59:40 +0200 Message-Id: <20200929105953.264675412@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105946.978650816@linuxfoundation.org> References: <20200929105946.978650816@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhu Yanjun [ Upstream commit d0ca2c35dd15a3d989955caec02beea02f735ee6 ] The RXE driver doesn't set sys_image_guid and user space applications see zeros. This causes to pyverbs tests to fail with the following traceback, because the IBTA spec requires to have valid sys_image_guid. Traceback (most recent call last): File "./tests/test_device.py", line 51, in test_query_device self.verify_device_attr(attr) File "./tests/test_device.py", line 74, in verify_device_attr assert attr.sys_image_guid != 0 In order to fix it, set sys_image_guid to be equal to node_guid. Before: 5: rxe0: ... node_guid 5054:00ff:feaa:5363 sys_image_guid 0000:0000:0000:0000 After: 5: rxe0: ... node_guid 5054:00ff:feaa:5363 sys_image_guid 5054:00ff:feaa:5363 Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200323112800.1444784-1-leon@kernel.org Signed-off-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/sw/rxe/rxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index 94dedabe648c2..6589ff51eaf5c 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -121,6 +121,8 @@ static void rxe_init_device_param(struct rxe_dev *rxe) rxe->attr.max_fast_reg_page_list_len = RXE_MAX_FMR_PAGE_LIST_LEN; rxe->attr.max_pkeys = RXE_MAX_PKEYS; rxe->attr.local_ca_ack_delay = RXE_LOCAL_CA_ACK_DELAY; + addrconf_addr_eui48((unsigned char *)&rxe->attr.sys_image_guid, + rxe->ndev->dev_addr); rxe->max_ucontext = RXE_MAX_UCONTEXT; }