From: Stephen Hemminger <stephen@networkplumber.org>
To: Sridhar Samudrala <sridhar.samudrala@intel.com>
Cc: mst@redhat.com, davem@davemloft.net, netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org,
virtio-dev@lists.oasis-open.org, jesse.brandeburg@intel.com,
alexander.h.duyck@intel.com, kubakici@wp.pl, jasowang@redhat.com,
loseweigh@gmail.com, jiri@resnulli.us, aaron.f.brown@intel.com
Subject: Re: [PATCH net-next v10 2/4] net: Introduce generic failover module
Date: Mon, 7 May 2018 16:53:06 -0700 [thread overview]
Message-ID: <20180507165306.541bd1f2@xeon-e3> (raw)
In-Reply-To: <1525731046-10989-3-git-send-email-sridhar.samudrala@intel.com>
On Mon, 7 May 2018 15:10:44 -0700
Sridhar Samudrala <sridhar.samudrala@intel.com> wrote:
> +static struct net_device *net_failover_get_bymac(u8 *mac,
> + struct net_failover_ops **ops)
> +{
> + struct net_device *failover_dev;
> + struct net_failover *failover;
> +
> + spin_lock(&net_failover_lock);
> + list_for_each_entry(failover, &net_failover_list, list) {
> + failover_dev = rtnl_dereference(failover->failover_dev);
> + if (ether_addr_equal(failover_dev->perm_addr, mac)) {
> + *ops = rtnl_dereference(failover->ops);
> + spin_unlock(&net_failover_lock);
> + return failover_dev;
> + }
> + }
> + spin_unlock(&net_failover_lock);
> + return NULL;
> +}
This is broken if non-ethernet devices such as Infiniband are present.
next prev parent reply other threads:[~2018-05-07 23:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 22:10 [PATCH net-next v10 0/4] Enable virtio_net to act as a standby for a passthru device Sridhar Samudrala
2018-05-07 22:10 ` [PATCH net-next v10 1/4] virtio_net: Introduce VIRTIO_NET_F_STANDBY feature bit Sridhar Samudrala
2018-05-07 22:10 ` [PATCH net-next v10 2/4] net: Introduce generic failover module Sridhar Samudrala
2018-05-07 22:39 ` Randy Dunlap
2018-05-11 15:43 ` Samudrala, Sridhar
2018-05-11 18:09 ` Michael S. Tsirkin
2018-05-07 23:46 ` Stephen Hemminger
2018-05-11 15:40 ` Samudrala, Sridhar
2018-05-07 23:53 ` Stephen Hemminger [this message]
2018-05-08 0:24 ` Samudrala, Sridhar
2018-05-11 17:15 ` Michael S. Tsirkin
2018-05-07 23:59 ` Stephen Hemminger
2018-05-08 0:11 ` Samudrala, Sridhar
2018-05-08 9:02 ` kbuild test robot
2018-05-07 22:10 ` [PATCH net-next v10 3/4] virtio_net: Extend virtio to use VF datapath when available Sridhar Samudrala
2018-05-07 22:10 ` [PATCH net-next v10 4/4] netvsc: refactor notifier/event handling code to use the failover framework Sridhar Samudrala
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=20180507165306.541bd1f2@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=aaron.f.brown@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=jiri@resnulli.us \
--cc=kubakici@wp.pl \
--cc=loseweigh@gmail.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sridhar.samudrala@intel.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).