-
Notifications
You must be signed in to change notification settings - Fork 3k
Move get_ip_address_if() to NetworkStack and include it in multihoming test #12063
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
Move get_ip_address_if() to NetworkStack and include it in multihoming test #12063
Conversation
@michalpasztamobica, thank you for your changes. |
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.
Only question is whether reworking a broken API is a breaking change.
Hey some of the deprecated methods seem to be silently dropped, also is this a breaking change from the user's point of view? |
The particular method being removed has no obvious use though - it is not needed to implement any |
@bulislaw , that is true - I did not move the string-based methods as they are on their way for removal anyway in another PR. Should I add them back? @kjbracey-arm , just addressed the other question. Thanks, Kevin! |
Nah, but can you explicitly remove them with a separate commit so it's accounted for? |
get_ip_address_if was wrongly added to OnboardNetworkStack::Interface, while it should in fact be placed directly in OnboardNetworkStack.
2fc75d7
to
c2856ef
Compare
@bulislaw , I rearranged the commits, according to your suggestion. I hope I got it right? |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Summary of changes
When working on multihoming feature,
get_ip_address_if()
was wrongly put intoOnboardNetworkStack::Interface
. This is incorrect, because every of those interfaces only knows its own address, so it could only return and empty address in case the name doesn't match its name or it actual address if it does. Further more, theOnboardNetworkStack::Interface::get_ip_address_if()
was not internally connected to any public API.Instead
get_ip_address_if()
should only be an API ofNetworkStack
and implemented inLWIP
class. This way we can make best use of the feature: the stack holding multiple interfaces will find the one with a matching name and return its address.We haven't noticed this, because, the function was never called in our greentea tests. I don't think it deserves its own dedicated test, but at least I added checks confirming that the API returns the same addresses that the eth/wifi interfaces do, based on their string name identifiers.
Impact of changes
No real impact - the
NetworkStack::get_ip_address_if()
function will become usable.Migration actions required
None.
Documentation
Already in place
Pull request type
Test results
Reviewers
@kjbracey-arm
@AnttiKauppila
@tymoteuszblochmobica