diff options
| author | 2014-11-19 21:32:12 +1100 | |
|---|---|---|
| committer | 2014-11-19 21:32:12 +1100 | |
| commit | b10778a00d40b3d9fdaaf5891e802794781ff71c (patch) | |
| tree | 6ba4cbac86eecedc3f30650e7f764ecf00c83898 /net/tipc/node.h | |
| parent | integrity: do zero padding of the key id (diff) | |
| parent | Linux 3.17 (diff) | |
| download | wireguard-linux-b10778a00d40b3d9fdaaf5891e802794781ff71c.tar.xz wireguard-linux-b10778a00d40b3d9fdaaf5891e802794781ff71c.zip | |
Merge commit 'v3.17' into next
Diffstat (limited to '')
| -rw-r--r-- | net/tipc/node.h | 17 | 
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 @@  #include "addr.h"  #include "net.h"  #include "bearer.h" +#include "msg.h"  /*   * Out-of-range value for node signature @@ -105,6 +106,7 @@ struct tipc_node {  	spinlock_t lock;  	struct hlist_node hash;  	struct tipc_link *active_links[2]; +	u32 act_mtus[2];  	struct tipc_link *links[MAX_BEARERS];  	unsigned int action_flags;  	struct tipc_node_bclink bclink; @@ -143,4 +145,19 @@ static inline bool tipc_node_blocked(struct tipc_node *node)  		TIPC_NOTIFY_NODE_DOWN | TIPC_WAIT_OWN_LINKS_DOWN));  } +static inline uint tipc_node_get_mtu(u32 addr, u32 selector) +{ +	struct tipc_node *node; +	u32 mtu; + +	node = tipc_node_find(addr); + +	if (likely(node)) +		mtu = node->act_mtus[selector & 1]; +	else +		mtu = MAX_MSG_SIZE; + +	return mtu; +} +  #endif | 
