aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.h
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-11-19 05:32:12 -0500
committerJames Morris <james.l.morris@oracle.com>2014-11-19 05:32:12 -0500
commitb10778a00d40b3d9fdaaf5891e802794781ff71c (patch)
tree6ba4cbac86eecedc3f30650e7f764ecf00c83898 /net/tipc/node.h
parent594081ee7145cc30a3977cb4e218f81213b63dc5 (diff)
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
Merge commit 'v3.17' into next
Diffstat (limited to 'net/tipc/node.h')
-rw-r--r--net/tipc/node.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h
index 9087063793f2..b61716a8218e 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -41,6 +41,7 @@
41#include "addr.h" 41#include "addr.h"
42#include "net.h" 42#include "net.h"
43#include "bearer.h" 43#include "bearer.h"
44#include "msg.h"
44 45
45/* 46/*
46 * Out-of-range value for node signature 47 * Out-of-range value for node signature
@@ -105,6 +106,7 @@ struct tipc_node {
105 spinlock_t lock; 106 spinlock_t lock;
106 struct hlist_node hash; 107 struct hlist_node hash;
107 struct tipc_link *active_links[2]; 108 struct tipc_link *active_links[2];
109 u32 act_mtus[2];
108 struct tipc_link *links[MAX_BEARERS]; 110 struct tipc_link *links[MAX_BEARERS];
109 unsigned int action_flags; 111 unsigned int action_flags;
110 struct tipc_node_bclink bclink; 112 struct tipc_node_bclink bclink;
@@ -143,4 +145,19 @@ static inline bool tipc_node_blocked(struct tipc_node *node)
143 TIPC_NOTIFY_NODE_DOWN | TIPC_WAIT_OWN_LINKS_DOWN)); 145 TIPC_NOTIFY_NODE_DOWN | TIPC_WAIT_OWN_LINKS_DOWN));
144} 146}
145 147
148static inline uint tipc_node_get_mtu(u32 addr, u32 selector)
149{
150 struct tipc_node *node;
151 u32 mtu;
152
153 node = tipc_node_find(addr);
154
155 if (likely(node))
156 mtu = node->act_mtus[selector & 1];
157 else
158 mtu = MAX_MSG_SIZE;
159
160 return mtu;
161}
162
146#endif 163#endif