Skip to content

udev-builtin-net_id: ignore firmware_node/sun == 0#34099

Merged
yuwata merged 1 commit intosystemd:mainfrom
champtar:firmware_node-sun-0
Aug 23, 2024
Merged

udev-builtin-net_id: ignore firmware_node/sun == 0#34099
yuwata merged 1 commit intosystemd:mainfrom
champtar:firmware_node-sun-0

Conversation

@champtar
Copy link
Contributor

Since ID_NET_NAME_SLOT was introduced we ignore slot == 0

if (hotplug_slot > 0) {

Qemu sets _SUN to PCI_SLOT() for all NICs, so _SUN is not unique. https://gitlab.com/qemu-project/qemu/-/issues/2530

In my tests with libvirt I can only set 'slot="0x00"' in interface definition, so all NICs end up with _SUN == 0, and this commit is enough to avoid the issue.

Fixes 0a4ecc5

Fixes #34082

@github-actions github-actions bot added udev please-review PR is ready for (re-)review by a maintainer labels Aug 22, 2024
Since ID_NET_NAME_SLOT was introduced we ignore slot == 0
https://github.com/systemd/systemd/blob/0035597a30d120f70df2dd7da3d6128fb8ba6051/src/udev/udev-builtin-net_id.c#L139

Qemu sets _SUN to PCI_SLOT() for all NICs, so _SUN is not unique.
https://gitlab.com/qemu-project/qemu/-/issues/2530

In my tests with libvirt I can only set 'slot="0x00"' in interface definition,
so all NICs end up with _SUN == 0, and this commit is enough to avoid the issue.

Fixes 0a4ecc5
@champtar champtar force-pushed the firmware_node-sun-0 branch from 7a3623c to 88a9b41 Compare August 22, 2024 21:41
@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Aug 22, 2024
@yuwata yuwata merged commit 448f9f8 into systemd:main Aug 23, 2024
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Aug 23, 2024
@champtar champtar deleted the firmware_node-sun-0 branch December 11, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Naming conflict when booting with multiple virtio-net NICs

2 participants