aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-09 02:27:05 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-12 16:24:32 -0500
commitf2f9800d4955a96d92896841d8ba9b04201deaa1 (patch)
tree3b817800cfd8fcb2de6d5a3d7eb4fff972fba681 /net/tipc/link.h
parentc93d3baa24095887005647984cff5de8c63d3611 (diff)
tipc: make tipc node table aware of net namespace
Global variables associated with node table are below: - node table list (node_htable) - node hash table list (tipc_node_list) - node table lock (node_list_lock) - node number counter (tipc_num_nodes) - node link number counter (tipc_num_links) To make node table support namespace, above global variables must be moved to tipc_net structure in order to keep secret for different namespaces. As a consequence, these variables are allocated and initialized when namespace is created, and deallocated when namespace is destroyed. After the change, functions associated with these variables have to utilize a namespace pointer to access them. So adding namespace pointer as a parameter of these functions is the major change made in the commit. 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/link.h')
-rw-r--r--net/tipc/link.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h
index 692268dca4b9..380e27ee0f70 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -200,27 +200,31 @@ struct tipc_port;
200struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, 200struct tipc_link *tipc_link_create(struct tipc_node *n_ptr,
201 struct tipc_bearer *b_ptr, 201 struct tipc_bearer *b_ptr,
202 const struct tipc_media_addr *media_addr); 202 const struct tipc_media_addr *media_addr);
203void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down); 203void tipc_link_delete_list(struct net *net, unsigned int bearer_id,
204 bool shutting_down);
204void tipc_link_failover_send_queue(struct tipc_link *l_ptr); 205void tipc_link_failover_send_queue(struct tipc_link *l_ptr);
205void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest); 206void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest);
206void tipc_link_reset_fragments(struct tipc_link *l_ptr); 207void tipc_link_reset_fragments(struct tipc_link *l_ptr);
207int tipc_link_is_up(struct tipc_link *l_ptr); 208int tipc_link_is_up(struct tipc_link *l_ptr);
208int tipc_link_is_active(struct tipc_link *l_ptr); 209int tipc_link_is_active(struct tipc_link *l_ptr);
209void tipc_link_purge_queues(struct tipc_link *l_ptr); 210void tipc_link_purge_queues(struct tipc_link *l_ptr);
210struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, 211struct sk_buff *tipc_link_cmd_config(struct net *net, const void *req_tlv_area,
211 int req_tlv_space, 212 int req_tlv_space, u16 cmd);
212 u16 cmd); 213struct sk_buff *tipc_link_cmd_show_stats(struct net *net,
213struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, 214 const void *req_tlv_area,
214 int req_tlv_space); 215 int req_tlv_space);
215struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, 216struct sk_buff *tipc_link_cmd_reset_stats(struct net *net,
217 const void *req_tlv_area,
216 int req_tlv_space); 218 int req_tlv_space);
217void tipc_link_reset_all(struct tipc_node *node); 219void tipc_link_reset_all(struct tipc_node *node);
218void tipc_link_reset(struct tipc_link *l_ptr); 220void tipc_link_reset(struct tipc_link *l_ptr);
219void tipc_link_reset_list(unsigned int bearer_id); 221void tipc_link_reset_list(struct net *net, unsigned int bearer_id);
220int tipc_link_xmit_skb(struct sk_buff *skb, u32 dest, u32 selector); 222int tipc_link_xmit_skb(struct net *net, struct sk_buff *skb, u32 dest,
221int tipc_link_xmit(struct sk_buff_head *list, u32 dest, u32 selector); 223 u32 selector);
224int tipc_link_xmit(struct net *net, struct sk_buff_head *list, u32 dest,
225 u32 selector);
222int __tipc_link_xmit(struct tipc_link *link, struct sk_buff_head *list); 226int __tipc_link_xmit(struct tipc_link *link, struct sk_buff_head *list);
223void tipc_link_bundle_rcv(struct sk_buff *buf); 227void tipc_link_bundle_rcv(struct net *net, struct sk_buff *buf);
224void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob, 228void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob,
225 u32 gap, u32 tolerance, u32 priority, u32 acked_mtu); 229 u32 gap, u32 tolerance, u32 priority, u32 acked_mtu);
226void tipc_link_push_packets(struct tipc_link *l_ptr); 230void tipc_link_push_packets(struct tipc_link *l_ptr);