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-50103) Backport NAMING_FIRMWARE_NODE_SUN #294

Conversation

dtardon
Copy link
Member

@dtardon dtardon commented Aug 8, 2024

Resolves: RHEL-50103

yuwata and others added 4 commits August 8, 2024 15:45
In the below, we will try to read 'address' file in the directory,
hence the entry must be a directory.

No functional change, just a tiny optimization.

(cherry picked from commit 4103dca)

Related: RHEL-50103
Then we can reduce indentation.
No functional change, just refactoring.

(cherry picked from commit 73fb4b2)

Related: RHEL-50103
…plug_slot_from_address()

No functional changes, just refactoring.

(cherry picked from commit f1e3eaa)

Related: RHEL-50103
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)

Resolves: RHEL-50103
@github-actions github-actions bot changed the title Backport NAMING_FIRMWARE_NODE_SUN (RHEL-50103) Backport NAMING_FIRMWARE_NODE_SUN Aug 8, 2024
@github-actions github-actions bot added tracker/invalid-product pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Commit validation

Tracker - RHEL-50103

The following commits meet all requirements

commit upstream
58ec9ec - udev-builtin-net_id: skip non-directory entry earlier systemd/systemd@4103dca
6c2da26 - udev-builtin-net_id: return earlier when hotplug slot is not found systemd/systemd@73fb4b2
e690f4b - udev-builtin-net_id: split-out pci_get_hotplug_slot() and pci_get_hotp… systemd/systemd@f1e3eaa
856330c - udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT systemd/systemd@0a4ecc5

Follow-up detection

Follow-ups

commit follow-up
856330c - udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT systemd/systemd@2bb72aa

Success

🟠 Mentions, Follow-ups and Revert commits - Waived


Tracker validation

Success

🟢 Tracker RHEL-50103 has set desired product: rhel-9.5
🟢 Tracker RHEL-50103 has set desired component: systemd
🟢 Tracker RHEL-50103 has been approved


Pull Request validation

Success

🟢 CI - All checks have passed
🟢 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 clean
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

@github-actions github-actions bot removed the pr/needs-ci Formerly needs-ci label Aug 8, 2024
@jamacku jamacku added this to the RHEL-9.5.0 milestone Aug 9, 2024
@github-actions github-actions bot removed pr/follow-up pr/needs-review Formerly needs-review labels Aug 19, 2024
@github-actions github-actions bot merged commit 7af151c into redhat-plumbers:main Aug 19, 2024
30 checks passed
@dtardon dtardon deleted the RHEL-50103-NAMING_FIRMWARE_NODE_SUN branch August 20, 2024 08:35
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