Skip to contentSkip to conversation

pyverbs test regression

DISCUSSION Bob Pearson 5 participants 10 messages Nov 3, 2020 – Nov 4, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                self.args.append([dev, port, idx, None])
                continue

In fact there is no such path which means it never finds an ip_addr for the device.

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Thanks,

Bob Pearson

maintainer
#1 lore raw
Quoted 5 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

Quoted 7 lines

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                self.args.append([dev, port, idx, None])
                continue

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

Quoted 1 line

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Jason

#2 lore raw
Quoted 12 lines · Jason Gunthorpe
Quoted 11 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                 self.args.append([dev, port, idx, None])
                 continue
Quoted 6 lines
Quoted 1 line

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

Do you have a better alternative suggestion to do that?

Quoted 2 lines
Quoted 1 line

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Nothing really changed in this area lately (in pyverbs / rdma-core tests).

RXE can also have a netdev here if it's linked to one. E.g. by doing "rdma link add <rxe_devname> type rxe netdev <net_devname>"

Quoted 2 lines

Jason

#3 lore raw
Quoted 27 lines · Edward Srouji
Quoted 13 lines · Jason Gunthorpe
Quoted 12 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning "Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

        if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                 self.args.append([dev, port, idx, None]) continue

Quoted 7 lines
Quoted 2 lines

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

Do you have a better alternative suggestion to do that?

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Nothing really changed in this area lately (in pyverbs / rdma-core tests).

RXE can also have a netdev here if it's linked to one. E.g. by doing "rdma link add <rxe_devname> type rxe netdev <net_devname>"

Maybe it was changed in b27e504929d7 ("tests: Verify net interface support on RDMATestCase"), which made the tests skip if the path doesn't exist, instead of returning an error and failing the test.

How did these tests work for rxe before if the path doesn't exist?

maintainer
#5 lore raw
In reply to Edward Srouji
Quoted 15 lines · Edward Srouji
Quoted 13 lines · Jason Gunthorpe
Quoted 12 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                 self.args.append([dev, port, idx, None])
                 continue

In fact there is no such path which means it never finds an ip_addr for the device.

Quoted 8 lines
Quoted 5 lines

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

The GID table has a list of all the IP addresses of the IB device, and all the netdevs that provide it

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Nothing really changed in this area lately (in pyverbs / rdma-core tests).

RXE can also have a netdev here if it's linked to one. E.g. by doing "rdma link add <rxe_devname> type rxe netdev <net_devname>"

No it can't, this is the "parent" device and ib_device can never be a parent of a netdev. rxe should have no parent.

Jason

#8 lore raw
In reply to Bob Pearson

-----"Bob Pearson" <[email protected]> wrote: -----

Quoted 20 lines

To: "Jason Gunthorpe" <[email protected]>, "Leon Romanovsky" <[email protected]>
From: "Bob Pearson" <[email protected]>
Date: 11/04/2020 12:55AM
Cc: "[email protected]" <[email protected]>
Subject: [EXTERNAL] pyverbs test regression

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

if not
os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
self.args.append([dev, port, idx, None]) continue

Quoted 6 lines

In fact there is no such path which means it never finds an ip_addr for the device.

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Hmm, with 5.10.0-rc1, I still see it for both rdma_rxe and siw.

#9 lore raw
Quoted 22 lines · Bernard Metzler

-----"Bob Pearson" <[email protected]> wrote: -----

Quoted 20 lines

To: "Jason Gunthorpe" <[email protected]>, "Leon Romanovsky" <[email protected]>
From: "Bob Pearson" <[email protected]>
Date: 11/04/2020 12:55AM
Cc: "[email protected]" <[email protected]>
Subject: [EXTERNAL] pyverbs test regression

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

if not
os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
self.args.append([dev, port, idx, None]) continue

Quoted 9 lines
Quoted 6 lines

In fact there is no such path which means it never finds an ip_addr for the device.

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Hmm, with 5.10.0-rc1, I still see it for both rdma_rxe and siw.

Bernard,

The script I use to setup the rxe device is

