diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2009-06-05 01:35:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-12 00:03:21 -0400 |
commit | da6782927de809d9d427bd4bd6a4024243e41f13 (patch) | |
tree | 79419b352017a0c125c2b17e6a170589b31d8cb3 /net/core | |
parent | 746e6ad23cd6fec2edce056e014a0eabeffa838c (diff) |
bridge: Simplify interface for ATM LANE
This patch changes FDB entry check for ATM LANE bridge integration.
There's no point in holding a FDB entry around SKB building.
br_fdb_get()/br_fdb_put() pair are changed into single br_fdb_test_addr()
hook that checks if the addr has FDB entry pointing to other port
to the one the request arrived on.
FDB entry refcounting is removed as it's not used anywhere else.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a09bf658970f..ea00e36f48e1 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2071,11 +2071,13 @@ static inline int deliver_skb(struct sk_buff *skb, | |||
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) | 2073 | #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) |
2074 | /* These hooks defined here for ATM */ | 2074 | |
2075 | struct net_bridge; | 2075 | #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) |
2076 | struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, | 2076 | /* This hook is defined here for ATM LANE */ |
2077 | unsigned char *addr); | 2077 | int (*br_fdb_test_addr_hook)(struct net_device *dev, |
2078 | void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent) __read_mostly; | 2078 | unsigned char *addr) __read_mostly; |
2079 | EXPORT_SYMBOL(br_fdb_test_addr_hook); | ||
2080 | #endif | ||
2079 | 2081 | ||
2080 | /* | 2082 | /* |
2081 | * If bridge module is loaded call bridging hook. | 2083 | * If bridge module is loaded call bridging hook. |
@@ -2083,6 +2085,8 @@ void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent) __read_mostly; | |||
2083 | */ | 2085 | */ |
2084 | struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p, | 2086 | struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p, |
2085 | struct sk_buff *skb) __read_mostly; | 2087 | struct sk_buff *skb) __read_mostly; |
2088 | EXPORT_SYMBOL(br_handle_frame_hook); | ||
2089 | |||
2086 | static inline struct sk_buff *handle_bridge(struct sk_buff *skb, | 2090 | static inline struct sk_buff *handle_bridge(struct sk_buff *skb, |
2087 | struct packet_type **pt_prev, int *ret, | 2091 | struct packet_type **pt_prev, int *ret, |
2088 | struct net_device *orig_dev) | 2092 | struct net_device *orig_dev) |
@@ -5665,12 +5669,6 @@ EXPORT_SYMBOL(net_enable_timestamp); | |||
5665 | EXPORT_SYMBOL(net_disable_timestamp); | 5669 | EXPORT_SYMBOL(net_disable_timestamp); |
5666 | EXPORT_SYMBOL(dev_get_flags); | 5670 | EXPORT_SYMBOL(dev_get_flags); |
5667 | 5671 | ||
5668 | #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) | ||
5669 | EXPORT_SYMBOL(br_handle_frame_hook); | ||
5670 | EXPORT_SYMBOL(br_fdb_get_hook); | ||
5671 | EXPORT_SYMBOL(br_fdb_put_hook); | ||
5672 | #endif | ||
5673 | |||
5674 | EXPORT_SYMBOL(dev_load); | 5672 | EXPORT_SYMBOL(dev_load); |
5675 | 5673 | ||
5676 | EXPORT_PER_CPU_SYMBOL(softnet_data); | 5674 | EXPORT_PER_CPU_SYMBOL(softnet_data); |