-
Notifications
You must be signed in to change notification settings - Fork 571
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
net: Remove IFF_DOWN flag to compatible with Linux/*BSD #2647
Conversation
turn off interface by checking IFF_UP flag isn't set: apache/nuttx#1838 Signed-off-by: Xiang Xiao <[email protected]>
[Experimental Bot, please feedback here] No, the provided PR summary does not meet the NuttX Requirements. Here's why and how to improve it: Missing Information in Summary:
Impact:
Testing:
Example of an Improved Summary Section:
Remember: A good PR description saves everyone time and increases the chances of your contribution being accepted quickly. |
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.
Thank you @xiaoxiang781216 :-)
@xiaoxiang781216 could you please check for issues on Here's what I had before this change:
Here's what I have now, seems to be stuck:
Noticed that the PR it depends on has not been merged. I'll wait until it is and let you know if all good. |
Thanks for reporting, I am looking into it. |
@fdcavalcanti Whether your local environment contains the patch apache/nuttx#13842 ? |
Yes, just checked test reports and it's ok. Thanks. |
@@ -60,7 +60,7 @@ void alt1250_netdev_unregister(FAR struct alt1250_s *dev) | |||
|
|||
void alt1250_netdev_ifdown(FAR struct alt1250_s *dev) | |||
{ | |||
dev->net_dev.d_flags = IFF_DOWN; | |||
dev->net_dev.d_flags = ~IFF_UP; |
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.
@xiaoxiang781216
Sorry for the delay, let me confirm.
Is this as you intended? Or is it a mistake?
dev->net_dev.d_flags &= ~IFF_UP;
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.
Yes, it's intended to follow how other POSIX OS turn off netdev. After IFF_DOWN is removed, ~IFF_UP represent down.
Summary
turn off interface by checking IFF_UP flag isn't set: apache/nuttx#1838
depends on apache/nuttx#13842
Impact
improve the combability
Testing
internal test