Page MenuHomeFreeBSD

nvmf_proto.h: Update for use in FreeBSD
AcceptedPublic

Authored by jhb on Tue, Apr 9, 11:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 4:56 AM
Unknown Object (File)
Fri, Apr 12, 5:48 PM
Subscribers
None

Details

Reviewers
imp
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 56995
Build 53883: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Tue, Apr 9, 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.Sat, Apr 13, 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...