[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180525153744.2b53c449@xeon-e3>
Date: Fri, 25 May 2018 15:37:44 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Sridhar Samudrala <sridhar.samudrala@...el.com>
Cc: mst@...hat.com, davem@...emloft.net, netdev@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
virtio-dev@...ts.oasis-open.org, jesse.brandeburg@...el.com,
alexander.h.duyck@...el.com, kubakici@...pl, jasowang@...hat.com,
loseweigh@...il.com, jiri@...nulli.us, aaron.f.brown@...el.com,
anjali.singhai@...el.com
Subject: Re: [PATCH net-next v12 1/5] net: Introduce generic failover module
On Thu, 24 May 2018 09:55:13 -0700
Sridhar Samudrala <sridhar.samudrala@...el.com> wrote:
> + spin_lock(&failover_lock);
Since register is not in fast path, this should be a mutex?
> +int failover_slave_unregister(struct net_device *slave_dev)
> +{
> + struct net_device *failover_dev;
> + struct failover_ops *fops;
> +
> + if (!netif_is_failover_slave(slave_dev))
> + goto done;
> +
> + ASSERT_RTNL();
> +
> + failover_dev = failover_get_bymac(slave_dev->perm_addr, &fops);
> + if (!failover_dev)
> + goto done;
Since the slave device must have a master device set already, why not use
that instead of searching by MAC address on unregister or link change.
Powered by blists - more mailing lists