[PATCH v2 09/20] nvme-auth: don't keep long lived 4k dhchap buffer

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 14 20:01:38 PST 2022


On 11/13/22 03:24, Sagi Grimberg wrote:
> dhchap structure is per-queue, it is wasteful to keep it for the entire
> lifetime of the queue. Allocate it dynamically and get rid of it after
> authentication. We don't need kzalloc because all accessors are clearing
> it before writing to it.
> 
> Also, remove redundant chap buf_size which is always 4096, use a define
> instead.
> 
> Reviewed-by: Hannes Reinecke <hare at suse.de>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

-ck




More information about the Linux-nvme mailing list