-
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
face: decoupling forwarder_receive from ISR #38
Comments
Current |
The fundamental difference is pull-style vs push-style API. POSIX UDP faces are sockets. Kernel buffers incoming frames, waiting for you to pull a frame in a normal thread using nRF52 SDK pushes a frame to you in ISR by calling your The classical way to turn a push into a pull is adding a queue. |
Timer discussion #11 got me think of our network face implementation might also be problematic. For example, current 802.15.4 face uses ISR to receive frames from network, and transfers data by directly invoking callback from forwarder, which may further invoke callbacks from direct face (which application code be involved with). Thus, the interrupt probably reaches to application region. Given that we can't expect what application do in direct face's onData()/onInterest(), we better decouple forwarder callback from this ISR.
Wonder if using event queue could solve this. We can do it with timer implementation together. Plus, I suggest to keep interrupts confined in "kernel space" and keep all ISR use cases in NDN-Lite as short and simple as possible to ensure interrupts can return quickly.
The text was updated successfully, but these errors were encountered: