Page MenuHomeFreeBSD

nvmf_proto.h: Update for use in FreeBSD
ClosedPublic

Authored by jhb on Apr 9 2024, 11:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 13, 6:27 PM
Unknown Object (File)
Mon, Jun 3, 5:33 PM
Unknown Object (File)
Mon, May 27, 2:10 AM
Unknown Object (File)
Tue, May 21, 10:29 AM
Unknown Object (File)
May 9 2024, 7:01 PM
Unknown Object (File)
May 4 2024, 10:08 PM
Unknown Object (File)
Apr 26 2024, 4:56 AM
Unknown Object (File)
Apr 12 2024, 5:48 PM
Subscribers
None

Details

Summary
  • Replace SPDK_STATIC_ASSERT with _Static_assert.
  • Remove SPDK_ and spdk_ prefixes from types and constants.
  • Switch to using FreeBSD headers, e.g. <dev/nvme/nvme.h> in place of "spdk/nvme_spec.h".
  • Add a definition of NVME_NQN_FIELD_SIZE (from SPDK's nvme_spec.h).
  • Remove constant for the fabrics opcode as this is already present in <dev/nvme/nvme.h>.
  • Use types from <dev/nvme/nvme.h> for NVMe structures including struct nvme_sgl_descriptor, struct nvme_command, and struct nvme_completion.
  • Use plain uint16_t in place of struct spdk_nvme_status.

Sponsored by: Chelsio Communications

Diff Detail

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

Event Timeline

jhb requested review of this revision.Apr 9 2024, 11:03 PM
jhb created this revision.

this all seems sane, one tiny style nit.

sys/dev/nvmf/nvmf_proto.h
9

this doesn't match our pattern for include header names

This revision is now accepted and ready to land.Apr 13 2024, 5:51 PM
sys/dev/nvmf/nvmf_proto.h
9

Hmm, we have multiple patterns in the tree I think. This matches <dev/nvme/nvme.h> which uses __NVME_H__. Were you expecting to see the directory name?

(I'd actually be happy if we started using #pragma once instead)

I'd be happy moving to #pragma once for almost all files in the tree...

This revision was automatically updated to reflect the committed changes.