From: Veaceslav Falico <vfalico@redhat.com>
To: netdev@vger.kernel.org
Cc: Veaceslav Falico <vfalico@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, Jiri Pirko <jiri@resnulli.us>,
Alexander Duyck <alexander.h.duyck@intel.com>,
Cong Wang <amwang@redhat.com>
Subject: [PATCH net-next 1/8] net: move netdev_upper to netdevice.h
Date: Mon, 26 Aug 2013 18:28:46 +0200 [thread overview]
Message-ID: <1377534533-6944-2-git-send-email-vfalico@redhat.com> (raw)
In-Reply-To: <1377534533-6944-1-git-send-email-vfalico@redhat.com>
So that any device can work with it to see its upper/master devices. It is
rcu'd and rtnl_lock protected, so one should either hold the rtnl_lock() or
to use the _rcu() functions for it.
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Cong Wang <amwang@redhat.com>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
include/linux/netdevice.h | 8 ++++++++
net/core/dev.c | 8 --------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 077363d..8cc7f43 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2764,6 +2764,14 @@ extern int netdev_tstamp_prequeue;
extern int weight_p;
extern int bpf_jit_enable;
+struct netdev_upper {
+ struct net_device *dev;
+ bool master;
+ struct list_head list;
+ struct rcu_head rcu;
+ struct list_head search_list;
+};
+
extern bool netdev_has_upper_dev(struct net_device *dev,
struct net_device *upper_dev);
extern bool netdev_has_any_upper_dev(struct net_device *dev);
diff --git a/net/core/dev.c b/net/core/dev.c
index 1ed2b66..f58e82a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4367,14 +4367,6 @@ softnet_break:
goto out;
}
-struct netdev_upper {
- struct net_device *dev;
- bool master;
- struct list_head list;
- struct rcu_head rcu;
- struct list_head search_list;
-};
-
static void __append_search_uppers(struct list_head *search_list,
struct net_device *dev)
{
--
1.7.1
next prev parent reply other threads:[~2013-08-26 16:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 16:28 [PATCH net-next 0/8] bonding: remove vlan special handling Veaceslav Falico
2013-08-26 16:28 ` Veaceslav Falico [this message]
2013-08-26 16:41 ` [PATCH net-next 1/8] net: move netdev_upper to netdevice.h Jiri Pirko
2013-08-26 16:55 ` Veaceslav Falico
2013-08-26 17:38 ` Jiri Pirko
2013-08-26 18:10 ` Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 2/8] bonding: use netdev_upper list in bond_vlan_used Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 3/8] bonding: make bond_arp_send_all use upper device list Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 4/8] bonding: convert bond_has_this_ip() to use upper devices Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 5/8] bonding: use vlan_uses_dev() in __bond_release_one() Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 6/8] bonding: split alb_send_learning_packets() Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 7/8] bonding: make alb_send_learning_packets() use upper dev list Veaceslav Falico
2013-08-26 16:28 ` [PATCH net-next 8/8] bonding: remove vlan_list/current_alb_vlan Veaceslav Falico
2013-08-26 20:33 ` [PATCH net-next 0/8] bonding: remove vlan special handling Veaceslav Falico
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=1377534533-6944-2-git-send-email-vfalico@redhat.com \
--to=vfalico@redhat.com \
--cc=alexander.h.duyck@intel.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.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).