summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhu Yanjun <yanjunz@mellanox.com>2020-03-23 13:28:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:14:40 +0200
commitdb96986c088b047d12ef907ebec252804b785424 (patch)
treef78d7bbb60e71072aa31cb850b5d1c4ff91fa790
parent6f7baf41b7c8963cbd4b23e2cb8a729894eafad7 (diff)
downloadlinux-stable-db96986c088b047d12ef907ebec252804b785424.tar.gz
linux-stable-db96986c088b047d12ef907ebec252804b785424.tar.bz2
linux-stable-db96986c088b047d12ef907ebec252804b785424.zip
RDMA/rxe: Set sys_image_guid to be aligned with HW IB devices
[ 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 <yanjunz@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 94dedabe648c..6589ff51eaf5 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;
}