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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scalable functions (SF) support #310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

naserdean
Copy link

This patch adds support for scalable functions

(https://docs.nvidia.com/networking/display/bluefielddpuosv385/scalable+functions).

They are represented on the host as auxiliary devices.

In order to for the minimal codebase changes, this patch updated the sriovnet dependency,
which already has support for SFs, together with its needed dependencies.

This patch also adds architecture detection to the Makefile.

What this PR does / why we need it:
Add support for auxiliary devices.

Special notes for your reviewer:
First time I contribute to ovs-cni.
Apologies up front for any headaches 馃槃 .

Release note:

Support Scalable Functions

This patch adds support for scalable functions
(https://docs.nvidia.com/networking/display/bluefielddpuosv385/scalable+functions).
They are represented on the host as auxiliary devices.

In order to for the minimal codebase changes, this patch updated
the sriovnet dependency, which already has support for SFs, together
with its needed dependencies.

This patch also adds architecture detection to the Makefile.

Signed-off-by: Alin Gabriel Serdean <[email protected]>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels May 19, 2024
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: naserdean
Once this PR has been reviewed and has the lgtm label, please assign schseba for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 19, 2024
@kubevirt-bot
Copy link
Collaborator

Hi @naserdean. Thanks for your PR.

I'm waiting for a k8snetworkplumbingwg 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.

}

// IsAuxDeviceName check if passed device id is a Auxiliary device name
func IsAuxDeviceName(deviceID string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be safer to check if given device is found on the auxiliary bus like in [1]
the regex is quite loose for SFs

[1] https://github.com/containernetworking/plugins/pull/1003/files

@@ -13,7 +13,12 @@ export GOROOT=$(BIN_DIR)/go/
export GOBIN = $(GOROOT)/bin/
export PATH := $(GOBIN):$(PATH):$(BIN_DIR)
GOPATH = $(CURDIR)/.gopath
GOARCH ?= amd64
UNAME=$(shell uname -m | tr '[:upper:]' '[:lower:]')
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go in a separate PR ?

Copy link
Author

Choose a reason for hiding this comment

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

oops,
indeed, will drop the change from this pr and create a new one just for this

if err != nil {
return "", err
}

return rep, nil
}

// SetupSriovInterface moves smartVF into container namespace, rename it with ifName and also returns host interface with VF's representor device
func SetupSriovInterface(contNetns ns.NetNS, containerID, ifName string, mtu int, deviceID string) (*current.Interface, *current.Interface, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we rename this method as it now handles both sr-iov and auxiliary devices ?

@phoracek
Copy link
Member

Thanks for the contribution @naserdean! CC @SchSeba

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2024
@kubevirt-bot
Copy link
Collaborator

PR needs rebase.

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants