提交 99009806 编写于 作者: A Allan Stephens 提交者: David S. Miller

[TIPC]: Skip connection flow control in connectionless sockets

This patch optimizes the receive path for SOCK_DGRAM and SOCK_RDM
messages by skipping over code that handles connection-based flow
control.
Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2c8dd116
......@@ -919,7 +919,8 @@ static int recv_msg(struct kiocb *iocb, struct socket *sock,
/* Consume received message (optional) */
if (likely(!(flags & MSG_PEEK))) {
if (unlikely(++tsock->p->conn_unacked >= TIPC_FLOW_CONTROL_WIN))
if ((sock->state != SS_READY) &&
(++tsock->p->conn_unacked >= TIPC_FLOW_CONTROL_WIN))
tipc_acknowledge(tsock->p->ref, tsock->p->conn_unacked);
advance_queue(tsock);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册