[PATCH 1/6] nvme-auth: allocate authentication buffer only during transaction

Christoph Hellwig hch at lst.de
Thu Nov 3 23:55:54 PDT 2022


On Fri, Nov 04, 2022 at 07:49:41AM +0100, Hannes Reinecke wrote:
> I didn't want to clutter the main nvme structure with the chap stuff, so I 
> kept it as a private definition in auth.c, and did a private allocation.

I think keeping the struct private is fine.  But adding two pointers
to the nvme controller for it, that is one directly to the
nvme_dhchap_queue_context for the admin queue as we'll need that
before setting the number of queues, and one to an array of the
I/O queues seems like a perfectly reasonable tradeoff.

In fact that is the exact two pointers we need for a list_head :)



More information about the Linux-nvme mailing list