aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index eff58dc53aa1..a1845fb27d80 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -66,11 +66,13 @@ struct tipc_bc_base;
66struct tipc_link; 66struct tipc_link;
67struct tipc_name_table; 67struct tipc_name_table;
68struct tipc_server; 68struct tipc_server;
69struct tipc_monitor;
69 70
70#define TIPC_MOD_VER "2.0.0" 71#define TIPC_MOD_VER "2.0.0"
71 72
72#define NODE_HTABLE_SIZE 512 73#define NODE_HTABLE_SIZE 512
73#define MAX_BEARERS 3 74#define MAX_BEARERS 3
75#define TIPC_DEF_MON_THRESHOLD 32
74 76
75extern int tipc_net_id __read_mostly; 77extern int tipc_net_id __read_mostly;
76extern int sysctl_tipc_rmem[3] __read_mostly; 78extern int sysctl_tipc_rmem[3] __read_mostly;
@@ -88,6 +90,10 @@ struct tipc_net {
88 u32 num_nodes; 90 u32 num_nodes;
89 u32 num_links; 91 u32 num_links;
90 92
93 /* Neighbor monitoring list */
94 struct tipc_monitor *monitors[MAX_BEARERS];
95 int mon_threshold;
96
91 /* Bearer list */ 97 /* Bearer list */
92 struct tipc_bearer __rcu *bearer_list[MAX_BEARERS + 1]; 98 struct tipc_bearer __rcu *bearer_list[MAX_BEARERS + 1];
93 99
@@ -126,6 +132,11 @@ static inline struct list_head *tipc_nodes(struct net *net)
126 return &tipc_net(net)->node_list; 132 return &tipc_net(net)->node_list;
127} 133}
128 134
135static inline unsigned int tipc_hashfn(u32 addr)
136{
137 return addr & (NODE_HTABLE_SIZE - 1);
138}
139
129static inline u16 mod(u16 x) 140static inline u16 mod(u16 x)
130{ 141{
131 return x & 0xffffu; 142 return x & 0xffffu;