HomeFreeBSD

nvme: Fix alignment on nvme structures

Description

nvme: Fix alignment on nvme structures

Remove __packed from nvme_command, nvme_completion and
nvme_dsm_trim. Add super-alignment to nvme_completion since it's always
at least that aligned in hardware (and in our existing uses of it
embedded in structures). It generates better code in
nvme_qpair_process_completions on riscv64 because otherwise the ABI
assumes a 4-byte alignment, and the same on all other platforms.

Reviewed by: jrtc27@, mav@, chuck@
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31001

(cherry picked from commit fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd)

Details

Provenance
impAuthored on Jul 2 2021, 9:58 PM
Differential Revision
D31001: nvme: Fix alignment on nvme structures
Parents
rG4fad4eeb75fe: nvme: style nit
Branches
Unknown
Tags
Unknown