Skip to content

Commit

Permalink
[TIPC]: Skip connection flow control in connectionless sockets
Browse files Browse the repository at this point in the history
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: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Apr 15, 2008
1 parent 2c8dd11 commit 9900980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9900980

Please sign in to comment.