Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/executor/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,17 @@ async fn network_run() {
match nic.poll_common(now) {
PollResult::SocketStateChanged => {
// Progress was made
// This will result in the task getting polled again the next
// time the kernel is entered
cx.waker().wake_by_ref();
// Enter polling mode temporarily
// FIXME: maybe not on every state change
nic.set_polling_mode(true);
// FIXME: Maybe use a different source
// Set a timer for 1 second to ensure we end up in the kernel
// again in the next second to poll the interface once
create_timer(Source::Network, 1000 * 1000);
trace!("Enabled polling mode and configured network interrupt for 1 second");
}
PollResult::None => {
// Very likely no progress can be made, so set up a timer interrupt to wake the waker
Expand Down
Loading