[Top][All Lists]

[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 02:33:27 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0


                 Summary: mdns: move the announcements to a timer callback
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ourairquality
            Submitted on: Sun 31 Dec 2017 07:33:25 AM UTC
                Category: DNS
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head



The guts of the mdns code uses a significant amount of stack for a small
system. This makes it problematic calling into this code from the various
paths that trigger announcements. This patch has these code paths queue an
announcement that will be performed via a timer callback.

The timer is used, rather than a tcpip_callback(), so that it will also work
with NO_SYS. The slight delay might also help avoid redundant announcements
when multiple changes are made quickly.

This patch also adds 'api' entry functions that use core locking to protect
the mdns code state. This followed the recent example of
mdnsapi_mdns_resp_announce(). This safety is currently only useful with core
lock which it uses - the arp cache api added recently had this same
limitation. Loath to try to add netifapi style callbacks for all of these,
that is left as a TODO.

Do people have strong reasons for not making core lock mandatory when used in
a threaded environment?

As the patch shows, many simple operations are much lighter using a lock
rather that a callback.

Would also note that the separate api entry points might be redundant if a
recursive lock were usable, and might that be a practical requirement to
simplify the code?

Anyway, tried to work within all the constraints that were understood for this
patch, and if it does not fit then feedback is welcomed?


File Attachments:

Date: Sun 31 Dec 2017 07:33:25 AM UTC  Name:
0001-mdns-move-the-announcements-to-a-timer-callback.patch  Size: 6KiB   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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