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

add/remove VDPA devices #15

Merged
merged 3 commits into from
Oct 27, 2022

Conversation

lmilleri
Copy link

This PR extends the govdpa library by adding the following capabilities:

  • kvdpa-cli: Add support for new VdpaDevice
    This change allows the user (cli) to create a new VDPA device
    CLI command: kvdpa-cli add [mgmtdev] [dev]
    mgmtdev: the VDPA management device (e.g. pci/0000:65:00.2)
    dev: the VDPA device (e.g. vdpa1)

  • kvdpa-cli: Delete support for VdpaDevice
    This change allows the user (cli) to delete a VDPA device
    CLI command: kvdpa-cli del [dev]
    dev: the VDPA device (e.g. vdpa1)

  • Added function for returning the VdpaDevice objects for a given pciAddress
    function name: GetVdpaDevicesByPciAddress
    arguments: pciAddress string
    return values: []VdpaDevice, error

@lmilleri
Copy link
Author

@amorenoz please take a look

Copy link
Collaborator

@amorenoz amorenoz left a comment

Choose a reason for hiding this comment

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

This PR needs rebasing plus a bit of moving things around between the different commits and ordering them so that every commit builds.

cmd/kvdpa-cli/kvdpa-cli.go Outdated Show resolved Hide resolved
cmd/kvdpa-cli/kvdpa-cli.go Outdated Show resolved Hide resolved
pkg/kvdpa/mgmtdev_test.go Outdated Show resolved Hide resolved
cmd/kvdpa-cli/kvdpa-cli.go Outdated Show resolved Hide resolved
pkg/kvdpa/device.go Show resolved Hide resolved
pkg/kvdpa/device.go Outdated Show resolved Hide resolved
@lmilleri
Copy link
Author

lmilleri commented Oct 7, 2022

I messed up while rebasing from master. I'll cherry-pick my changes and tidy up the commit messages

@lmilleri
Copy link
Author

lmilleri commented Oct 7, 2022

@amorenoz Please review it again, I fixed the rebase issue, commit history and few minor changes you requested

@amorenoz
Copy link
Collaborator

I've fixed an issue with golangci-lint. Please rebase to see if tests pass.
Also, nit: It's generally preferred not to add extra commits fixing bugs introduced in the same PR. Code reviews should be integrated (squashed) into the original commits to make a clean history.

This change allows the user (cli) to create a new VDPA device
CLI command: kvdpa-cli add [mgmtdev] [dev]
   mgmtdev: the VDPA management device (e.g. pci/0000:65:00.2)
   dev:     the VDPA device (e.g. vdpa1)

Signed-off-by: Leonardo Milleri <lmilleri@redhat.com>
This change allows the user (cli) to delete a VDPA device
CLI command: kvdpa-cli del [dev]
	dev:     the VDPA device (e.g. vdpa1)

Signed-off-by: Leonardo Milleri <lmilleri@redhat.com>
function name: GetVdpaDevicesByPciAddress
arguments: pciAddress string
return values: []VdpaDevice, error

Signed-off-by: Leonardo Milleri <lmilleri@redhat.com>
@lmilleri
Copy link
Author

Rebased from master and rewritten git history to make it cleaner. Please review the changes

@amorenoz
Copy link
Collaborator

Thanks @lmilleri

@amorenoz
Copy link
Collaborator

/lgtm

@amorenoz amorenoz merged commit 8168e68 into k8snetworkplumbingwg:master Oct 27, 2022
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.

2 participants