-
Notifications
You must be signed in to change notification settings - Fork 2k
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
netdev: add netdev_trigger_event_isr() function #13562
Conversation
drivers/include/net/netdev.h
Outdated
/** | ||
* @brief Informs netdev there was an interrupt request from the network device. | ||
* | ||
* This function calls @ref event_callback with NETDEV_EVENT_ISR event. |
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.
The @ref event_callback
is undefined here (see travis)
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.
* This function calls @ref event_callback with NETDEV_EVENT_ISR event. | |
* This function calls netdev_t::event_callback with NETDEV_EVENT_ISR event. |
There are a number of remaining calls in:
Is there a reason why these are omitted from the cleanup here? Or are they more complex and should they be handled in a follow-up? |
And please rebase :) |
Oh, good catch! I don't know how I missed those. Thanks, I will add them |
5e39d1a
to
8b40aeb
Compare
bb72276
to
701c7db
Compare
done! |
Looks good, please squash! |
701c7db
to
3254435
Compare
squashed :) |
Why |
Hmmmm I named it like that because it should be called at the end of IRQ. But strictly speaking it could be called from anywhere during ISR. |
We're bikeshedding again, sorry. |
I'd say, @jia200x renames it to one of either and squashes immediately. And then let's go with that. |
I will rename it to that and squash immediately. |
3254435
to
3e42fb7
Compare
done! |
maybe fix the commit messages |
3e42fb7
to
3ad574a
Compare
forgot that. Now it should be OK |
all green :) |
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.
ACK.
thanks for the review guys! |
Contribution description
This PR adds a
netdev_irq_end
function that wraps thedev->event_callback(dev, NETDEV_EVENT_ISR)
call.This is a step required in order to separate ISR signals from driver events (RX_DONE, TX_DONE), etc. This is useful when network stacks have different implementations of driver events but they use the same "recv thread".
I will introduce a
netdev_event_thread
module that redefines this function to use theevent_thread
module for handling device ISRs.Testing procedure
This should be low hanging fruit. Check if
netdev
drivers still compile (at86rf2xx, ethos).Running
gnrc_networking
on native should be enough to test functionality.Issues/PRs references
None so far