Commit a7dc51ad authored by Jon Maloy's avatar Jon Maloy Committed by David S. Miller

tipc: rename function msg_get_wrapped() to msg_inner_hdr()

We rename the inline function msg_get_wrapped() to the more
comprehensible msg_inner_hdr().
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20c67312
...@@ -323,7 +323,7 @@ static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb, ...@@ -323,7 +323,7 @@ static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
hdr = buf_msg(skb); hdr = buf_msg(skb);
if (msg_user(hdr) == MSG_FRAGMENTER) if (msg_user(hdr) == MSG_FRAGMENTER)
hdr = msg_get_wrapped(hdr); hdr = msg_inner_hdr(hdr);
if (msg_type(hdr) != TIPC_MCAST_MSG) if (msg_type(hdr) != TIPC_MCAST_MSG)
return 0; return 0;
...@@ -392,7 +392,7 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts, ...@@ -392,7 +392,7 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts,
skb = skb_peek(pkts); skb = skb_peek(pkts);
hdr = buf_msg(skb); hdr = buf_msg(skb);
if (msg_user(hdr) == MSG_FRAGMENTER) if (msg_user(hdr) == MSG_FRAGMENTER)
hdr = msg_get_wrapped(hdr); hdr = msg_inner_hdr(hdr);
msg_set_is_rcast(hdr, method->rcast); msg_set_is_rcast(hdr, method->rcast);
/* Switch method ? */ /* Switch method ? */
......
...@@ -732,7 +732,7 @@ static void link_profile_stats(struct tipc_link *l) ...@@ -732,7 +732,7 @@ static void link_profile_stats(struct tipc_link *l)
if (msg_user(msg) == MSG_FRAGMENTER) { if (msg_user(msg) == MSG_FRAGMENTER) {
if (msg_type(msg) != FIRST_FRAGMENT) if (msg_type(msg) != FIRST_FRAGMENT)
return; return;
length = msg_size(msg_get_wrapped(msg)); length = msg_size(msg_inner_hdr(msg));
} }
l->stats.msg_lengths_total += length; l->stats.msg_lengths_total += length;
l->stats.msg_length_counts++; l->stats.msg_length_counts++;
......
...@@ -308,7 +308,7 @@ static inline unchar *msg_data(struct tipc_msg *m) ...@@ -308,7 +308,7 @@ static inline unchar *msg_data(struct tipc_msg *m)
return ((unchar *)m) + msg_hdr_sz(m); return ((unchar *)m) + msg_hdr_sz(m);
} }
static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m) static inline struct tipc_msg *msg_inner_hdr(struct tipc_msg *m)
{ {
return (struct tipc_msg *)msg_data(m); return (struct tipc_msg *)msg_data(m);
} }
...@@ -486,7 +486,7 @@ static inline void msg_set_prevnode(struct tipc_msg *m, u32 a) ...@@ -486,7 +486,7 @@ static inline void msg_set_prevnode(struct tipc_msg *m, u32 a)
static inline u32 msg_origport(struct tipc_msg *m) static inline u32 msg_origport(struct tipc_msg *m)
{ {
if (msg_user(m) == MSG_FRAGMENTER) if (msg_user(m) == MSG_FRAGMENTER)
m = msg_get_wrapped(m); m = msg_inner_hdr(m);
return msg_word(m, 4); return msg_word(m, 4);
} }
......
...@@ -1649,7 +1649,7 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb, ...@@ -1649,7 +1649,7 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
int usr = msg_user(hdr); int usr = msg_user(hdr);
int mtyp = msg_type(hdr); int mtyp = msg_type(hdr);
u16 oseqno = msg_seqno(hdr); u16 oseqno = msg_seqno(hdr);
u16 iseqno = msg_seqno(msg_get_wrapped(hdr)); u16 iseqno = msg_seqno(msg_inner_hdr(hdr));
u16 exp_pkts = msg_msgcnt(hdr); u16 exp_pkts = msg_msgcnt(hdr);
u16 rcv_nxt, syncpt, dlv_nxt, inputq_len; u16 rcv_nxt, syncpt, dlv_nxt, inputq_len;
int state = n->state; int state = n->state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment