Skip to content

Added VFCount to the HTTP POST route /configure-host-vfs#49

Open
eelgaev wants to merge 4 commits into
NVIDIA:public-mainfrom
eelgaev:vf-count-api
Open

Added VFCount to the HTTP POST route /configure-host-vfs#49
eelgaev wants to merge 4 commits into
NVIDIA:public-mainfrom
eelgaev:vf-count-api

Conversation

@eelgaev
Copy link
Copy Markdown

@eelgaev eelgaev commented May 19, 2026

This PR adds optional value (vfCount) to the /configure-host-vfs HTTP POST route, it will create the specified VF count on the host. If vfCount was not set, it will keep setting the same value that is set in DPUFlavor.

@eelgaev eelgaev marked this pull request as draft May 19, 2026 18:17
AddNetworkRequest returned early when a request already existed,
ignoring the provided vfCount. Now updates NumOfVFs and persists
the change so the next processing cycle applies it.
@eelgaev eelgaev marked this pull request as ready for review May 31, 2026 19:37
@eelgaev
Copy link
Copy Markdown
Author

eelgaev commented May 31, 2026

Tested, It fully work as expected.
Ready for review

@wpeng102
Copy link
Copy Markdown
Contributor

wpeng102 commented Jun 1, 2026

Need update the existing tests and add coverage for the new vfCount behavior. I can handle them when I merge into internal branch.

@eelgaev
Copy link
Copy Markdown
Author

eelgaev commented Jun 1, 2026

Added some tests

nm.reqs[existing.UID] = existing
klog.Infof("Updated VF count to %d for DPU %s/%s", *vfCount, existing.DPUNamespace, existing.DpuName)
}
return nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe nm.getNumOfVFs(dpu) should be called here in the case of vfCount == nil. Otherwise, during Host Network Configuration phase, the host-agent will ignore the value in the DPUFlavor

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You are right, I pushed a fix now.

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.

3 participants