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

Restore IDPF devices for renaming rules #95

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

humlie
Copy link
Contributor

@humlie humlie commented Dec 12, 2024

This reverts commit a528f22.

Allows IDPF RDMA devices to be renamed at boot time.

Copy link

Hi @humlie. Thanks for your PR.

I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@a-crate a-crate self-assigned this Dec 12, 2024
@a-crate
Copy link
Contributor

a-crate commented Dec 12, 2024

/ok-to-test

@a-crate
Copy link
Contributor

a-crate commented Dec 12, 2024

/hold

Code changes LGTM, we need an associated CIT test case to prevent regressions on C3 metal in the future before merge.
Should be a simple change to https://github.com/GoogleCloudPlatform/cloud-image-tests/tree/main/test_suites/networkinterfacenaming, I will take care of this.

We also need access to instances where this will run so we can write an integration test for this.

@@ -21,8 +21,8 @@ readonly LOG_TAG=${LOG_TAG:-"gce-nic-naming_$$"}
declare PCI_BUS_PATH='/sys/bus/pci/devices'
declare SYS_PREPEND_PATH='/sys'
# 0x15b3:0x101e is the vendor and device ID for Mellanox CX7

readonly ETHERNET_DEVICES_VENDORS=('15b3:101e')
# 0x8086:0x145c is the vendor and device ID for Intel IDPF
Copy link
Contributor

@a-crate a-crate Dec 13, 2024

Choose a reason for hiding this comment

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

Can you some text that this is the VF device ID rather than PF?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

copybara-service bot pushed a commit to GoogleCloudPlatform/cloud-image-tests that referenced this pull request Dec 13, 2024
Tests that GoogleCloudPlatform/guest-configs#95 doesn't cause NIC name regressions on C3 Metal.

PiperOrigin-RevId: 705914177
copybara-service bot pushed a commit to GoogleCloudPlatform/cloud-image-tests that referenced this pull request Dec 13, 2024
Tests that GoogleCloudPlatform/guest-configs#95 doesn't cause NIC name regressions on C3 Metal.

PiperOrigin-RevId: 705914177
copybara-service bot pushed a commit to GoogleCloudPlatform/cloud-image-tests that referenced this pull request Dec 13, 2024
Tests that GoogleCloudPlatform/guest-configs#95 doesn't cause NIC name regressions on C3 Metal.

PiperOrigin-RevId: 705992843
@google-oss-prow google-oss-prow bot added size/M and removed size/XS labels Dec 17, 2024
name_builder="rdma${eth_index}"

if [[ "${SUBSYSTEM}" == "net" ]] && [[ ! -d "${SYS_PREPEND_PATH}${DEVPATH}/device/${PCI_TEST_ITEM}" ]]; then
# If this is a VF device and not an RDMA the race condition is addressed by naming to position based name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain the race condition, for readers that aren't google internal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

generate_name "${DEVPATH}"
generated_name=$(generate_name "${DEVPATH}")

# handle the 2nd load order
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. net
  2. irdma
    right? Can you say this explicitly? Assumptions about load order should be documented for anyone using a custom kernel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -14,15 +14,19 @@
#
# This script is used to generate the network device name for a given device.


# Input to test if a directory in the PCI tree exists under the device
declare PCI_TEST_ITEM="$1"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is needlessly confusing IMO, it isn't actually dynamic. All the cases are static, this only serves to obscure the behavior. Can you instead check for infiniband when "${DRIVER}" == "idpf"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The driver is not directly passed to the script, I thought this was more flexible for future cases but I can pass the driver instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@google-oss-prow google-oss-prow bot added the lgtm label Dec 18, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-crate, humlie

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot removed the lgtm label Dec 18, 2024
@a-crate
Copy link
Contributor

a-crate commented Dec 20, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Dec 20, 2024
@a-crate
Copy link
Contributor

a-crate commented Jan 7, 2025

/unhold

@google-oss-prow google-oss-prow bot merged commit 4172a5c into GoogleCloudPlatform:master Jan 7, 2025
2 checks passed
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.

2 participants