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, Nov 7, 4:52 PM
Unknown Object (File)
Tue, Nov 5, 10:53 AM
Unknown Object (File)
Fri, Oct 25, 11:22 PM
Unknown Object (File)
Mon, Oct 21, 1:41 PM
Unknown Object (File)
Fri, Oct 18, 5:55 PM
Unknown Object (File)
Wed, Oct 16, 1:14 PM
Unknown Object (File)
Tue, Oct 15, 12:14 PM
Unknown Object (File)
Oct 12 2024, 9:01 AM
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.