From: Allan Stephens Date: Tue, 15 Apr 2008 07:06:12 +0000 (-0700) Subject: [TIPC]: Skip connection flow control in connectionless sockets X-Git-Tag: v2.6.26-rc1~1138^2~85 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=990098068fe963f956c14f681bd88d90dcb14584;p=linux-2.6-omap-h63xx.git [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: Allan Stephens Signed-off-by: David S. Miller --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index ca6f52f392a..91aa2dc5177 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -919,7 +919,8 @@ restart: /* 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); }