[PATCH 1/7 net-2.6.26] [TIPC]: Skip connection flow control in connectionless sockets

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <netdev@...>, <allan.stephens@...>
Date: Monday, April 14, 2008 - 5:16 pm

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>
---
 net/tipc/socket.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index ca6f52f..91aa2dc 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);
 	}
-- 
1.5.3.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7 net-2.6.26] [TIPC]: Skip connection flow control ..., Allan Stephens, (Mon Apr 14, 5:16 pm)