oxidecomputer / oxidecomputer/opte
`FlowTable` could have an `Entry` API
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
BTreeMap provides an Entry API to prevent duplicate lookups for successive operations on the same key. FlowTable wraps a private BTreeMap to provide fixed capacity constraints, meaning we cannot use this API directly without some care to make sure that an Entry::Vacant cannot be used to insert into a full table.
An entry method on FlowTable which handles these semantics would be useful. There are a handful of places which would benefit from this for code cleanup, e.g. TCP flow state management.
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
Locate FlowTable and inspect how its private BTreeMap enforces fixed capacity. Compare the desired API with BTreeMap::entry, then review the TCP flow state management cleanup mentioned in the issue. Done means successive operations avoid duplicate lookups while a vacant entry cannot insert into a full table; add or update tests for those capacity semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100