diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-01-09 02:27:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-12 16:24:33 -0500 |
commit | 1da465683a93142488a54a9038155f23d6349441 (patch) | |
tree | 95ccbeb4302d4b18fe0e12bfbb2b6b819ad84614 /net/tipc/bearer.c | |
parent | 7f9f95d9d9bcdf253c4149a157b096958013eceb (diff) |
tipc: make tipc broadcast link support net namespace
TIPC broadcast link is statically established and its relevant states
are maintained with the global variables: "bcbearer", "bclink" and
"bcl". Allowing different namespace to own different broadcast link
instances, these variables must be moved to tipc_net structure and
broadcast link instances would be allocated and initialized when
namespace is created.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Tested-by: Tero Aho <Tero.Aho@coriant.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 2fe9dcb418d4..9a0d6ed5c96c 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "bearer.h" | 40 | #include "bearer.h" |
41 | #include "link.h" | 41 | #include "link.h" |
42 | #include "discover.h" | 42 | #include "discover.h" |
43 | #include "bcast.h" | ||
43 | 44 | ||
44 | #define MAX_ADDR_STR 60 | 45 | #define MAX_ADDR_STR 60 |
45 | 46 | ||
@@ -482,8 +483,8 @@ void tipc_disable_l2_media(struct tipc_bearer *b) | |||
482 | * @b_ptr: the bearer through which the packet is to be sent | 483 | * @b_ptr: the bearer through which the packet is to be sent |
483 | * @dest: peer destination address | 484 | * @dest: peer destination address |
484 | */ | 485 | */ |
485 | int tipc_l2_send_msg(struct sk_buff *buf, struct tipc_bearer *b, | 486 | int tipc_l2_send_msg(struct net *net, struct sk_buff *buf, |
486 | struct tipc_media_addr *dest) | 487 | struct tipc_bearer *b, struct tipc_media_addr *dest) |
487 | { | 488 | { |
488 | struct sk_buff *clone; | 489 | struct sk_buff *clone; |
489 | struct net_device *dev; | 490 | struct net_device *dev; |
@@ -528,7 +529,7 @@ void tipc_bearer_send(struct net *net, u32 bearer_id, struct sk_buff *buf, | |||
528 | rcu_read_lock(); | 529 | rcu_read_lock(); |
529 | b_ptr = rcu_dereference_rtnl(tn->bearer_list[bearer_id]); | 530 | b_ptr = rcu_dereference_rtnl(tn->bearer_list[bearer_id]); |
530 | if (likely(b_ptr)) | 531 | if (likely(b_ptr)) |
531 | b_ptr->media->send_msg(buf, b_ptr, dest); | 532 | b_ptr->media->send_msg(net, buf, b_ptr, dest); |
532 | rcu_read_unlock(); | 533 | rcu_read_unlock(); |
533 | } | 534 | } |
534 | 535 | ||