oxidecomputer / oxidecomputer/opte
The should be no `GenHtError::ResourceExhausted`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
The GenHtError only applies to the StaticAction::gen_ht() method. That method should never fail except for unexpected reasons due to a programming error. A static action should never acquire a resource, because it has no stateful flow entry to track & return said resource. This variant should be removed.
This does bring up a bigger question: should static actions even exist? From what I remember I created them as an alternative to stateful actions for situations where there was no resource to track and thus I saw no reason to create LFT entries. After all, the HdrTransformation a static action generates is cached in the UFT entry. E.g., the overlay layer uses static actions for both encap and decap. However, you could also argue that any packet that is considered part of a flow should have an LFT entry in each layer, and thus should be a stateful action (regardless if that particular action acquires a resource or not). And any packet that is not part of a flow should go the way of Action::HandlePacket for one-off processing. If you are reading this, present Ryan apologizes for past Ryan's indecisiveness and lack of clear vision here.
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 locating GenHtError and StaticAction::gen_ht(), then trace how static and stateful actions are used by the overlay layer. Resolve whether static actions should remain, and if they do, remove ResourceExhausted while preserving the intended action model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100