Page MenuHomeFreeBSD

linux: Translate Linux NVME ioctls to the lower layers.
ClosedPublic

Authored by imp on May 30 2024, 6:30 PM.
Tags
None
Referenced Files
F143200632: D45416.id139874.diff
Tue, Jan 27, 8:38 AM
Unknown Object (File)
Fri, Jan 23, 4:42 AM
Unknown Object (File)
Fri, Jan 23, 3:16 AM
Unknown Object (File)
Thu, Jan 22, 9:39 PM
Unknown Object (File)
Thu, Jan 22, 7:00 PM
Unknown Object (File)
Dec 20 2025, 10:27 PM
Unknown Object (File)
Dec 1 2025, 8:13 PM
Unknown Object (File)
Nov 23 2025, 3:48 AM
Subscribers
None

Details

Summary

The lower layers implement a ABI compatible Linux ioctl for a few of the
Linux IOCTLs. Translate them and pass them down. Since they are ABI
compatible, just use the nvme ioctl name.

Co-Authored-by: Warner Losh <imp@bsdimp.com>

Diff Detail

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

Event Timeline

imp requested review of this revision.May 30 2024, 6:30 PM
imp created this revision.

Testing with an unmodified Linux nvme-cli fails without the noted change masking cmd. Fix that, and this LGTM. Thanks for all the integration!

sys/compat/linux/linux_ioctl.c
3545

nit: 'Nvme' should be 'NVMe'

3549

cmd needs to be masked. I.e.,

+       switch (args->cmd & UINT16_MAX)
This revision is now accepted and ready to land.Jun 9 2024, 5:34 PM

update, per chuck's feedback. Used &0xffff instead of his suggestion
to match the rest of the file.

This revision now requires review to proceed.Jun 14 2024, 9:11 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 14 2024, 10:40 PM
This revision was automatically updated to reflect the committed changes.