diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-04-15 00:06:12 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-15 00:06:12 -0700 |
commit | 990098068fe963f956c14f681bd88d90dcb14584 (patch) | |
tree | 3ac3fe3f2e9ab8733fe89f26f7121e62a55b0659 /net/tipc | |
parent | 2c8dd11636e3a5f14a7fb765331b7043f01fe937 (diff) | |
download | linux-stable-990098068fe963f956c14f681bd88d90dcb14584.tar.gz linux-stable-990098068fe963f956c14f681bd88d90dcb14584.tar.bz2 linux-stable-990098068fe963f956c14f681bd88d90dcb14584.zip |
[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 <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | 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 ca6f52f392a9..91aa2dc51771 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); } |