netdev
[Top] [All Lists]

Re: question about linux tcp request queue handling

To: Paul Albrecht <palbrecht@xxxxxxxxx>
Subject: Re: question about linux tcp request queue handling
From: Nivedita Singhvi <niv@xxxxxxxxxx>
Date: Sun, 06 Jul 2003 16:59:30 -0700
Cc: linux-kernel@xxxxxxxxxxxxxxx, netdev <netdev@xxxxxxxxxxx>
In-reply-to: <001a01c3441c$6fe111a0$6801a8c0@oemcomputer>
References: <3F08858E.8000907@xxxxxxxxxx> <001a01c3441c$6fe111a0$6801a8c0@oemcomputer>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130
Paul Albrecht wrote:

My server program sets its backlog to one and pauses ninety seconds before
accepting connections.  Within that ninety second interval, I start three
client programs that do an active open to my server.  I expect one of
connections to get discarded when the server's connection backlog limit is
exceeded.

We actually have two queues - the syn queue and the socket
acccept queue. We move the connection request from the syn
queue to the accept queue of the socket once the 3 way
handshake is complete - i.e. once the state is ESTABLISHED.

If the syn queue is full, requests will get dropped and
the socket will not change state.

When you set a the backlog to 1 in the listen call, what is
being capped is the accept queue. So I would expect your
server to allow only one of those requests in the accept
queue, and the kernel will drop the other two requests.

Actually, details, but we also apply some other conditions
before we actually drop the connection request - we try not to be
so harsh if the syn queue is still fairly empty..

Think thats so, at any rate :).

Nivedita





<Prev in Thread] Current Thread [Next in Thread>