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

SRIOV PF got unbind instead of VF in case of IB link type #797

Merged

Conversation

heyvister1
Copy link
Contributor

@heyvister1 heyvister1 commented Oct 27, 2024

Fixing daemon sriov VFs config, where PF pci address got unbind instead of allegedly VF address, in case of using IB link type.

While sriov config is applied for VF devices by SriovNodePolicy, it appears that PF pci address got unbind insead of VF address. This has caused SRIOV initialization failure.

apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: ib-policy
  namespace: nvidia-network-operator
spec:
  nodeSelector:
    node-role.kubernetes.io/worker: ""
    feature.node.kubernetes.io/network-sriov.capable: "true"
  resourceName: ib_vfs
  priority: 10
  numVfs: 2
  nicSelector:
    rootDevices:
      - '0000:03:00.0'
    vendor: 15b3 
  deviceType: netdevice    
  eSwitchMode: legacy
  linkType: ib 

sriov-config-daemon log snippet:

sriov/sriov.go:487	Unbind(): unbind device driver for device	{"device": "0000:03:00.0"}
2024-10-25T07:32:37.001173398Z	LEVEL(-2)	kernel/kernel.go:116	UnbindDriverByBusAndDevice(): unbind device driver for device	{"bus": "pci", "device": "0000:03:00.0"}
2024-10-25T07:32:37.00122385Z	LEVEL(-2)	kernel/kernel.go:228	getDriverByBusAndDevice(): driver for device	{"bus": "pci", "device": "0000:03:00.0", "driver": "../../../../bus/pci/drivers/mlx5_core"}
2024-10-25T07:32:37.001263521Z	LEVEL(-2)	kernel/kernel.go:236	unbindDriver(): unbind from driver	{"bus": "pci", "device": "0000:03:00.0", "driver": "mlx5_core"}

IB interfaces after mofed container has installed mlx5 drivers: (lshw)

Bus info          Device     Class          Description
=======================================================
pci@0000:01:00.0  eno1       network        I350 Gigabit Network Connection
pci@0000:01:00.1  eno2       network        I350 Gigabit Network Connection
pci@0000:03:00.0  ibp3s0f0   network        MT27800 Family [ConnectX-5]
pci@0000:03:00.1  ibp3s0f1   network        MT27800 Family [ConnectX-5]
pci@0000:81:00.0             network        MT27520 Family [ConnectX-3 Pro]

ibp3s0f0 IB interface is gone post node restart:

Bus info          Device     Class          Description
=======================================================
pci@0000:01:00.0  eno1       network        I350 Gigabit Network Connection
pci@0000:01:00.1  eno2       network        I350 Gigabit Network Connection
pci@0000:03:00.0             network        MT27800 Family [ConnectX-5]
pci@0000:03:00.1  ibp3s0f1   network        MT27800 Family [ConnectX-5]
pci@0000:81:00.0             network        MT27520 Family [ConnectX-3 Pro]

…ad of VF address, in case of using IB link type

Signed-off-by: Ido Heyvi <iheyvi@nvidia.com>
@heyvister1 heyvister1 changed the title Sriov PF got unbind instead of VF in case of IB link type SRIOV PF got unbind instead of VF in case of IB link type Oct 27, 2024
Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11541227557

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 44.976%

Files with Coverage Reduction New Missed Lines %
controllers/generic_network_controller.go 5 74.38%
Totals Coverage Status
Change from base Build 11441395281: -0.03%
Covered Lines: 6656
Relevant Lines: 14799

💛 - Coveralls

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

LGTM ! nice catch !

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

LGTM

@SchSeba SchSeba merged commit 8d9e8da into k8snetworkplumbingwg:master Oct 29, 2024
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants