I am Heavy, and I have been working on a user-space network component built upon the lwIP library version
2.1.3-stable.In my recent project experiences, it appears that lwIP(both version 2.1.13 and 2.2.0) does not inherently support per-socket locking. To address synchronization issues, I've resorted to using either the core tcpip lock provided by lwIP or creating custom mutexes to safeguard against concurrent access to both the lwIP stack operations and individual socket manipulations. This approach is functional, but I anticipate potential performance degradation in scenarios where multiple sockets are concurrently active, as these locks are essentially global to all socket operations.
My question is twofold:
1. Does the current stable release of lwIP indeed lack native support for per-socket locking mechanisms?
2. What design pattern or model would best leverage lwIP's performance, especially when handling multiple simultaneous socket interactions?
I appreciate any insights you can offer into this matter, as they will be instrumental in guiding me towards an efficient solution for enhancing concurrency and overall performance within my project.
Thank you in advance for your assistance and expertise.
Best Regards, Heavy