[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ3xEMjzh=PEqLNwW5RMtofskGQubD3Z5+CR_JhuCUCH50jtGg@mail.gmail.com>
Date: Thu, 4 Feb 2021 20:29:41 +0200
From: Or Gerlitz <gerlitz.or@...il.com>
To: Sagi Grimberg <sagi@...mberg.me>
Cc: Boris Pismenny <borisp@...lanox.com>,
David Ahern <dsahern@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Saeed Mahameed <saeedm@...dia.com>,
Christoph Hellwig <hch@....de>, axboe@...com,
Keith Busch <kbusch@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Eric Dumazet <edumazet@...gle.com>, smalin@...vell.com,
Yoray Zack <yorayz@...lanox.com>, yorayz@...dia.com,
boris.pismenny@...il.com, Ben Ben-Ishay <benishay@...lanox.com>,
benishay@...dia.com, linux-nvme@...ts.infradead.org,
Linux Netdev List <netdev@...r.kernel.org>,
Or Gerlitz <ogerlitz@...lanox.com>,
Or Gerlitz <ogerlitz@...dia.com>
Subject: Re: [PATCH v3 net-next 09/21] nvme-tcp: Deal with netdevice DOWN events
On Wed, Feb 3, 2021 at 11:17 AM Sagi Grimberg <sagi@...mberg.me> wrote:
> > @@ -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...
> */
sure
Powered by blists - more mailing lists