aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 8452454..d93178f 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -68,10 +68,10 @@
* Message header sizes
*/
-#define SHORT_H_SIZE 24 /* Connected, in-cluster messages */
-#define DIR_MSG_H_SIZE 32 /* Directly addressed messages */
-#define LONG_H_SIZE 40 /* Named messages */
-#define MCAST_H_SIZE 44 /* Multicast messages */
+#define SHORT_H_SIZE 24 /* In-cluster basic payload message */
+#define BASIC_H_SIZE 32 /* Basic payload message */
+#define NAMED_H_SIZE 40 /* Named payload message */
+#define MCAST_H_SIZE 44 /* Multicast payload message */
#define INT_H_SIZE 40 /* Internal messages */
#define MIN_H_SIZE 24 /* Smallest legal TIPC header size */
#define MAX_H_SIZE 60 /* Largest possible TIPC header size */
@@ -311,26 +311,6 @@ static inline void msg_set_seqno(struct tipc_msg *m, u32 n)
}
/*
- * TIPC may utilize the "link ack #" and "link seq #" fields of a short
- * message header to hold the destination node for the message, since the
- * normal "dest node" field isn't present. This cache is only referenced
- * when required, so populating the cache of a longer message header is
- * harmless (as long as the header has the two link sequence fields present).
- *
- * Note: Host byte order is OK here, since the info never goes off-card.
- */
-
-static inline u32 msg_destnode_cache(struct tipc_msg *m)
-{
- return m->hdr[2];
-}
-
-static inline void msg_set_destnode_cache(struct tipc_msg *m, u32 dnode)
-{
- m->hdr[2] = dnode;
-}
-
-/*
* Words 3-10
*/
@@ -377,7 +357,7 @@ static inline void msg_set_mc_netid(struct tipc_msg *m, u32 p)
static inline int msg_short(struct tipc_msg *m)
{
- return msg_hdr_sz(m) == 24;
+ return msg_hdr_sz(m) == SHORT_H_SIZE;
}
static inline u32 msg_orignode(struct tipc_msg *m)
@@ -635,7 +615,7 @@ static inline u32 msg_link_selector(struct tipc_msg *m)
static inline void msg_set_link_selector(struct tipc_msg *m, u32 n)
{
- msg_set_bits(m, 4, 0, 1, (n & 1));
+ msg_set_bits(m, 4, 0, 1, n);
}
/*
@@ -659,7 +639,7 @@ static inline u32 msg_probe(struct tipc_msg *m)
static inline void msg_set_probe(struct tipc_msg *m, u32 val)
{
- msg_set_bits(m, 5, 0, 1, (val & 1));
+ msg_set_bits(m, 5, 0, 1, val);
}
static inline char msg_net_plane(struct tipc_msg *m)