From: sashiko-bot@kernel.org
To: "Dave Marquardt" <davemarq@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH v5 4/7] scsi: ibmvfc: allocate asynchronous sub-queue
Date: Thu, 06 Aug 2026 15:38:28 +0000 [thread overview]
Message-ID: <20260806153828.B281B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260806-ibmvfc-fpin-support-v5-4-13fd6f8a8f8b@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Missing Setup and Registration (Dead Code / Incomplete Implementation)
- [High] Erroneous Per-Protocol Allocation of Asynchronous Sub-Queue
- [Medium] Inefficient Resource Allocation for Async Sub-Queue
--
--- Patch [4]: [PATCH v5 4/7] scsi: ibmvfc: allocate asynchronous sub-queue ---
commit 7efcd61f3c0261f3a8cbf890ed40ef64412880a3
Author: Dave Marquardt <davemarq@linux.ibm.com>
scsi: ibmvfc: allocate asynchronous sub-queue
This patch allocates and initializes the asynchronous sub-queue required for
receiving full and extended FPIN events from VIOS.
> Update ibmvfc_channel_setup() to pass async_subq_handle to VIOS during
> channel setup, and ibmvfc_channel_setup_done() to store the VIOS cookie
> for the async sub-queue.
The commit message states that ibmvfc_channel_setup() and
ibmvfc_channel_setup_done() are updated, but those modifications are missing
from the actual patch code.
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc-core.c b/drivers/scsi/ibmvscsi/ibmvfc-core.c
> --- a/drivers/scsi/ibmvscsi/ibmvfc-core.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc-core.c
> @@ -6796,6 +6796,17 @@ static int ibmvfc_alloc_channels(struct ibmvfc_host *vhost,
> if (!channels->scrqs)
> return -ENOMEM;
>
> + channels->async_scrq = kzalloc_obj(*channels->async_scrq, GFP_KERNEL);
[Severity: High]
Is async_scrq placed in the correct structure?
It appears async_scrq is added to struct ibmvfc_channels, which exists
per protocol (vhost->scsi_scrqs and vhost->nvme_scrqs). Because this allocation
path is executed once per protocol, does this result in allocating an async
queue for each protocol instead of a single async queue per host, which the
VIOS channel setup expects?
> + if (!channels->async_scrq) {
> + rc = -ENOMEM;
> + goto free_scrqs;
> + }
> +
> + rc = ibmvfc_alloc_queue(vhost, channels->async_scrq,
> + IBMVFC_SUB_CRQ_FMT);
[Severity: High]
Are we missing the hypervisor registration and setup steps for this queue?
Without the updates to ibmvfc_channel_setup() and ibmvfc_channel_setup_done()
mentioned in the commit message, the async queue is allocated but never
registered with the hypervisor via h_reg_sub_crq() or communicated to the VIOS,
leaving it non-functional.
[Severity: Medium]
Does this queue need a full event pool allocation?
Calling ibmvfc_alloc_queue() with IBMVFC_SUB_CRQ_FMT sets queue->total_depth
to a non-zero value, which allocates a large command event pool and associated
DMA memory. Since this async queue is intended solely for receiving unsolicited
events, could we avoid allocating an unused outbound event pool?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260806-ibmvfc-fpin-support-v5-0-13fd6f8a8f8b@linux.ibm.com?part=4
next prev parent reply other threads:[~2026-08-06 15:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 15:17 [PATCH v5 0/7] scsi: ibmvfc: make ibmvfc support FPIN messages Dave Marquardt via B4 Relay
2026-08-06 15:17 ` [PATCH v5 1/7] scsi: ibmvfc: add basic FPIN support Dave Marquardt via B4 Relay
2026-08-06 15:32 ` sashiko-bot
2026-08-06 15:17 ` [PATCH v5 2/7] scsi: ibmvfc: Add NOOP command support Dave Marquardt via B4 Relay
2026-08-06 15:45 ` sashiko-bot
2026-08-06 15:17 ` [PATCH v5 3/7] scsi: ibmvfc: define asynchronous sub-queue Dave Marquardt via B4 Relay
2026-08-06 15:32 ` sashiko-bot
2026-08-06 15:17 ` [PATCH v5 4/7] scsi: ibmvfc: allocate " Dave Marquardt via B4 Relay
2026-08-06 15:38 ` sashiko-bot [this message]
2026-08-06 15:17 ` [PATCH v5 5/7] scsi: ibmvfc: extend async event handlers to handle async sub queue events Dave Marquardt via B4 Relay
2026-08-06 15:34 ` sashiko-bot
2026-08-06 15:17 ` [PATCH v5 6/7] scsi: ibmvfc: register and use asynchronous sub-queue for events Dave Marquardt via B4 Relay
2026-08-06 15:47 ` sashiko-bot
2026-08-06 15:17 ` [PATCH v5 7/7] scsi: ibmvfc: handle extended FPIN events Dave Marquardt via B4 Relay
2026-08-06 15:53 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260806153828.B281B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=davemarq@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox