oxidecomputer / oxidecomputer/opte

`DropRef` and its consumers should be safer

Open
#515 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

cleanup good first issue
Dominant language
Rust
Stars
77
Forks
11
Avg merge
9d 20h
Merged PRs (30d)
8

Description

We currently have a few 'safe' wrappers around reference release functions used by next_hop and the DropRef machinery:

fn ire_refrele(ire: *mut ip::ire_t) {
    unsafe { ip::ire_refrele(ire) }
}

We should revisit this by matching Arg to its cleanup function, using an unsafe trait or similar mechanism.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the DropRef machinery and its consumers in next_hop, then inspect the ire_refrele wrapper and how Arg values are cleaned up. Determine how each Arg should match its reference-release function and whether an unsafe trait or similar mechanism fits. Done means the cleanup associations are safer and the affected consumers remain correct.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.