lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #52770] mdns: move the announcements to a timer callba


From: Douglas
Subject: [lwip-devel] [bug #52770] mdns: move the announcements to a timer callback
Date: Sun, 31 Dec 2017 06:46:19 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Follow-up Comment #5, bug #52770 (project lwip):

> Ehrm, callback api applications are single threaded by design. Without
looking at your patch, I don't know what's meant by thread safety.

A 'pending' flag has been added for the announcement code paths which can be
called from other threads as-is because most of the entry points into the mdns
responder are not thread safe. The thread safe entry
mdnsapi_mdns_resp_announce() has just been added, but the other entry paths
are not protected. The patch also adds other entry functions that use the core
lock for thread safety, to at least offer some safe proposal.

Some questions:

* Do people want to have to implement netifapi style message passing code for
every entry point? That's a lot of code and work to do in C.

* Could people alternatively accept that in a threaded environment that core
locking is required? This would allow a good deal of clean up work, would be
faster, and make it easier to protect other entry points. What reasons would
there be to not use core locking? Can the patch land as-is with only the use
of core locking for safety?

* Is it practical to also require the core lock to be recursive? This would
simplify things further by avoiding the need to have duplicate entry points
that are thread safe because possible entry points could take the recursive
lock and could be called from the tcpip thread (recursive) or from other
threads. Do people want all the duplicate entry points in this patch, or just
to require a recursive core lock?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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