Page MenuHomeFreeBSD

nvme: Fix old intel alignment size
ClosedPublic

Authored by imp on Apr 10 2022, 5:11 PM.
Tags
None
Referenced Files
F169467119: D34866.diff
Tue, Sep 1, 3:00 PM
F169414795: D34866.id105064.diff
Tue, Sep 1, 11:55 AM
F169392623: D34866.id105064.diff
Tue, Sep 1, 9:59 AM
F169368771: D34866.id104980.diff
Tue, Sep 1, 8:31 AM
Unknown Object (File)
Mon, Aug 31, 3:04 PM
Unknown Object (File)
Sun, Aug 30, 11:28 PM
Unknown Object (File)
Sun, Aug 30, 2:42 PM
Unknown Object (File)
Sun, Aug 30, 8:32 AM
Subscribers

Details

Summary

The intel raid stripe alignment parameter is based on CAP.MPSMIN, so use
that directly now that we have it available.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Apr 10 2022, 5:11 PM
rew added inline comments.
sys/dev/nvme/nvme_ns.c
578–579

got the following error when building:

--- nvme_ns.o ---
 /usr/src/sys/dev/nvme/nvme_ns.c:578:50: error: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wshift-op-parentheses]
                        (1 << ctrlr->cdata.vs[3] + NVME_MPS_SHIFT +
                           ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/src/sys/dev/nvme/nvme_ns.c:578:50: note: place parentheses around the '+' expression to silence this warning
                        (1 << ctrlr->cdata.vs[3] + NVME_MPS_SHIFT +
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 error generated.
*** [nvme_ns.o] Error code 1
sys/dev/nvme/nvme_ns.c
578–579

Oh, right. I think I've fixed that in my tree...
Oh, I didn't commit it and the change was lost...
Good catch! thanks! I've updated

This revision is now accepted and ready to land.Apr 14 2022, 3:08 PM
This revision was automatically updated to reflect the committed changes.