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

mi: Allow Admin-message sized More Processing Required responses #460

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

jk-ozlabs
Copy link
Collaborator

Devices may implement their MPR response as an actual Admin response
message, rather than the simple MI-only message described in 4.1.2.3 of
NVMe-MI v1.2b.

Allow this, but with some fairly stringent header checks. Add a test for
this behaviour too.

Signed-off-by: Jeremy Kerr [email protected]

Devices may implement their MPR response as an actual Admin response
message, rather than the simple MI-only message described in 4.1.2.3 of
NVMe-MI v1.2b.

Allow this, but with some fairly stringent header checks. Add a test for
this behaviour too.

Signed-off-by: Jeremy Kerr <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #460 (c75a043) into master (3d214c0) will increase coverage by 0.20%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #460      +/-   ##
==========================================
+ Coverage   22.34%   22.55%   +0.20%     
==========================================
  Files          31       31              
  Lines        5702     5725      +23     
  Branches     1160     1167       +7     
==========================================
+ Hits         1274     1291      +17     
  Misses       4005     4005              
- Partials      423      429       +6     
Impacted Files Coverage Δ
src/nvme/mi-mctp.c 69.48% <66.66%> (-1.56%) ⬇️
test/mi-mctp.c 84.42% <93.33%> (+0.45%) ⬆️

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

* type indicates admin, and the allocated response header is the
* correct size for an Admin response.
*/
if (((msg->hdr.nmp >> 3) & 0xf) == NVME_MI_MT_ADMIN &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we have a getter function for this? We have partially stuff in place but not everywhere (see also ##148)

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 would be nice to unify these with the existing _GET definitions, but I haven't used those in the MI code as they're private to the ioctl implementation.

When we do the API unification (in #448), I'd like to adopt those existing macros, but it may be a lot of rework to access these in the MI code as they stand at the moment

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay got it. Let's go then with this version and keep that in mind.

@igaw igaw merged commit fec443b into linux-nvme:master Aug 25, 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.

3 participants