Page MenuHomeFreeBSD

nvme: Add OAES bit-field definitions
ClosedPublic

Authored by chuck on Feb 16 2022, 2:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 7:28 PM
Unknown Object (File)
Wed, Dec 4, 11:10 PM
Unknown Object (File)
Mon, Nov 18, 6:31 PM
Unknown Object (File)
Nov 16 2024, 3:48 AM
Unknown Object (File)
Sep 20 2024, 12:10 AM
Unknown Object (File)
Sep 16 2024, 10:28 PM
Unknown Object (File)
Sep 13 2024, 8:39 AM
Unknown Object (File)
Sep 8 2024, 11:03 PM
Subscribers

Details

Summary

Create definitions for the Optional Asynchronous Events Supported (OAES)
values. Also adds a helper macro for the common use case of "mask and
shift". E.g.

value = NVME_CTRLR_DATA_OAES_NS_ATTR_MASK << NVME_CTRLR_DATA_OAES_NS_ATTR_SHIFT;

becomes

value = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR);

Diff Detail

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

Event Timeline

chuck requested review of this revision.Feb 16 2022, 2:58 PM

The new OAES defines are probably fine, but I'd like some feedback on the NVMEB() helper macro. Do you like it? Hate it? Have a better approach? Better name?

Looks good to me, I just think we could add more while there.

sys/dev/nvme/nvme.h
257

Where is the mask for the bit 14? Looking on NVMe 2.0 spec I see few more bits here. Why not add them too?

Added missing mask for Endurance Group (bit 14) and added new
definitions from the 2.0 specification

This revision is now accepted and ready to land.Feb 20 2022, 10:30 PM
This revision was automatically updated to reflect the committed changes.