aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2009-06-05 01:35:28 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-12 00:03:21 -0400
commitda6782927de809d9d427bd4bd6a4024243e41f13 (patch)
tree79419b352017a0c125c2b17e6a170589b31d8cb3 /net/atm
parent746e6ad23cd6fec2edce056e014a0eabeffa838c (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/atm')
-rw-r--r--net/atm/lec.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 199b6bb79f42..75b9d59553fc 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -34,7 +34,6 @@
34 34
35/* Proxy LEC knows about bridging */ 35/* Proxy LEC knows about bridging */
36#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) 36#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
37#include <linux/if_bridge.h>
38#include "../bridge/br_private.h" 37#include "../bridge/br_private.h"
39 38
40static unsigned char bridge_ula_lec[] = { 0x01, 0x80, 0xc2, 0x00, 0x00 }; 39static unsigned char bridge_ula_lec[] = { 0x01, 0x80, 0xc2, 0x00, 0x00 };
@@ -518,18 +517,14 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
518 case l_should_bridge: 517 case l_should_bridge:
519#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) 518#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
520 { 519 {
521 struct net_bridge_fdb_entry *f;
522
523 pr_debug("%s: bridge zeppelin asks about %pM\n", 520 pr_debug("%s: bridge zeppelin asks about %pM\n",
524 dev->name, mesg->content.proxy.mac_addr); 521 dev->name, mesg->content.proxy.mac_addr);
525 522
526 if (br_fdb_get_hook == NULL || dev->br_port == NULL) 523 if (br_fdb_test_addr_hook == NULL)
527 break; 524 break;
528 525
529 f = br_fdb_get_hook(dev->br_port->br, 526 if (br_fdb_test_addr_hook(dev,
530 mesg->content.proxy.mac_addr); 527 mesg->content.proxy.mac_addr)) {
531 if (f != NULL && f->dst->dev != dev
532 && f->dst->state == BR_STATE_FORWARDING) {
533 /* hit from bridge table, send LE_ARP_RESPONSE */ 528 /* hit from bridge table, send LE_ARP_RESPONSE */
534 struct sk_buff *skb2; 529 struct sk_buff *skb2;
535 struct sock *sk; 530 struct sock *sk;
@@ -540,10 +535,8 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
540 skb2 = 535 skb2 =
541 alloc_skb(sizeof(struct atmlec_msg), 536 alloc_skb(sizeof(struct atmlec_msg),
542 GFP_ATOMIC); 537 GFP_ATOMIC);
543 if (skb2 == NULL) { 538 if (skb2 == NULL)
544 br_fdb_put_hook(f);
545 break; 539 break;
546 }
547 skb2->len = sizeof(struct atmlec_msg); 540 skb2->len = sizeof(struct atmlec_msg);
548 skb_copy_to_linear_data(skb2, mesg, 541 skb_copy_to_linear_data(skb2, mesg,
549 sizeof(*mesg)); 542 sizeof(*mesg));
@@ -552,8 +545,6 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
552 skb_queue_tail(&sk->sk_receive_queue, skb2); 545 skb_queue_tail(&sk->sk_receive_queue, skb2);
553 sk->sk_data_ready(sk, skb2->len); 546 sk->sk_data_ready(sk, skb2->len);
554 } 547 }
555 if (f != NULL)
556 br_fdb_put_hook(f);
557 } 548 }
558#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ 549#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */
559 break; 550 break;