* I need help with the rdmacm tests
@ 2021-04-09 22:50 Bob Pearson
2021-04-12 12:04 ` Jason Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: Bob Pearson @ 2021-04-09 22:50 UTC (permalink / raw)
To: Jason Gunthorpe, Zhu Yanjun, Edward Srouji,
linux-rdma@vger.kernel.org
The tests in tests/test_rdmacm.py for rxe are failing because they are not able to compute an IP address for the rxe ports.
The python code depends on having the directory /sys/class/infiniband/<IB_DEVICE>/device/net present. But rxe does not have this
directory. Apparently it would find a list of network devices in this directory and once it has that it can succeed. If I hack the
code in get_net_name in base.py to just return the Ethernet device rxe is using ("enp5s0") the tests all pass.
There are two ways to go forward here. I can figure out how to make rdma-core to create the missing directory or if that is not
correct I can figure out how to add another way for the python code to find the netdev for rxe.
I need help on which way to proceed and any hints how to fix this would be very helpful.
Bob
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: I need help with the rdmacm tests
2021-04-09 22:50 I need help with the rdmacm tests Bob Pearson
@ 2021-04-12 12:04 ` Jason Gunthorpe
2021-04-12 16:07 ` Pearson, Robert B
0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2021-04-12 12:04 UTC (permalink / raw)
To: Bob Pearson; +Cc: Zhu Yanjun, Edward Srouji, linux-rdma@vger.kernel.org
On Fri, Apr 09, 2021 at 05:50:01PM -0500, Bob Pearson wrote:
> The tests in tests/test_rdmacm.py for rxe are failing because they
> are not able to compute an IP address for the rxe ports.
>
> The python code depends on having the directory
> /sys/class/infiniband/<IB_DEVICE>/device/net present. But rxe does
> not have this directory.
Oh this is a mistake the tests need to the use APIs to get this
information not muck about in sysfs.
> I can figure out how to add another way for the python code to find
> the netdev for rxe.
Yes. netlink and the gid table reports the netdev for all rdma
devices, that is what the tests should be using.
Call ibv_query_gid_table(), put every ndev_ifindex in a set, then that
set is the list of every netdev index affiliated with the rdma device.
if_indextoname() will convert to a string name
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: I need help with the rdmacm tests
2021-04-12 12:04 ` Jason Gunthorpe
@ 2021-04-12 16:07 ` Pearson, Robert B
0 siblings, 0 replies; 3+ messages in thread
From: Pearson, Robert B @ 2021-04-12 16:07 UTC (permalink / raw)
To: Jason Gunthorpe, Bob Pearson
Cc: Zhu Yanjun, Edward Srouji, linux-rdma@vger.kernel.org
Thanks.
-----Original Message-----
From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Monday, April 12, 2021 7:05 AM
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>; Edward Srouji <edwards@nvidia.com>; linux-rdma@vger.kernel.org
Subject: Re: I need help with the rdmacm tests
On Fri, Apr 09, 2021 at 05:50:01PM -0500, Bob Pearson wrote:
> The tests in tests/test_rdmacm.py for rxe are failing because they are
> not able to compute an IP address for the rxe ports.
>
> The python code depends on having the directory
> /sys/class/infiniband/<IB_DEVICE>/device/net present. But rxe does not
> have this directory.
Oh this is a mistake the tests need to the use APIs to get this information not muck about in sysfs.
> I can figure out how to add another way for the python code to find
> the netdev for rxe.
Yes. netlink and the gid table reports the netdev for all rdma devices, that is what the tests should be using.
Call ibv_query_gid_table(), put every ndev_ifindex in a set, then that set is the list of every netdev index affiliated with the rdma device.
if_indextoname() will convert to a string name
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-12 16:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-09 22:50 I need help with the rdmacm tests Bob Pearson
2021-04-12 12:04 ` Jason Gunthorpe
2021-04-12 16:07 ` Pearson, Robert B
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox