From: Jonathan Matthew Subject: Re: nvme: use I/O submission queue entry size reported by controller To: tech@openbsd.org Cc: jcs@jcs.org Date: Tue, 19 May 2026 15:14:12 +1000 On Mon, May 18, 2026 at 08:29:47PM -0500, joshua stein wrote: > On Tue, 19 May 2026 at 10:35:03 +1000, Jonathan Matthew wrote: > > On Sun, May 17, 2026 at 12:25:57PM -0500, joshua stein wrote: > > > On at least the Apple T2 NVMe, 128-byte submission queue entries on > > > I/O queues are required instead of the standard 64 bytes. > > > > > > This gets NVMe working on the 2018 Mac Mini. Also tested on a > > > non-Apple NVMe but more tests would be helpful. > > > > I've tested this on a few different nvme devices (real and virtual) and > > haven't seen any problems. > > > > I'm curious as to why you're using the maximum supported sqe size rather > > than the minimum. Does the apple T2 nvme not report 128 as the minimum > > size? > > No, it reports 64. > How unfortunate. Even the fanciest nvme devices I can check at the moment only support 64 byte sqes, so I don't think this will cause any harm. At worst, with a device supporting 32kB sqes, we'd allocate 4MB of memory where we only need 2kB. Maybe it'd be worth ensuring identify->sqes >> 4 is >= 6 just to be safe? ok jmatthew@