-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update esp-hal, esp-wifi, esp-idf and edge-net dependencies #63
Conversation
Ah! did not notice #62. Should be mostly identical, except this one also updates |
@bjoernQ @AnthonyGrondin It seems my PR is a strict super-set of #62 in that it does everything #62 does, and additionally updates to latest Unfortunately, same issue of course - I'll also quickly check what is going on with |
No it is not. Your issue is that validating certificates with |
My issue started with commit If it does, how do I switch off whatever needs to be switched off to get this working? I don't care much about security there, I just need to get the connectivity going. |
Please let's not hijack this thread with something which is unrelated to this PR. |
@bjoernQ @AnthonyGrondin This is now ready for review.
|
Thank you for this contribution. Yeah it's a superset of #62 and I'll close it once this one is merged, as yours provides more contribution value.
This is a better fix than waiting for a new update for That being said for now, I don't mind the granular path, we'll see once we add more targets outside of the esp ecosystem (if any).
There is indeed a significant memory increase that should be investigated. I've profiled both the current main (for a more deterministic approach, I patched edge-net to 4c0940b) and here's the result I've got after doing a request, waiting for timeout and then doing another request: Current main (edge-net fixed at 4c0940b2b6e550a577e2602af97ea57548714915)Session connection time:
Memory usage:
With update (this PR)Session connection time:
Note: I've also noticed that running the benchmark will sometimes cause a new session to be established while the previous one is still in memory, create a 2 * N memory usage, where N is the amount of memory required per session. I haven't noticed the current head to be doing this at any time, so far (would require extensive testing to confirm). Memory usage:
P.S. I'm really looking forward to the future improvements to this library, and its memory usage / compatibility, and certificate management. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a review on the edge_server
example, but I believe some of it applies to almost all of the async examples. I just didn't want to make too much redundant noise.
In term of socket count, perhaps we should use a const variable for every example, like we do in edge_server
, instead of hardcoding a fixed value without much description.
Agreed and addressed. In retrospective, the
Hm, how would you do In any case, I completely changed how we polyfill the missing
Hmmm, in your benchmarks I actually see only an increase of 5K, which is not that much. And this is in the heap by the way, so I think I had to increase the memory much more (30K) because of the "two edge-http connections" issue actually. Read on.
I'm surprised actually that the current head is not doing this? See, if you configure
This is also coming. I am putting big bets that the improved certificate management should reduce the memory considerable, when you have > 1 connection to the same server with the same certificates. Fingers crossed. |
Thank you for the added documentation. I like the way the polyfill is provided too. It's completely independent of The 5K RAM increase mostly comes from
I did a little bit of testing with
I agree with this approach, we should go case by case and by the needs to the real world. Overall looks good to me. I see the I will open an issue about it to solve in a future PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S. It would be great if you could also include the fix for SHA in this PR to avoid a subsequent PR, since it's just a 6 lines diff.
Will do shortly, yes |
… the async_client_mTLS example
Done now. @bjoernQ I think this is ready for review from your side and possibly merge. |
Is this supposed to work with latest releases of esp-hal and esp-wifi so I can test it as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the effort here!
Regarding the increased use of dynamic memory: Indeed, in esp-wifi
we now prefer dynamic allocations over static allocations which explains it
Yes, could you test and see if this fixes #60 |
Yes, it's working, great to be on the main branch once again. |
esp-mbedtls
library:esp-wifi
0.10 -> 0.11 (non-optional dep, (ab)used as amalloc
provider, we'll get rid of this soon)edge-net
(all sub-crates) 0.3 GIT master patch -> 0.4 (optional dep, with featureedge-net
only)esp-idf-sys
0.35 -> 0.36 (optional dep, for the-espidf
targets only)embuild
0.32 -> 0.33 (optional dep, for the-espidf
targets only)esp-hal
0.21 -> 0.22 (optional dep, with featureesp-hal
only)Then for the examples, additionally:
esp-hal-embassy
0.4 -> 0.5embassy-executor
"=0.6" + GIT patch => 0.6embassy-net
0.4 => 0.5Then, in the examples:
esp-hal
/esp-wifi
release I thinkblocking-network-stack = { git = "https://github.com/bjoernQ/blocking-network-stack", rev = "1c581661d78e0cf0f17b936297179b993fb149d7" }
, as the blocking API ofesp-wifi
is now removed. Either that, or we have to get rid of allsync_*
examples.