-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST-85-NETWORK-NetworkdSRIOVTests failed in GitHub Actions #32910
Comments
Hm. eth0 is not renamed...
|
This seems to happen only on archlinux, I don't think I've seen it on other jobs, so it might be due to some distro-specific configuration/setup |
Or kernel bug? |
…g ports If physical port is processed by udevd before driver is attached to the parent netdevsim device, it seems that sd_device_get_parent_with_subsystem_devtype(…, "netdevsim", …); in udev-builtin-net_id.c does not work. That may be a regression in the kernel, as the issue is observed since kernel v6.9. If not, maybe we should also try to aquire subsystem of a device from uevent file. Workaround for systemd#32910
…g ports If physical port is processed by udevd before driver is attached to the parent netdevsim device, it seems that sd_device_get_parent_with_subsystem_devtype(…, "netdevsim", …); in udev-builtin-net_id.c does not work. That may be a regression in the kernel, as the issue is observed since kernel v6.9. If not, maybe we should also try to acquire subsystem of a device from uevent file. Workaround for systemd#32910
From https://github.com/systemd/systemd/actions/runs/9150396388/job/25155113839?pr=32928 for PR #32928, this is a regression in kernel 6.9. |
Ah, caused by torvalds/linux@8debcf5. systemd-udevd checks if a network interface is a stacked netdev or not with |
Another kernel API break, nice! We are raking up quite the collection |
Workaround for issue systemd#32910 caused by a bug in kernel 6.9: torvalds/linux@8debcf5
Yeah, it should return |
I think the commit torvalds/linux@8debcf5 should be fixed something like the following. diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index c22897bf5509..8b8a5532a33d 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -324,7 +324,7 @@ static int nsim_get_iflink(const struct net_device *dev)
rcu_read_lock();
peer = rcu_dereference(nsim->peer);
- iflink = peer ? READ_ONCE(peer->netdev->ifindex) : 0;
+ iflink = peer ? READ_ONCE(peer->netdev->ifindex) : READ_ONCE(dev->ifindex);
rcu_read_unlock();
return iflink; |
Workaround for issue systemd#32910 caused by a bug in kernel 6.9: torvalds/linux@8debcf5
Workaround for issue systemd#32910 caused by a bug in kernel 6.9: torvalds/linux@8debcf5
Due to the bug in kernel 6.9 caused by torvalds/linux@8debcf5, the net_id udev builtin does not work for netdevsim interface. So, eni99np1 cannot be used with kernel 6.9 anymore. Workaround for systemd#32910.
Due to the bug in kernel 6.9 caused by torvalds/linux@8debcf5, the net_id udev builtin does not work for netdevsim interface. So, eni99np1 cannot be used with kernel 6.9 anymore. Workaround for systemd#32910. (cherry picked from commit f1f1be7)
What is the expectation of systemd-udevd? netdevsim has the same behaviour as veth:
|
@spikeh Thank you for taking a look.
Hm? Is it possible to configure veth without peer?? I guess returning 0 here is just for safety, and should never happen. systemd-udevd tries to generate predictable names for 'non-stacked' network interfaces: systemd/src/udev/udev-builtin-net_id.c Lines 1288 to 1314 in 45af01d
Of course, veth is not a stacked netdev, but anyway we do not generate names for veth. Previously (kernel 6.8 or older), netdevsim provides Background: For veth, on creation, we can specify interface name and MAC address, so we can distinguish them without any automatically generated predictable names. |
BTW, even when a netdevsim interface has a peer, should the peer be exposed through |
But, at the same time, our detection logic may not be good, as if the peer (or underlying device for e.g. tunnel or vlan) is in another network namespace, then |
Thanks for explaining. Yes, netdevsim is definitely doing the wrong thing here. Tbh I copied from veth without thinking about it too much, so apologies for causing breakages. Not many real devices have ndo_get_iflink() defined. From userspace would you ever need it to return the linked peer like veth? Depending on your answer, I can either remove the ndo or make it return dev->ifindex if there is no peer like you suggested. |
@spikeh I think we should not mix backward compatibility in the kernel API and improving (or fixing) logic of virtual netdev detection in udevd. And I think we should do both below.
So, in short, please please apply the change something like that I proposed in #32910 (comment). |
https://github.com/systemd/systemd/actions/runs/9137583438/job/25127740138?pr=32907
The text was updated successfully, but these errors were encountered: