[PATCH 1/5] nvmet: add a helper function for cqid checking
Damien Le Moal
dlemoal at kernel.org
Wed May 7 00:20:42 PDT 2025
On 4/24/25 2:13 PM, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa at wdc.com>
>
> This patch adds a new helper function nvmet_check_io_cqid(). It is to be
> used when parsing host commands for IO CQ creation/deletion and IO SQ
> creation to ensure that the specified IO completion queue identifier
> (CQID) is not 0 (Admin queue ID). This is a check that already occurs in
> the nvmet_execute_x() functions prior to nvmet_check_cqid.
>
> With the addition of this helper function, the CQ ID checks in the
> nvmet_execute_x() function can be removed, and instead simply call
> nvmet_check_io_cqid() in place of nvmet_check_cqid().
>
> Signed-off-by: Wilfred Mallawa <wilfred.mallawa at wdc.com>
Looks good to me.
Reviewed-by: Damien Le Moal <dlemoal at kernel.org>
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list