diff options
author | David S. Miller <davem@davemloft.net> | 2014-06-27 12:51:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-27 12:51:00 -0700 |
commit | 0ff9275a4b1d6b1b0439a79c9cf7c03b38dbe24d (patch) | |
tree | d8d74d0ae3e05b1228498f5db04ff88a66b03035 /net/tipc/node.h | |
parent | f5b265039f1381ec048a4d61d47130f71abb119b (diff) | |
parent | 60120526c26f42fd658e32bf4a6d548483d09da8 (diff) | |
download | linux-0ff9275a4b1d6b1b0439a79c9cf7c03b38dbe24d.tar.gz linux-0ff9275a4b1d6b1b0439a79c9cf7c03b38dbe24d.tar.xz |
Merge branch 'tipc-next'
Jon Maloy says:
====================
tipc: new unicast transmission code
As a step towards making the data transmission code more maintainable
and performant, we introduce a number of new functions, both for
building, sending and rejecting messages. The new functions will
eventually be used for alla data transmission, user data unicast,
service internal messaging, and multicast/broadcast.
We start with this series, where we introduce the functions, and
let user data unicast and the internal connection protocol use them.
The remaining users will come in a later series.
There are only minor changes to data structures, and no protocol
changes, so the older functions can still be used in parallel for
some time. Until the old functions are removed, we use temporary
names for the new functions, such as tipc_build_msg2, tipc_link_xmit2.
It should be noted that the first two commits are unrelated to the
rest of the series.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.h')
-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 |