Skip to content
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

(RHEL-44416) udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT #30

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Aug 9, 2024

No description provided.

champtar and others added 2 commits August 9, 2024 09:45
pci_get_hotplug_slot() has the following limitations:
- if slots are not hotpluggable, they are not in /sys/bus/pci/slots.
- the address at /sys/bus/pci/slots/X/addr doesn't contains the function part,
  so on some system, 2 different slots with different _SUN end up with the same
  hotplug_slot, leading to naming conflicts.
- it tries all parent devices until it finds a slot number, which is incorrect,
  and what led to NAMING_BRIDGE_MULTIFUNCTION_SLOT being disabled.

The use of PCI hotplug to find the slot (ACPI _SUN) was introduced in
systemd/systemd@0035597
"udev: net_id - export PCI hotplug slot names" on 2012/11/26.
At the same time on the kernel side we got
torvalds/linux@bb74ac2
"ACPI: create _SUN sysfs file" on 2012/11/16.

Using PCI hotplug was the only way at the time, but now 12 years later we can use
firmware_node/sun sysfs file.
Looking at a small selection of server HW, for HPE (Gen10 DL325), the _SUN is attached
to the NIC device, whereas for Dell (R640/R6515/R6615) and Cisco (UCSC-C220-M5SX),
the _SUN is on the first parent pcieport.

We still fallback to pci_get_hotplug_slot() to handle the s390 case and
maybe some other coner cases (_SUN on grand parent device that is not a
bridge ?).

(cherry picked from commit 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb)

Related: RHEL-44416
Follow-up for 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb.

(cherry picked from commit 2bb72aadb8169c9310c8ca0d586d277a4a71e2f8)

Related: RHEL-44416
@jamacku jamacku added this to the RHEL-10.0.BETA milestone Aug 9, 2024
@jamacku jamacku requested a review from dtardon August 9, 2024 07:49
@github-actions github-actions bot changed the title udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT (RHEL-44416) udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

Commit validation

Tracker - RHEL-44416

The following commits meet all requirements

commit upstream
66fa304 - udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT systemd/systemd@0a4ecc5
7858449 - man/net-naming-scheme: add missing period systemd/systemd@2bb72aa

Tracker validation

Success

🟢 Tracker RHEL-44416 has set desired product: CentOS Stream 10
🟢 Tracker RHEL-44416 has set desired component: systemd
🟢 Tracker RHEL-44416 has been approved


Pull Request validation

Success

🟡 CI - Waived
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟠 Pull Request meet requirements, mergeable_state is unstable
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

Copy link
Member

@dtardon dtardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot merged commit f5470e9 into redhat-plumbers:main Aug 9, 2024
27 of 30 checks passed
@jamacku jamacku deleted the 9-5-net-naming branch August 9, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants