[Click] socket.cc patch

Beyers Cronje bcronje at gmail.com
Tue May 30 08:03:32 EDT 2006


Hi Mark

On 5/30/06, Mark Huang <mlhuang at cs.princeton.edu> wrote:
>
> Beyers Cronje wrote:
> > Server socket with connected upstream input non-empty queue before the
> > connection has been accepted will never set SELECT_WRITE on the active
> > socket, causing the queue to fill up without ever being emptied by the
> > socket element. Setting SELECT_WRITE after accept on the active socket
> is
> > the solution. This works even when the queue is empty as the elements
> will
> > disable SELECT_WRITE as soon as the queue signal goes off.
>
> I have a couple of additional patches to Socket that I need to post,
> that simplifies the polling loop in run_task() and gets rid of the
> backoff timer, which I copied from ToDevice without really knowing why
> it was necessary. All that the backoff timer did was reduce performance
> in some of our PlanetLab experiments by 20-30%.
>
I'll test your patch against the new polling loop and make sure it still
> works before posting the new patches.


Sounds good, looking forward to see your improvements.


> PS For future enhancements I'd like to add a signal to the socket
> > element to
> > indicate an active connection. This will prevent elements from pushing
> > packets into the socket upstream queue if there is no active connection.
> If
> > this is something you think you would want to integrate with cvs let me
> > know.
>
> Interesting, would this involve any other element changes or is there
> some built-in functionality in the scheduler for dropping unpushable
> packets?


Well I was thinking in lines of something like an ActiveNotifier build into
Socket element, or even a simple handler call that returns true when a
connection is active. So elements that pushes packets into Socket's upstream
queue can do a quick check to see if Socket has an active connection or not.

--Mark
>


Cheers

Beyers


More information about the click mailing list