oxidecomputer / oxidecomputer/hubris
We probably need a way for a task trying to TX a packet to not get RX notifications.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
Responding to a question from @hawkw, I went and looked at what behavior we can expect in practice in situations like this: https://github.com/oxidecomputer/hubris/blob/5894665382641cc5533c8a49b5c012e7de34b908/task/udprpc/src/main.rs#L153-L168
Ideally the behavior is: the task sleeps until its tx queue empties, because it's not willing to handle received packets in that loop. (A more complex client could handle received packets while it's waiting, though that creates some new queueing issues.)
I believe the current behavior is: the task gets regular notifications whenever the netstack decides that people should hear about events. If true, this would waste CPU.
Filing this task to hopefully remind me to investigate this and fix it if it's wrong.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading task/udprpc/src/main.rs at lines 153-168 and tracing how the netstack delivers notifications while a task waits for its TX queue to empty. Verify whether RX notifications occur during TX-only operation; done means the task can avoid unnecessary RX notifications while still allowing a more complex client to handle received packets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100