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
F135248734: D45416.id.diff
Fri, Nov 7, 11:26 PM
Unknown Object (File)
Thu, Nov 6, 9:28 AM
Unknown Object (File)
Thu, Oct 30, 9:42 PM
Unknown Object (File)
Wed, Oct 29, 5:40 PM
Unknown Object (File)
Wed, Oct 29, 2:46 PM
Unknown Object (File)
Wed, Oct 29, 2:44 PM
Unknown Object (File)
Wed, Oct 29, 2:43 PM
Unknown Object (File)
Tue, Oct 28, 6:39 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.