Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Tyrel Datwyler <tyreld@linux.ibm.com>
To: james.bottomley@hansenpartnership.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, brking@linux.ibm.com,
	davemarq@linux.ibm.com
Subject: Re: [PATCH v10 1/9] scsi: ibmvfc: add basic FPIN support
Date: Thu, 10 Sep 2026 23:00:09 -0700	[thread overview]
Message-ID: <23857c38-a884-4aa8-b272-de5419e36a0b@linux.ibm.com> (raw)
In-Reply-To: <20260911054832.1311668-2-tyreld@linux.ibm.com>

On 9/10/26 10:48 PM, Tyrel Datwyler wrote:
> From: Dave Marquardt <davemarq@linux.ibm.com>
> 
> Implement support for a basic level of Fabric Performance Impact
> Notifications (FPIN) in the ibmvfc driver to enable monitoring of
> fabric congestion and link integrity events.
> 
> Add async event handler for IBMVFC_AE_FPIN events that offloads FPIN
> processing to a dedicated workqueue. Convert VIOS FPIN messages to
> standard fc_els_fpin structures and pass them to fc_host_fpin_rcv() for
> processing by the FC transport layer.
> 
> Introduce common FPIN conversion routines that will be reused for full
> and extended FPIN support in subsequent patches. Add KUnit test
> infrastructure to validate FPIN event handling and statistics updates.
> 
> Add ibmvfc_handle_async() support for IBMVFC_AE_FPIN events, a dedicated
> workqueue for FPIN processing, FPIN message conversion to fc_els_fpin
> format, handling of link congestion, port congestion, port cleared, port
> degraded, and congestion cleared events, and a KUnit test module for
> FPIN functionality.
> 
> Signed-off-by: Dave Marquardt <davemarq@linux.ibm.com>
> [tyreld: add & operator to irqsave/restore calls]
> [tyreld: check for valid fc or nvme port in ibmvfc_find_target]
> [tyreld: remove kunit tests meant for later patchs]
> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> ---

<..snip..>

> @@ -6923,6 +7189,9 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>  	kthread_stop(vhost->work_thread);
>  free_host_mem:
>  	ibmvfc_free_mem(vhost);
> +free_workq:
> +	destroy_workqueue(vhost->fpin_workq);
> +	vhost->fpin_workq = NULL;
>  free_scsi_host:
>  	scsi_host_put(shost);
>  out:
> @@ -6953,8 +7222,6 @@ static void ibmvfc_remove(struct vio_dev *vdev)
>  	ibmvfc_wait_while_resetting(vhost);
>  	kthread_stop(vhost->work_thread);
>  	flush_work(&vhost->rport_add_work_q);
> -	fc_remove_host(vhost->host);
> -	scsi_remove_host(vhost->host);

I mucked something up my fist go add cleaning up the kunit mess, and as a result
I went back and started fresh again from Dave's v8. Anyways, the second I hit
send I realized I forgot to reincorporate the change I had in v9 to no move the
xxx_remove_host() calls back and add the destroy workqueue call above those as
well as an IBMVFC_HOST_OFFLINE check before enqueue of work.

-Tyrel

>  
>  	spin_lock_irqsave(&vhost->host->host_lock, flags);
>  	ibmvfc_purge_requests(vhost, DID_ERROR);
> @@ -6963,6 +7230,10 @@ static void ibmvfc_remove(struct vio_dev *vdev)
>  	ibmvfc_complete_purge(&purge);
>  	ibmvfc_release_sub_crqs(vhost);
>  	ibmvfc_release_crq_queue(vhost);
> +	destroy_workqueue(vhost->fpin_workq);
> +	vhost->fpin_workq = NULL;
> +	fc_remove_host(vhost->host);
> +	scsi_remove_host(vhost->host);
>  
>  	ibmvfc_free_mem(vhost);
>  	spin_lock(&ibmvfc_driver_lock);

  reply	other threads:[~2026-09-11  6:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  5:48 [PATCH v10 0/9] scsi: ibmvfc: make ibmvfc support FPIN messages Tyrel Datwyler
2026-09-11  5:48 ` [PATCH v10 1/9] scsi: ibmvfc: add basic FPIN support Tyrel Datwyler
2026-09-11  6:00   ` Tyrel Datwyler [this message]
2026-09-11  6:06   ` sashiko-bot
2026-09-11  5:48 ` [PATCH v10 2/9] scsi: ibmvfc: add NOOP command support Tyrel Datwyler
2026-09-11  6:00   ` sashiko-bot
2026-09-11  5:48 ` [PATCH v10 3/9] scsi: ibmvfc: add FPIN extended flag and async sub-CRQ queue handle Tyrel Datwyler
2026-09-11  6:01   ` sashiko-bot
2026-09-11  5:48 ` [PATCH v10 4/9] scsi: ibmvfc: extend async event handlers for async sub-CRQ events Tyrel Datwyler
2026-09-11  5:48 ` [PATCH v10 5/9] scsi: ibmvfc: add interrupt routine for asynchronous sub CRQ Tyrel Datwyler
2026-09-11  5:48 ` [PATCH v10 6/9] scsi: ibmvfc: extend channel reg/dereg helpers for async sub-CRQ Tyrel Datwyler
2026-09-11  5:48 ` [PATCH v10 7/9] scsi: ibmvfc: fix IRQ leak and guard deregister on channel reg failure Tyrel Datwyler
2026-09-11  6:03   ` sashiko-bot
2026-09-11  5:48 ` [PATCH v10 8/9] scsi: ibmvfc: register and use asynchronous sub CRQ for events Tyrel Datwyler
2026-09-11  6:02   ` sashiko-bot
2026-09-11  5:48 ` [PATCH v10 9/9] scsi: ibmvfc: handle extended FPIN events 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=23857c38-a884-4aa8-b272-de5419e36a0b@linux.ibm.com \
    --to=tyreld@linux.ibm.com \
    --cc=brking@linux.ibm.com \
    --cc=davemarq@linux.ibm.com \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=martin.petersen@oracle.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