Re: [PATCH v1 1/1] nvme: add admin controller support. prohibit ioq creation for admin & disco ctrlrs
From: Kamaljit Singh
Date: Wed Apr 02 2025 - 17:04:07 EST
Hi Niklas,
On Tue, Apr 01, 2025 at 11:37 PM, Niklas Cassel wrote:
>> > But to be honest, the code did previously
>> > allow an I/O controller with just the admin queue and no I/O queues.
>> Agree. Initially, I was able to use that hole by forcing nvme-cli to
>> allow zero IOQs. But based on your suggested driver change we don't
>> need to patch nvme-cli anymore. That's slick!
>>
>> However, from the nvme-cli's perspective it does feel awkward to be forced
>> by "nvme connect" to use -i <non-zero> for an admin-controller, even though
>> its now being overridden with this patch. We will have to come up with a
>> cleaner and standardized way to connect to an admin controller. A standard
>> port number for an admin controller might be the way to go but it's not in
>> the spec yet.
>So, with this patch which overrides the user provided value,
>if the controller is an admin controller, you need to use:
>$ nvme connect -i <non-zero> ?
>Can't you simply omit the -i parameter?
That worked. But under the covers nvme-cli uses a default --nr-io-queues
based on the core count, which of course will be overridden by this patch to zero
in the kernel. I'm not sure if nvme-cli may hit any internal state/cache issues related
to an inconsistency between requested vs actual nr-io-queues. This method works
for now.
Thanks,
Kamaljit