summaryrefslogtreecommitdiff
path: root/net/tipc/msg.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-11-26 11:41:49 +0800
committerDavid S. Miller <davem@davemloft.net>2014-11-26 12:30:17 -0500
commit58311d169083f1940c7ce64cb6bf736e2a023cd0 (patch)
tree4a6381e83b0c30aba89b39d8b7a522d0ffa6028b /net/tipc/msg.c
parent47b4c9a82f2ed0c00aa1c20899b41f54d6f8a07a (diff)
tipc: eliminate two pseudo message types of BUNDLE_OPEN and BUNDLE_CLOSED
The pseudo message types of BUNDLE_CLOSED as well as BUNDLE_OPEN are used to flag whether or not more messages can be bundled into a data packet in the outgoing transmission queue. Obviously, no more messages can be appended after the packet has been sent and is waiting to be acknowledged and deleted. These message types do in reality represent a send-side local implementation flag, and are not defined as part of the protocol. It is therefore safe to move it to to where it belongs, that is, the control area (TIPC_SKB_CB) of the buffer. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r--net/tipc/msg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 9155496b8a8a..94db39217248 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -289,7 +289,7 @@ bool tipc_msg_bundle(struct sk_buff *bbuf, struct sk_buff *buf, u32 mtu)
return false;
if (likely(msg_user(bmsg) != MSG_BUNDLER))
return false;
- if (likely(msg_type(bmsg) != BUNDLE_OPEN))
+ if (likely(!TIPC_SKB_CB(bbuf)->bundling))
return false;
if (unlikely(skb_tailroom(bbuf) < (pad + msz)))
return false;
@@ -336,11 +336,12 @@ bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode)
skb_trim(bbuf, INT_H_SIZE);
bmsg = buf_msg(bbuf);
- tipc_msg_init(bmsg, MSG_BUNDLER, BUNDLE_OPEN, INT_H_SIZE, dnode);
+ tipc_msg_init(bmsg, MSG_BUNDLER, 0, INT_H_SIZE, dnode);
msg_set_seqno(bmsg, msg_seqno(msg));
msg_set_ack(bmsg, msg_ack(msg));
msg_set_bcast_ack(bmsg, msg_bcast_ack(msg));
bbuf->next = (*buf)->next;
+ TIPC_SKB_CB(bbuf)->bundling = true;
tipc_msg_bundle(bbuf, *buf, mtu);
*buf = bbuf;
return true;