From: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
fubar-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org,
andy-QlMahl40kYEqcZcGjlUOXw@public.gmane.org,
divy-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
jitendra.kalsaria-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
sony.chacko-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
linux-driver-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org,
ursula.braun-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org,
blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
linux390-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org,
shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org,
bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org,
therbert-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
gregory.v.rose-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: [patch net-next V5 08/15] cxgb3: remove usage of dev->master
Date: Wed, 2 Jan 2013 13:28:29 +0100 [thread overview]
Message-ID: <1357129716-2450-9-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1357129716-2450-1-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
Signed-off-by: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
index 942dace..3f1f501 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
@@ -182,14 +182,17 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter,
struct net_device *dev = adapter->port[i];
if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) {
+ rcu_read_lock();
if (vlan && vlan != VLAN_VID_MASK) {
- rcu_read_lock();
dev = __vlan_find_dev_deep(dev, vlan);
- rcu_read_unlock();
} else if (netif_is_bond_slave(dev)) {
- while (dev->master)
- dev = dev->master;
+ struct net_device *upper_dev;
+
+ while ((upper_dev =
+ netdev_master_upper_dev_get_rcu(dev)))
+ dev = upper_dev;
}
+ rcu_read_unlock();
return dev;
}
}
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-01-02 12:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-02 12:28 [patch net-next V5 00/15] net: introduce upper device lists and remove dev->master Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 01/15] net: introduce upper device lists Jiri Pirko
[not found] ` <1357129716-2450-2-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2013-01-02 18:57 ` Ben Hutchings
2013-01-02 12:28 ` [patch net-next V5 02/15] macvlan: add link to upper device Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 04/15] rtnetlink: remove usage of dev->master Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 05/15] team: remove usage of netdev_set_master() Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 06/15] bridge: " Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 07/15] netpoll: remove usage of dev->master Jiri Pirko
[not found] ` <1357129716-2450-1-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2013-01-02 12:28 ` [patch net-next V5 03/15] vlan: add link to upper device Jiri Pirko
2013-01-02 12:28 ` Jiri Pirko [this message]
2013-01-02 12:28 ` [patch net-next V5 09/15] qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 10/15] qeth: ensure that __vlan_find_dev_deep() is called with rcu_read_lock Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 11/15] vlan: remove usage of dev->master in __vlan_find_dev_deep() Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 12/15] nes: remove usage of dev->master Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 13/15] bonding: " Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 14/15] net: remove no longer used netdev_set_bond_master() and netdev_set_master() Jiri Pirko
2013-01-02 12:28 ` [patch net-next V5 15/15] net: kill dev->master Jiri Pirko
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=1357129716-2450-9-git-send-email-jiri@resnulli.us \
--to=jiri-rhqaubhg3fbzbrfiqnyvsa@public.gmane.org \
--cc=andy-QlMahl40kYEqcZcGjlUOXw@public.gmane.org \
--cc=bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org \
--cc=blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=bridge-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=divy-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
--cc=edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=fubar-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=gregory.v.rose-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jitendra.kalsaria-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org \
--cc=linux-driver-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux390-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org \
--cc=sony.chacko-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=therbert-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=ursula.braun-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).