[bug #59492] mDNS: mdns_handle_questions holds core lock for excessive amount of time

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #59492] mDNS: mdns_handle_questions holds core lock for excessive amount of time

yuanjianmin
URL:
  <https://savannah.nongnu.org/bugs/?59492>

                 Summary: mDNS: mdns_handle_questions holds core lock for
excessive amount of time
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: thomask77
            Submitted on: Fri 20 Nov 2020 12:05:50 PM UTC
                Category: apps
                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

    _______________________________________________________

Details:

Hi!

We have a network with lots of mDNS traffic.

While most requests are handled quickly, we see that the
mdns_handle_questions() sometimes takes multiple milliseconds to loop over the
questions and answers.

Because this is done in a upd_recv() callback, all this complex processing is
done while the core is locked.

This leads to other problems within our application, where we have strict <
1ms real-time requirements.

Perhaps, one solution would be to move mDNS processing into a dedicated,
low-priority mDNS task using the netconn API.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59492>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #59492] mDNS: mdns_handle_questions holds core lock for excessive amount of time

yuanjianmin
Follow-up Comment #1, bug #59492 (project lwip):

lwIP (and the mdns responder) also runs on systems without an operating
system, and then netconn and tasks are not available.

I am not sure if there is a way to offload it in case an operating system is
available.

Maybe the situation can be slightly improved also by limiting the parsing of
incoming packets, depending on the mdns state and the type of packet. For
instance, it might be possible to stop parsing answers heard once the mdns
state is stable - unless that breaks the collision detection, I would have to
check the details.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59492>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel