tipc: rename and move message reassembly function
The function tipc_link_frag_rcv() is in reality a re-entrant generic message reassemby function that has nothing in particular to do with the link, where it is defined now. This becomes obvious when we see the need to call the function from other places in the code. In this commit rename it to tipc_buf_append() and move it to the file msg.c. We also simplify its signature by moving the tail pointer to the control block of the head buffer, hence making the head buffer self-contained. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -506,18 +506,14 @@ receive:
|
||||
tipc_node_unlock(node);
|
||||
tipc_link_bundle_rcv(buf);
|
||||
} else if (msg_user(msg) == MSG_FRAGMENTER) {
|
||||
int ret;
|
||||
ret = tipc_link_frag_rcv(&node->bclink.reasm_head,
|
||||
&node->bclink.reasm_tail,
|
||||
&buf);
|
||||
if (ret == LINK_REASM_ERROR)
|
||||
tipc_buf_append(&node->bclink.reasm_buf, &buf);
|
||||
if (unlikely(!buf && !node->bclink.reasm_buf))
|
||||
goto unlock;
|
||||
tipc_bclink_lock();
|
||||
bclink_accept_pkt(node, seqno);
|
||||
bcl->stats.recv_fragments++;
|
||||
if (ret == LINK_REASM_COMPLETE) {
|
||||
if (buf) {
|
||||
bcl->stats.recv_fragmented++;
|
||||
/* Point msg to inner header */
|
||||
msg = buf_msg(buf);
|
||||
tipc_bclink_unlock();
|
||||
goto receive;
|
||||
|
在新工单中引用
屏蔽一个用户