Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp877069pxk; Thu, 17 Sep 2020 20:04:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMAEuuCLP+axeaQ9SgbUDqIA3oMjj1Gcpk8qomE63WIg+7x7nlFYpJRy+4tPT4ks3kKPvy X-Received: by 2002:a17:906:1909:: with SMTP id a9mr33221955eje.127.1600398282964; Thu, 17 Sep 2020 20:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398282; cv=none; d=google.com; s=arc-20160816; b=gelXIOiUwaaeWctaaikcqCL3wEUGaLnXH167jmgKrq9u2GrldNx7Od4LkMQqyiQdok 4e+fJ/od+X0IbqSkV7hNs+c4cHk1AzcxyUzxthkczIgp+rdxJj69x2XmJLamiMMUbNAr JoWlb1uAlxmE5Uxf83Ycvs4q5gbtI/trgAj3FPwo5Uw/mZkwfglTAemvmFKActe7OhRO D60vynCqJcpCEbbyGIZpsJGZyDcLfA/t8PUMe1fYEXH8zDV7/zCp+sGvp9iw4k+JVvIl J3Vr1qTnb+MTtP0UML4VzMCAeJI2gKuw0xq7FN18ARI8YbJT/11FcjAxPdb8CFaGHZYh CbHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qLYILH8jLnbw6a6Pxi6JQxxKCuApv+DMsmvHZxd4OsI=; b=CXqa/jYCdI1aXnHFUybzOHedHwZYCA32hwJV8De9tJ39EO85xxD+VsnygeP1XUBpcZ 4gU01Op6LjCURZq9hBsOvAkaUSAduN/pWArDgsZby5XgI1Z8RSksBcK1Ng/hsj5O3qFD F4Qv31qvu6g/kFVpDb9JEyrQa/mmURCs0c9mgGBzLS7q6J0amP8CAcbUh6xMx2rU7mjI dDF2xZpS0HyEiJZw4aK2+Mq8nwoaKFhKry8UbaCb7driObFmzncR6fuq/17mCR8aPENa ikQW6QhHS6S0+ILwh1TviupkPLucFlr2aSsq8fmw8qj4kt73HoQHd/S13c9Epht4WWyf zIhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hlVCvkjW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si1076024edt.550.2020.09.17.20.04.20; Thu, 17 Sep 2020 20:04:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hlVCvkjW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbgIRCFk (ORCPT + 99 others); Thu, 17 Sep 2020 22:05:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:53772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727531AbgIRCF2 (ORCPT ); Thu, 17 Sep 2020 22:05:28 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F0E5238E4; Fri, 18 Sep 2020 02:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394727; bh=n9uYGRl08kDvHUfxAKaTg+k73v4fIxF3D6A/0fMjQjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hlVCvkjWSWNZLn4v114Ienf4zEUoh+pVOkxP6x0UKS8EM34naWVL6CZSIAj0yiwyr QFW+NyKO5VDq19Kb1M97oO3eXrIITI4CWPdQ3RphLLPKCJ//0RAElnOJNfcKhfaDBE bpJN4/odrtsivHoaueoBw73f8gANyDIXnmkTO3gI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhu Yanjun , Leon Romanovsky , Jason Gunthorpe , Sasha Levin , linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 210/330] RDMA/rxe: Set sys_image_guid to be aligned with HW IB devices Date: Thu, 17 Sep 2020 21:59:10 -0400 Message-Id: <20200918020110.2063155-210-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 a8c11b5e1e943..a92aca1745c16 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -116,6 +116,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; } -- 2.25.1