You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extmod/lwip-include: Increase number of lwIP timers when mDNS enabled.
Despite the code comments claiming one is sufficient, the mDNS application
is capable of using up to twelve timers. Three per IP protocol are started
at once in `mdns_start_multicast_timeouts_ipvX`, then another two per
protocol can be started in `mdns_handle_question`. Further timers can be
started for two additional callbacks.
Having certain timers, such as `MDNS_MULTICAST_TIMEOUT`, fail to start due
to none being free will break mDNS forever as the app will never realize
it's safe to transmit a packet. Therefore, this commit goes somewhat
overkill and allocates the maximal amount of timers; it's uncertain if all
can run simultaneously, or how many callback timers are needed.
Each timer struct is 16 bytes on standard 32 bit builds. Plus, say, 8
bytes of allocater overhead, that's 288 more bytes of RAM used which
shouldn't be too horrible. Users who don't need mDNS can manually disable
it to recover the RAM if necessary.
This fixes mDNS on W5500_EVB_PICO (among other boards). Before, mDNS would
work for a bit after connection until the host's cache expired a minute or
two later. Then the board would never respond to further queries. With
this patch, all works well.
Signed-off-by: Thomas Watson <twatson52@icloud.com>
0 commit comments