-
Notifications
You must be signed in to change notification settings - Fork 3k
Added clearing of ipv6 addresses to lwip bringdown function #3193
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
Conversation
@geky @kjbracey-arm |
This looks reasonable to me, although @kjbracey-arm knows more about the lwip-interface's implementation details. Interesting that there's not a better way to zero the semaphore other than completely reinitializing it. |
@mikaleppanen needs a conflict resolved. @kjbracey-arm Any feedback on this? |
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.
No problem with the lwIP bit - everything you do to it involves grobbling around in its data structures.
The semaphore looks a bit nasty, but it's artefact of the fact the existing code is trying to use a semaphore where it should be using something like a signal. Not a fan of semaphores in general. Almost always the wrong primitive. (Any plans for condition variables?)
Thinking about it more, should this actually treat the semaphore like a condition variable and just expect spurious wakeups (ie from failed inits)? The // If doesn't have address
while (true) {
if (mbed_lwip_get_ip_addr(true, &lwip_netif)) {
lwip_connected = true;
break;
}
ret = sys_arch_sem_wait(&lwip_netif_has_addr, 15000);
if (ret == SYS_ARCH_TIMEOUT) {
return NSAPI_ERROR_DHCP_FAILURE;
}
} |
@mikaleppanen please resolve the conflicts |
@0xc0170 conflicts have been resolved. |
/morph test-nightly |
1 similar comment
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 1089 Test failed! |
@bridadan |
@0xc0170 Yeah I saw that as well. I've never seen that issue before, but that is a legitimate device failure (the device detected that failure and reported it). The numbers it reported seem funny though. The expected vs the actual value ( Feel free to run the tests again or try it locally. |
It definitely looks unrelevant with respect to this pr right? |
Result: ABORTEDYour command has finished executing! Here's what you wrote!
|
/morph test-nightly |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
Tests look ok, the failure is caused by test machine load when measuring the timing data from the device, doesn't look like any actual failure 👍 |
can this be merged? |
If @kjbracey-arm and/or @geky are happy with the changes it should be ok to come in. |
Definitely useful to have this merged. Thanks for submitting the patch! |
Description
Added removal of ipv6 addresses to bring down function. Corrected address semaphore functionality on repeated bring up/down cycles.
Status
READY
Migrations
NO
Related PRs
None
Todos
Deploy notes
None
Steps to test or reproduce
None