`FlowTable` could have an `Entry` API

未关闭
#627 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust
领域
networking

调研方向

定位 FlowTable,并检查其私有 BTreeMap 如何强制执行固定容量。将所需的 API 与 BTreeMap::entry 进行比较,然后审查 issue 中提到的 TCP 流状态管理清理工作。完成标准是连续操作能够避免重复查找,同时空闲条目无法插入已满的表;为这些容量语义添加或更新测试。

由索引模型根据 Issue 内容生成。

描述

cleanup good first issue

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.

主要语言
Rust
星标
82
派生
16
平均合并
3 天 6 小时
30 天内合并 PR
11

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oxidecomputer/opte 的其他 Issue

查看 oxidecomputer/opte 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。