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)
Nov 25 2024, 6:20 PM
Unknown Object (File)
Nov 24 2024, 11:42 AM
Unknown Object (File)
Nov 23 2024, 11:48 AM
Unknown Object (File)
Nov 23 2024, 9:20 AM
Unknown Object (File)
Nov 17 2024, 10:49 PM
Unknown Object (File)
Nov 7 2024, 4:52 PM
Unknown Object (File)
Nov 5 2024, 10:53 AM
Unknown Object (File)
Oct 25 2024, 11:22 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.