[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c864eb96-18ea-21dd-3ef3-15ca908c5959@grimberg.me>
Date: Wed, 3 Feb 2021 01:09:52 -0800
From: Sagi Grimberg <sagi@...mberg.me>
To: Boris Pismenny <borisp@...lanox.com>, dsahern@...il.com,
kuba@...nel.org, davem@...emloft.net, saeedm@...dia.com,
hch@....de, axboe@...com, kbusch@...nel.org,
viro@...iv.linux.org.uk, edumazet@...gle.com, smalin@...vell.com
Cc: boris.pismenny@...il.com, linux-nvme@...ts.infradead.org,
netdev@...r.kernel.org, benishay@...dia.com, ogerlitz@...dia.com,
yorayz@...dia.com, Or Gerlitz <ogerlitz@...lanox.com>,
Ben Ben-Ishay <benishay@...lanox.com>,
Yoray Zack <yorayz@...lanox.com>
Subject: Re: [PATCH v3 net-next 09/21] nvme-tcp: Deal with netdevice DOWN
events
> @@ -2930,6 +2931,27 @@ static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
> return ERR_PTR(ret);
> }
>
> +static int nvme_tcp_netdev_event(struct notifier_block *this,
> + unsigned long event, void *ptr)
> +{
> + struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
> + struct nvme_tcp_ctrl *ctrl;
> +
> + switch (event) {
> + case NETDEV_GOING_DOWN:
> + mutex_lock(&nvme_tcp_ctrl_mutex);
> + list_for_each_entry(ctrl, &nvme_tcp_ctrl_list, list) {
> + if (ndev != ctrl->offloading_netdev)
> + continue;
> + nvme_tcp_error_recovery(&ctrl->ctrl);
> + }
> + mutex_unlock(&nvme_tcp_ctrl_mutex);
> + flush_workqueue(nvme_reset_wq);
> + /* we assume that the going down part of error recovery is over */
Maybe phrase it as:
/*
* The associated controllers teardown has completed, ddp contexts
* were also torn down so we should be safe to continue...
*/
Powered by blists - more mailing lists