-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make LwIP Core Locking available #186
Conversation
please provide more info. Why, how, etc. |
For OS Mode, the threading of LwIP Raw APIs should be taken care of, APIs should never be called in parallel to lwip task operations (which happens by using an RTOS, in calling APIs by both main and tcpip tasks), can be solved by two possible methods:
The nongnu website is down right now, so here's a reference to the raw file of the documentation regarding it: This method is used and tested in H4AsyncTCP the library I maintain after the passage of its author, where it shows high reliability under heavy testing in ESP32 environment (The 8266 too but no OS). And here's the relevant Kconfig description in esp-idf component lwip: |
What's the need/benefit for the Arduino code? In other words real life use case? https://github.com/mathieucarbou/AsyncTCP |
Refer to my last comment:
#186 (comment)
…On Sat, Jul 13, 2024, 13:59 Jason2866 ***@***.***> wrote:
What's the need/benefit for the Arduino code? In other words real life use
case?
—
Reply to this email directly, view it on GitHub
<#186 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH3O7J5YJK34YCBNZ6L325LZMEB7ZAVCNFSM6AAAAABJ4CLF2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRWHA2TKNRUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
One! use case. Why should a setup be changed that may introduce side effects hitting all espressif32 Arduino users? My experience Lwip setup changes should be only done to fix a bug hitting most use cases. For special use cases there is the Arduino Lib Builder ;-) |
I know that, and for that matter I've been using the builder for at least more than a year. But per the lock feature, it has no side effects, as it's well ported to esp-idf: BTW, the H4 Stack is completely Async, with complete reliable stack starting from TCP to the application (MQTT/HTTPS WebServer/WSS/HTTPS Client). I've a running MQTT that publishes 13kB payload every 3 seconds over TLS, alongwith running HTTPS WebServer/WSS/HTTP Client, with lots of other stress tests performed. The Lock is needed to allow it for public use with the official Arduino Core for at least the plain TCP part now. |
Famous last words :-) So it has NO impact of Flash Usage, RAM usage. Every piece of code does run as before? |
Too little overhead due to the usage of the mutex, check sys_arch.c. Count the bytes :-) |
as an unforeseen consequence of adding matter to Arduino, core locking is now enabled (for the new 3.1.x versions). So I can close this now and you can give it a show on the 3.1.0-RC2 release |
Thanks for accepting the Core Locking config. As it's not merged, I think there should be the esp_matter component (or CHIP) enables it? Where can I see the built libs of 3.1.0-RC2? Note that the release does not provide the built sdk libs. |
you could install from git and work that way. Just make sure you use the |
Great, just found the config being checked. |
Btw. enabling has side effects and broke code ;-) So your statement
is wrong |
It has no side effects. The breaking code was due to core safety Check: |
Make the implementation of LwIP core locking available:
https://github.com/espressif/esp-lwip/blob/a45be9e438f6cf9c54ec150581819c3b95d5af6b/src/include/lwip/tcpip.h#L52-L59
Important when dealing with Raw APIs