From: Tyrel Datwyler <tyreld@linux.ibm.com>
To: davemarq@linux.ibm.com,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, Brian King <brking@linux.ibm.com>,
Greg Joyce <gjoyce@linux.ibm.com>,
Kyle Mahlkuch <kmahlkuc@linux.ibm.com>
Subject: Re: [PATCH 2/5] ibmvfc: Add NOOP command support
Date: Wed, 6 May 2026 21:17:55 -0700 [thread overview]
Message-ID: <7da072cf-8774-4144-8888-b3d41af470f8@linux.ibm.com> (raw)
In-Reply-To: <20260408-ibmvfc-fpin-support-v1-2-52b06c464e03@linux.ibm.com>
On 4/8/26 10:07 AM, Dave Marquardt via B4 Relay wrote:
> From: Dave Marquardt <davemarq@linux.ibm.com>
As with patch 1 this requires a slightly more detailed commit log message and
developer sign off tag.
>
> - Add VFC_NOOP command support
> - Add KUnit tests for VFC_NOOP command
> ---
> drivers/scsi/ibmvscsi/ibmvfc.c | 23 +++++++++++++----------
> drivers/scsi/ibmvscsi/ibmvfc.h | 13 +++++++++++++
> drivers/scsi/ibmvscsi/ibmvfc_kunit.c | 27 +++++++++++++++++++++++++++
> 3 files changed, 53 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
> index 3ac376ba2c62..808301fa452d 100644
> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
> @@ -189,13 +189,6 @@ static long h_reg_sub_crq(unsigned long unit_address, unsigned long ioba,
> return rc;
> }
>
> -static int ibmvfc_check_caps(struct ibmvfc_host *vhost, unsigned long cap_flags)
> -{
> - u64 host_caps = be64_to_cpu(vhost->login_buf->resp.capabilities);
> -
> - return (host_caps & cap_flags) ? 1 : 0;
> -}
> -
It appears you are moving this to ibmvfc.h? Is there reasoning outside making it
visible to kunit?
> static struct ibmvfc_fcp_cmd_iu *ibmvfc_get_fcp_iu(struct ibmvfc_host *vhost,
> struct ibmvfc_cmd *vfc_cmd)
> {
> @@ -1512,7 +1505,9 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
> login_info->flags |= cpu_to_be16(IBMVFC_CLIENT_MIGRATED);
>
> login_info->max_cmds = cpu_to_be32(max_cmds);
> - login_info->capabilities = cpu_to_be64(IBMVFC_CAN_MIGRATE | IBMVFC_CAN_SEND_VF_WWPN);
> + login_info->capabilities =
> + cpu_to_be64(IBMVFC_CAN_MIGRATE | IBMVFC_CAN_SEND_VF_WWPN |
> + IBMVFC_CAN_USE_NOOP_CMD);
>
> if (vhost->mq_enabled || vhost->using_channels)
> login_info->capabilities |= cpu_to_be64(IBMVFC_CAN_USE_CHANNELS);
> @@ -3461,8 +3456,8 @@ EXPORT_SYMBOL_IF_KUNIT(ibmvfc_handle_async);
> * @evt_doneq: Event done queue
> *
> **/
> -static void ibmvfc_handle_crq(struct ibmvfc_crq *crq, struct ibmvfc_host *vhost,
> - struct list_head *evt_doneq)
> +VISIBLE_IF_KUNIT void ibmvfc_handle_crq(struct ibmvfc_crq *crq, struct ibmvfc_host *vhost,
> + struct list_head *evt_doneq)
> {
> long rc;
> struct ibmvfc_event *evt = (struct ibmvfc_event *)be64_to_cpu(crq->ioba);
> @@ -3520,6 +3515,13 @@ static void ibmvfc_handle_crq(struct ibmvfc_crq *crq, struct ibmvfc_host *vhost,
> if (crq->format == IBMVFC_ASYNC_EVENT)
> return;
>
> + if (crq->format == IBMVFC_VFC_NOOP) {
> + if (!ibmvfc_check_caps(vhost, IBMVFC_SUPPORT_NOOP_CMD))
> + dev_err(vhost->dev,
> + "Received unexpected NOOP command from partner\n");
If we have a misbahaved VIOS partner we may want to ratelimit this dev_err so
that we don't flood the log. Probably a corner case, but I don't think it hurts.
-Tyrel
> + return;
> + }
> +
> /* The only kind of payload CRQs we should get are responses to
> * things we send. Make sure this response is to something we
> * actually sent
next prev parent reply other threads:[~2026-05-07 4:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 17:07 [PATCH 0/5] ibmvfc: make ibmvfc support FPIN messages Dave Marquardt via B4 Relay
2026-04-08 17:07 ` [PATCH 1/5] ibmvfc: add basic FPIN support Dave Marquardt via B4 Relay
2026-05-07 4:12 ` Tyrel Datwyler
2026-05-07 22:22 ` Dave Marquardt
2026-04-08 17:07 ` [PATCH 2/5] ibmvfc: Add NOOP command support Dave Marquardt via B4 Relay
2026-05-07 4:17 ` Tyrel Datwyler [this message]
2026-05-07 22:25 ` Dave Marquardt
2026-04-08 17:07 ` [PATCH 3/5] ibmvfc: make ibmvfc login to fabric Dave Marquardt via B4 Relay
2026-05-07 5:03 ` Tyrel Datwyler
2026-05-07 22:34 ` Dave Marquardt
2026-04-08 17:07 ` [PATCH 4/5] ibmvfc: use async sub-queue for FPIN messages Dave Marquardt via B4 Relay
2026-05-07 5:41 ` Tyrel Datwyler
2026-05-07 22:40 ` Dave Marquardt
2026-04-08 17:07 ` [PATCH 5/5] ibmvfc: handle extended FPIN events Dave Marquardt via B4 Relay
2026-05-07 5:48 ` Tyrel Datwyler
2026-05-08 14:38 ` Dave Marquardt
2026-04-30 16:25 ` [PATCH 0/5] ibmvfc: make ibmvfc support FPIN messages Martin K. Petersen
2026-05-07 22:15 ` Dave Marquardt
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=7da072cf-8774-4144-8888-b3d41af470f8@linux.ibm.com \
--to=tyreld@linux.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=brking@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=davemarq@linux.ibm.com \
--cc=gjoyce@linux.ibm.com \
--cc=kmahlkuc@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=martin.petersen@oracle.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/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