summaryrefslogtreecommitdiff
path: root/net/bridge/br_private.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-06-15 10:50:45 +0400
committerDavid S. Miller <davem@davemloft.net>2010-06-15 22:48:58 +0400
commitf350a0a87374418635689471606454abc7beaa3a (patch)
treec8210542a9848f6b5953b58d2ba1dbfb11715f14 /net/bridge/br_private.h
parenta35e2c1b6d90544b3c688783869817628e5f9607 (diff)
downloadlinux-f350a0a87374418635689471606454abc7beaa3a.tar.xz
bridge: use rx_handler_data pointer to store net_bridge_port pointer
Register net_bridge_port pointer as rx_handler data pointer. As br_port is removed from struct net_device, another netdev priv_flag is added to indicate the device serves as a bridge port. Also rcuized pointers are now correctly dereferenced in br_fdb.c and in netfilter parts. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r--net/bridge/br_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 0f5394c4f2f1..f6bc979b1135 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -150,6 +150,11 @@ struct net_bridge_port
#endif
};
+#define br_port_get_rcu(dev) \
+ ((struct net_bridge_port *) rcu_dereference(dev->rx_handler_data))
+#define br_port_get(dev) ((struct net_bridge_port *) dev->rx_handler_data)
+#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
+
struct br_cpu_netstats {
unsigned long rx_packets;
unsigned long rx_bytes;