export LD_LIBRARY_PATH=/home/rpearson/src/rdma-core/build/lib/ sudo ip link set dev enp6s0 mtu 4500
sudo ip addr add dev enp6s0 scope link fe80::b62e:99ff:fef9:fa2e/64 sudo rdma link add rxe_0 type rxe netdev enp6s0

After running this the rxe device is functional but I get

rpearson$ ls /sys/class/infiniband/rxe_0

fw_ver     node_guid  parent  power      sys_image_guid
node_desc  node_type  ports   subsystem  uevent

with no 'device'. How are you seeing 'device'? We should be running the same bits.

Bob

#4 lore raw
In reply to Gal Pressman
Quoted 34 lines · Gal Pressman
Quoted 33 lines · Edward Srouji
Quoted 13 lines · Jason Gunthorpe
Quoted 12 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning "Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

RDMATestCase _add_gids_per_port after the following

        if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                 self.args.append([dev, port, idx, None]) continue

Quoted 7 lines
Quoted 2 lines

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

Do you have a better alternative suggestion to do that?

Quoted 3 lines
Quoted 2 lines

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Nothing really changed in this area lately (in pyverbs / rdma-core tests).

Quoted 9 lines
Quoted 2 lines

RXE can also have a netdev here if it's linked to one. E.g. by doing "rdma link add <rxe_devname> type rxe netdev <net_devname>"

Maybe it was changed in b27e504929d7 ("tests: Verify net interface support on RDMATestCase"), which made the tests skip if the path doesn't exist, instead of returning an error and failing the test.

How did these tests work for rxe before if the path doesn't exist?

I wasn't really focused on this area so I only have a vague recollection that I wasn't getting errors and I wasn't skipping these tests but I can't swear to it. From my point of view there was clearly a netdev (enp6s0) with several IP addresses (one IPV4 and five IPV6).

#6 lore raw
In reply to Jason Gunthorpe
Quoted 17 lines · Jason Gunthorpe
Quoted 16 lines · Edward Srouji
Quoted 15 lines · Jason Gunthorpe
Quoted 5 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

Quoted 7 lines

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                  self.args.append([dev, port, idx, None])
                  continue

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

The GID table has a list of all the IP addresses of the IB device, and all the netdevs that provide it

Then how can you get the IP address via verbs API(s)? AFAIK, the gid_entry does not hold the IP addresses, you can only get the subnet prefix, don't you?

Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

Did something change here? Do other RDMA devices have /sys/class/infiniband/XXX/device/net?

Yes, some will

Nothing really changed in this area lately (in pyverbs / rdma-core tests).

RXE can also have a netdev here if it's linked to one. E.g. by doing "rdma link add <rxe_devname> type rxe netdev <net_devname>"

No it can't, this is the "parent" device and ib_device can never be a parent of a netdev. rxe should have no parent.

Jason

Edward

maintainer
#7 lore raw
Quoted 22 lines · Edward Srouji
Quoted 20 lines · Jason Gunthorpe
Quoted 19 lines · Edward Srouji
Quoted 18 lines · Jason Gunthorpe
Quoted 5 lines · Bob Pearson

Since 5.10 some of the pyverbs tests are skipping with the warning
"Device rxe_0 doesn't have net interface"

These occur in tests/test_rdmacm.py. As far as I can tell the error occurs in

Quoted 7 lines

RDMATestCase _add_gids_per_port after the following

	    if not os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
                  self.args.append([dev, port, idx, None])
                  continue

In fact there is no such path which means it never finds an ip_addr for the device.

That isn't an acceptable way to find netdevs for a RDMA device..

This test is really buggy, that is not an acceptable way to find the netdev for a RDMA device. Looks like it is some hacky way to read the gid table? It should just read the gid table.. Edward?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

GID table is not the reason. We need the netdev in order to get the IP address of the interface.

The GID table has a list of all the IP addresses of the IB device, and all the netdevs that provide it

Then how can you get the IP address via verbs API(s)? AFAIK, the gid_entry does not hold the IP addresses, you can only get the subnet prefix, don't you?

IIRC the GID encodes IPv6 as IPv6 and IPv4 as an IPv6 mapped address

Jason