From: sashiko-bot@kernel.org
To: "Dave Marquardt" <davemarq@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH v8 9/9] scsi: ibmvfc: handle extended FPIN events
Date: Wed, 09 Sep 2026 19:28:50 +0000 [thread overview]
Message-ID: <20260909192850.C7F5A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260909-ibmvfc-fpin-support-v8-9-b27183b055af@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Extended FPIN severity information provided by the hardware is ignored and always downgraded to a warning.
- [Low] Unused variables `pre` and `post` in `ibmvfc_extended_fpin_test` cause a `-Wunused-but-set-variable` compiler warning.
--
commit 6820bc74ced043fe70cb0c57ff71b54e4764889c
Author: Dave Marquardt <davemarq@linux.ibm.com>
scsi: ibmvfc: handle extended FPIN events
Implement support for extended FPIN messages received via the asynchronous
sub-queue. Add functions to convert extended FPIN messages to fc_els_fpin
structures, set capability bits during login, and add KUnit tests.
> 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
[ ... ]
> +static struct fc_els_fpin *
> +ibmvfc_ext_fpin_to_desc(struct ibmvfc_async_subq_fpin *ibmvfc_fpin)
> +{
> + u8 flags = ibmvfc_fpin->fpin_data.flags;
> + __be32 threshold = cpu_to_be32(IBMVFC_FPIN_DEFAULT_EVENT_THRESHOLD);
> + __be16 modifier = 0;
> + __be32 count = cpu_to_be32(1);
> + __be16 type = 0;
> +
> + if (flags & IBMVFC_FPIN_EVENT_TYPE_VALID)
> + type = ibmvfc_fpin->fpin_data.event_type;
> + if (flags & IBMVFC_FPIN_MODIFIER_VALID)
> + modifier = ibmvfc_fpin->fpin_data.event_type_modifier;
> + if (flags & IBMVFC_FPIN_THRESHOLD_VALID)
> + threshold = ibmvfc_fpin->fpin_data.event_threshold;
> + if (flags & IBMVFC_FPIN_EVENT_COUNT_VALID)
> + count = ibmvfc_fpin->fpin_data.event_data.event_count;
> +
> + return ibmvfc_common_fpin_to_desc(ibmvfc_fpin->fpin_status,
> + ibmvfc_fpin->wwpn, type,
> + modifier, threshold, count);
> +}
[Severity: Medium]
Does this code accidentally ignore the hardware-provided FPIN severity?
When an extended FPIN event with the IBMVFC_FPIN_SEVERITY_VALID flag is
received, the payload parsing seems to ignore the severity field. Because
ibmvfc_common_fpin_to_desc() unconditionally hardcodes the severity to
FPIN_CONGN_SEVERITY_WARNING, does this lead to losing critical fabric
congestion event severity information (such as Error or Fatal statuses)
from the hardware?
[ ... ]
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc_kunit.c b/drivers/scsi/ibmvscsi/ibmvfc_kunit.c
> --- a/drivers/scsi/ibmvscsi/ibmvfc_kunit.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc_kunit.c
[ ... ]
> +#define IBMVFC_TEST_FPIN_EXT(fs, ev, stat, crq) { \
> + struct ibmvfc_async_crq_event ae = { .type = IBMVFC_ASYNC_CRQ_SUB }; \
> + (crq).valid = 0x80; \
> + (crq).flags = IBMVFC_ASYNC_IS_FPIN_EXT; \
> + (crq).link_state = IBMVFC_AE_LS_LINK_UP; \
> + (crq).fpin_status = (fs); \
> + (crq).event = cpu_to_be16(IBMVFC_AE_FPIN); \
> + (crq).wwpn = cpu_to_be64(tgt->wwpn); \
> + (crq).fpin_data.flags = IBMVFC_FPIN_EVENT_TYPE_VALID; \
> + (crq).fpin_data.event_type = cpu_to_be16((ev)); \
> + ae.subq = *(struct ibmvfc_async_sub_crq *)&(crq); \
> + pre = READ_ONCE(rport->fpin_stats.stat); \
> + ibmvfc_handle_async(&ae, vhost); \
> + flush_workqueue(vhost->fpin_workq); \
> + post = READ_ONCE(rport->fpin_stats.stat); \
> +}
[Severity: Low]
Are the pre and post variables missing evaluation in the test assertions?
They are assigned via READ_ONCE() but never used subsequently in the macro or
calling functions, which triggers a -Wunused-but-set-variable compiler
warning when KUnit is enabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-ibmvfc-fpin-support-v8-0-b27183b055af@linux.ibm.com?part=9
next prev parent reply other threads:[~2026-09-09 19:28 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 19:07 [PATCH v8 0/9] scsi: ibmvfc: make ibmvfc support FPIN messages Dave Marquardt via B4 Relay
2026-09-11 2:08 ` Tyrel Datwyler
2026-09-09 19:07 ` Dave Marquardt
2026-09-09 19:07 ` [PATCH v8 1/9] scsi: ibmvfc: add basic FPIN support Dave Marquardt via B4 Relay
2026-09-09 19:07 ` Dave Marquardt
2026-09-09 19:29 ` sashiko-bot
2026-09-11 0:46 ` Tyrel Datwyler
2026-09-09 19:07 ` [PATCH v8 2/9] scsi: ibmvfc: add NOOP command support Dave Marquardt via B4 Relay
2026-09-09 19:07 ` Dave Marquardt
2026-09-09 19:19 ` sashiko-bot
2026-09-10 23:14 ` Tyrel Datwyler
2026-09-09 19:07 ` [PATCH v8 3/9] scsi: ibmvfc: add FPIN extended flag and async sub-CRQ queue handle Dave Marquardt via B4 Relay
2026-09-09 19:07 ` Dave Marquardt
2026-09-10 23:15 ` Tyrel Datwyler
2026-09-09 19:07 ` [PATCH v8 4/9] scsi: ibmvfc: extend async event handlers for async sub-CRQ events Dave Marquardt via B4 Relay
2026-09-09 19:07 ` Dave Marquardt
2026-09-09 19:23 ` sashiko-bot
2026-09-10 23:18 ` Tyrel Datwyler
2026-09-09 19:08 ` [PATCH v8 5/9] scsi: ibmvfc: add interrupt routine for asynchronous sub CRQ Dave Marquardt via B4 Relay
2026-09-09 19:08 ` Dave Marquardt
2026-09-10 23:19 ` Tyrel Datwyler
2026-09-09 19:08 ` [PATCH v8 6/9] scsi: ibmvfc: extend channel reg/dereg helpers for async sub-CRQ Dave Marquardt via B4 Relay
2026-09-09 19:08 ` Dave Marquardt
2026-09-10 23:19 ` Tyrel Datwyler
2026-09-09 19:08 ` [PATCH v8 7/9] scsi: ibmvfc: fix IRQ leak and guard deregister on channel reg failure Dave Marquardt via B4 Relay
2026-09-09 19:08 ` Dave Marquardt
2026-09-09 19:26 ` sashiko-bot
2026-09-10 23:22 ` Tyrel Datwyler
2026-09-09 19:08 ` [PATCH v8 8/9] scsi: ibmvfc: register and use asynchronous sub CRQ for events Dave Marquardt via B4 Relay
2026-09-09 19:08 ` Dave Marquardt
2026-09-09 19:26 ` sashiko-bot
2026-09-10 23:34 ` Tyrel Datwyler
2026-09-09 19:08 ` [PATCH v8 9/9] scsi: ibmvfc: handle extended FPIN events Dave Marquardt via B4 Relay
2026-09-09 19:08 ` Dave Marquardt
2026-09-09 19:28 ` sashiko-bot [this message]
2026-09-10 23:42 ` Tyrel Datwyler
2026-09-11 2:08 ` [PATCH v9 1/9] scsi: ibmvfc: add basic FPIN support Tyrel Datwyler
2026-09-11 2:42 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 2/9] scsi: ibmvfc: add NOOP command support Tyrel Datwyler
2026-09-11 2:21 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 3/9] scsi: ibmvfc: add FPIN extended flag and async sub-CRQ queue handle Tyrel Datwyler
2026-09-11 2:08 ` [PATCH v9 4/9] scsi: ibmvfc: extend async event handlers for async sub-CRQ events Tyrel Datwyler
2026-09-11 2:40 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 5/9] scsi: ibmvfc: add interrupt routine for asynchronous sub CRQ Tyrel Datwyler
2026-09-11 2:31 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 6/9] scsi: ibmvfc: extend channel reg/dereg helpers for async sub-CRQ Tyrel Datwyler
2026-09-11 2:08 ` [PATCH v9 7/9] scsi: ibmvfc: fix IRQ leak and guard deregister on channel reg failure Tyrel Datwyler
2026-09-11 2:27 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 8/9] scsi: ibmvfc: register and use asynchronous sub CRQ for events Tyrel Datwyler
2026-09-11 2:23 ` sashiko-bot
2026-09-11 2:08 ` [PATCH v9 9/9] scsi: ibmvfc: handle extended FPIN events Tyrel Datwyler
2026-09-11 2:26 ` sashiko-bot
2026-09-11 2:12 ` [PATCH v8 0/9] scsi: ibmvfc: make ibmvfc support FPIN messages Tyrel Datwyler
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=20260909192850.C7F5A1F000FF@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.