diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-01-09 02:27:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-12 16:24:32 -0500 |
commit | f2f9800d4955a96d92896841d8ba9b04201deaa1 (patch) | |
tree | 3b817800cfd8fcb2de6d5a3d7eb4fff972fba681 /net/tipc/link.h | |
parent | c93d3baa24095887005647984cff5de8c63d3611 (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.h | 24 |
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; | |||
200 | struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, | 200 | struct 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); |
203 | void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down); | 203 | void tipc_link_delete_list(struct net *net, unsigned int bearer_id, |
204 | bool shutting_down); | ||
204 | void tipc_link_failover_send_queue(struct tipc_link *l_ptr); | 205 | void tipc_link_failover_send_queue(struct tipc_link *l_ptr); |
205 | void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest); | 206 | void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest); |
206 | void tipc_link_reset_fragments(struct tipc_link *l_ptr); | 207 | void tipc_link_reset_fragments(struct tipc_link *l_ptr); |
207 | int tipc_link_is_up(struct tipc_link *l_ptr); | 208 | int tipc_link_is_up(struct tipc_link *l_ptr); |
208 | int tipc_link_is_active(struct tipc_link *l_ptr); | 209 | int tipc_link_is_active(struct tipc_link *l_ptr); |
209 | void tipc_link_purge_queues(struct tipc_link *l_ptr); | 210 | void tipc_link_purge_queues(struct tipc_link *l_ptr); |
210 | struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, | 211 | struct 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); | 213 | struct sk_buff *tipc_link_cmd_show_stats(struct net *net, |
213 | struct 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); |
215 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, | 216 | struct 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); |
217 | void tipc_link_reset_all(struct tipc_node *node); | 219 | void tipc_link_reset_all(struct tipc_node *node); |
218 | void tipc_link_reset(struct tipc_link *l_ptr); | 220 | void tipc_link_reset(struct tipc_link *l_ptr); |
219 | void tipc_link_reset_list(unsigned int bearer_id); | 221 | void tipc_link_reset_list(struct net *net, unsigned int bearer_id); |
220 | int tipc_link_xmit_skb(struct sk_buff *skb, u32 dest, u32 selector); | 222 | int tipc_link_xmit_skb(struct net *net, struct sk_buff *skb, u32 dest, |
221 | int tipc_link_xmit(struct sk_buff_head *list, u32 dest, u32 selector); | 223 | u32 selector); |
224 | int tipc_link_xmit(struct net *net, struct sk_buff_head *list, u32 dest, | ||
225 | u32 selector); | ||
222 | int __tipc_link_xmit(struct tipc_link *link, struct sk_buff_head *list); | 226 | int __tipc_link_xmit(struct tipc_link *link, struct sk_buff_head *list); |
223 | void tipc_link_bundle_rcv(struct sk_buff *buf); | 227 | void tipc_link_bundle_rcv(struct net *net, struct sk_buff *buf); |
224 | void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob, | 228 | void 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); |
226 | void tipc_link_push_packets(struct tipc_link *l_ptr); | 230 | void tipc_link_push_packets(struct tipc_link *l_ptr); |