mi: Allow Admin-message sized More Processing Required responses#460
mi: Allow Admin-message sized More Processing Required responses#460igaw merged 1 commit intolinux-nvme:masterfrom
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
| * 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 && |
There was a problem hiding this comment.
Should we have a getter function for this? We have partially stuff in place but not everywhere (see also ##148)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Okay got it. Let's go then with this version and keep that in mind.
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