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

Provide initial MEV NVMe implementation. #15

Merged

Conversation

artek-koltun
Copy link
Collaborator

This patch provides support for NVMe device creation/deletion for MEV and leverage the existing functionality of opi-spdk-bridge to handle subsystem/namespace related requests.

@artek-koltun artek-koltun requested a review from a team as a code owner March 6, 2023 11:11
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #15 (91b7f5a) into main (69ae076) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##            main     #15    +/-   ##
======================================
  Coverage   0.00%   0.00%            
======================================
  Files          1       2     +1     
  Lines        258     117   -141     
======================================
+ Misses       258     117   -141     
Impacted Files Coverage Δ
pkg/frontend/frontend.go 0.00% <0.00%> (ø)
pkg/frontend/nvme.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@artek-koltun artek-koltun force-pushed the feat-initial-mev-nvme-implementation branch 2 times, most recently from 2890632 to b32acfe Compare March 6, 2023 11:54
pkg/frontend/nvme.go Outdated Show resolved Hide resolved
README.md Outdated
@@ -20,6 +20,12 @@ See [CONTRIBUTING](https://github.com/opiproject/opi/blob/main/CONTRIBUTING.md)

## Getting started

a special transport should be created on IPU side by
Copy link
Member

Choose a reason for hiding this comment

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

do you expect user to create this manually or gRPC handles it? I think some small clarification needed here

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove - more detailed instructions can be adjusted later

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is not clear, how the whole flow is going to be used from the user POV, probably we can just remove this note. What would you say @intelfisz ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

}

// CreateNVMeController creates an NVMe Controller
func (s *Server) CreateNVMeController(ctx context.Context, in *pb.CreateNVMeControllerRequest) (*pb.NVMeController, error) {
Copy link
Member

Choose a reason for hiding this comment

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

what is different about this function VS op-spdk-bridge impl ?

Copy link
Collaborator Author

@artek-koltun artek-koltun Mar 6, 2023

Choose a reason for hiding this comment

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

opi-spdk-bridge works with tcp transport only at the moment. For this bridge we use another transport, and another format for the arguments.
The interface of the call is the same as the one in SPDK

Copy link
Member

Choose a reason for hiding this comment

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

I would try to override Trtype and Traddr , then we can re-use all the code...

Choose a reason for hiding this comment

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

Just wanted to note that by design, the RPC interfaces are exactly the same as regular SPDK NVMe-oF target and we treat it as a new transport type. So it really is just overriding trtype/traddr.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, what I'm saying, we can maybe place trtype/traddr in the server struct and then replacement will be easier without re-writing the functions, just init the server with proper arguments...

Copy link
Member

@glimchb glimchb left a comment

Choose a reason for hiding this comment

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

looks good, few small questions inside

README.md Outdated
@@ -20,6 +20,12 @@ See [CONTRIBUTING](https://github.com/opiproject/opi/blob/main/CONTRIBUTING.md)

## Getting started

a special transport should be created on IPU side by
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove - more detailed instructions can be adjusted later

pkg/frontend/frontend.go Show resolved Hide resolved
@artek-koltun artek-koltun force-pushed the feat-initial-mev-nvme-implementation branch from b32acfe to b727593 Compare March 6, 2023 15:24
@glimchb glimchb self-requested a review March 6, 2023 21:53
msg := fmt.Sprintf("unable to find subsystem with id %v for controller %v",
controller.Spec.SubsystemId.Value,
in.Name)
log.Printf("error: %v", msg)
Copy link
Member

Choose a reason for hiding this comment

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

same comment here about idempotency: why instead of error, not to return the success here if controller already deleted ?

Copy link
Member

@glimchb glimchb left a comment

Choose a reason for hiding this comment

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

I don't want to hold you from merging (especially that you are maintainer) but few notes:

  • I see a lot of dup with opi-spdk-bridge implementation. if we can just override Trtype and Traddr , then we can re-use all the code instead of duplication.
  • I left few comments inside about idempotency.

@artek-koltun artek-koltun force-pushed the feat-initial-mev-nvme-implementation branch from b727593 to 91b7f5a Compare March 7, 2023 08:04
This patch provides support for NVMe device creation/deletion
for MEV and leverage the existing functionality of opi-spdk-bridge
to handle subsystem/namespace related requests.

Signed-off-by: Artsiom Koltun <[email protected]>
@intelfisz intelfisz merged commit 42217e9 into opiproject:main Mar 7, 2023
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.

4 participants