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

Expose RDMA device name in the devicespec if available #530

Merged

Conversation

almaslennikov
Copy link
Contributor

The DeviceInfoSpec allows to specify rdma device for a pci device: https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/blob/master/pkg/apis/k8s.cni.cncf.io/v1/types.go#L63

Multus propagates device spec to the network-status, so it's easy to track which RDMA device is allocated to a POD:

k8s.v1.cni.cncf.io/network-status:
	[{
		"name": "k8s-pod-network",
		"ips": [
			"192.168.107.206"
		],
		"default": true,
		"dns": {}
	},{
		"name": "default/sriov-net1",
		"interface": "net1",
		"ips": [
			"10.56.217.2"
		],
		"mac": "7a:bb:87:d9:b4:94",
		"dns": {},
		"device-info": {
			"type": "pci",
			"version": "1.1.0",
			"pci": {
				"pci-address": "0000:03:00.3",
				"rdma-device": "mlx5_4"
			}
		},
		"gateway": [
			"\u003cnil\u003e"
		]
	}]

This change can serve two purposes:

  1. Simplify debugging. Users can just query pod's network status and understand which RDMA device belongs to which network
  2. Allow applications in multi-network pods to understand, which RDMA device they should use.

@coveralls
Copy link
Collaborator

coveralls commented Feb 8, 2024

Pull Request Test Coverage Report for Build 8084092568

Details

  • -1 of 8 (87.5%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 75.192%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/netdevice/netResourcePool.go 7 8 87.5%
Totals Coverage Status
Change from base Build 8082319142: 0.03%
Covered Lines: 2058
Relevant Lines: 2737

💛 - Coveralls

Signed-off-by: amaslennikov <amaslennikov@nvidia.com>
@almaslennikov
Copy link
Contributor Author

/retest

@adrianchiris
Copy link
Contributor

@SchSeba PTAL

Copy link
Collaborator

@Eoghan1232 Eoghan1232 left a comment

Choose a reason for hiding this comment

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

lgtm

@almaslennikov
Copy link
Contributor Author

/retest

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 4a91d9e into k8snetworkplumbingwg:master Mar 7, 2024
9 of 10 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.

5 participants