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
Unknown Object (File)
Wed, Oct 15, 7:11 AM
Unknown Object (File)
Sun, Oct 5, 10:50 PM
Unknown Object (File)
Sat, Sep 27, 8:21 AM
Unknown Object (File)
Sat, Sep 27, 2:04 AM
Unknown Object (File)
Sep 4 2025, 11:01 AM
Unknown Object (File)
Sep 3 2025, 2:51 AM
Unknown Object (File)
Aug 30 2025, 10:45 PM
Unknown Object (File)
Aug 26 2025, 7:45 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.