lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #46696] accepts_pending not decreased when TCP_EVENT_A


From: Joel Cunningham
Subject: [lwip-devel] [bug #46696] accepts_pending not decreased when TCP_EVENT_ACCEPT returns error
Date: Tue, 19 Jan 2016 17:30:26 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #7, bug #46696 (project lwip):

Ambroz,

I understand the suggestion (thanks!) and have a couple of thoughts:

If the solution is to have the accept callbacks manage controlling the
"connected, but not accepted" connections via manipulating the backlog value,
then we could also implement a more clear and easier solution by having them
manipulate accepts_pending if the callback fails to take the connection
(returns !ERR_OK). Currently that's not a responsibility of the accept
callback and where this issue arises from.  Even the default tcp_accept_null()
has the same issue

The backlog value stored within the TCB would no longer be the total count of
both "in-progress connections" and "connected, but not accepted" queues.  I
have another patchset posted (https://savannah.nongnu.org/patch/?8764) that
allows updating of the backlog value via another call to listen() which
behaves as most BSD implementations do.  This suggested solution doesn't play
well with this feature because it could lead to some cases where the
application increments the backlog while there are "connected, but not
accepted" connections, this would then artificially inflate the backlog when
those are accepted

The suggested patch also reduces performance by having every passive
connection run through the listen PCB list where before this was avoided, at
least for sockets/netconn, not sure about users of raw API.

I like the solution of having TCP core handle bookkeeping on accepts_pending
when the accept_callback() refuses/fails to take the connection.  

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?46696>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]