summaryrefslogtreecommitdiff
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-06-25 20:41:35 -0500
committerDavid S. Miller <davem@davemloft.net>2014-06-27 12:50:55 -0700
commit8db1bae30b7cd3c3abc05f467d0f7c69b33b80e9 (patch)
tree56622a57982a53e970500bbb8f3f2abbc542cf02 /net/tipc/msg.h
parent067608e9d019d6477fd45dd948e81af0e5bf599f (diff)
tipc: separate building and sending of rejected messages
The way we build and send rejected message is currenty perceived as hard to follow, partly because we let the transmission go via deep call chains through functions such as tipc_reject_msg() and net_route_msg(). We want to remove those functions, and make the call sequences shallower and simpler. For this purpose, we separate building and sending of rejected messages. We build the reject message using the new function tipc_msg_reverse(), and let the transmission go via the newly introduced tipc_link_xmit2() function, as all transmission eventually will do. We also ensure that all calls to tipc_link_xmit2() are made outside port_lock/bh_lock_sock. Finally, we replace all calls to tipc_reject_msg() with the two new calls at all locations in the code that we want to keep. The remaining calls are made from code that we are planning to remove, along with tipc_reject_msg() itself. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r--net/tipc/msg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 5e1339d60c69..38050941a504 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -725,6 +725,8 @@ static inline u32 msg_tot_origport(struct tipc_msg *m)
return msg_origport(m);
}
+bool tipc_msg_reverse(struct sk_buff *buf, u32 *dnode, int err);
+
void tipc_msg_init(struct tipc_msg *m, u32 user, u32 type, u32 hsize,
u32 destnode);