Skip to content

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

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
CodeConstruct:mpr
Aug 25, 2022
Merged

mi: Allow Admin-message sized More Processing Required responses#460
igaw merged 1 commit intolinux-nvme:masterfrom
CodeConstruct:mpr

Conversation

@jk-ozlabs
Copy link
Copy Markdown
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 jk@codeconstruct.com.au

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 <jk@codeconstruct.com.au>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 23, 2022

Codecov Report

❌ Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.55%. Comparing base (3d214c0) to head (c75a043).
⚠️ Report is 910 commits behind head on master.

Files with missing lines Patch % Lines
src/nvme/mi-mctp.c 66.66% 0 Missing and 5 partials ⚠️
test/mi-mctp.c 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/nvme/mi-mctp.c
* 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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