codegen: rust: when a table size is specified constrain generated tables to that size.

オープン
#30 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
compilers

調査の方向性

ソースファイル、テスト、エントリポイントのいずれも指定されていません。まず P4 仕様のセクション 14.2.1.5 を読み、テーブルサイズプロパティの Rust コード生成パスを特定してください。必要なターゲット ASIC のセマンティクスとコード生成オプションは、実装前に決定する必要があります。生成されたテーブルが設定されたサイズ動作に従うことを Done の条件とします。

索引モデルが issue の本文から書いたものです。

説明

codegen rust want

The primary purpose of the Rust code generation is to emulate real ASICs. To that end, when a table size property is provided, the underlying table that gets generated in Rust code should behave like the target ASIC does when size number of entries is reached.

The P4 spec is vague on what the semantics of table sizes are. From the P4 spec section 14.2.1.5 we have

If a table has a size value specified for it with value N, it is recommended that a compiler should choose a data plane implementation that is capable of storing N table entries. This does not guarantee that an arbitrary set of N entries can always be inserted in such a table, only that there is some set of N entries that can be inserted.

So there is no prescribed behavior here. We should probably have code generation options that can capture what the target ASIC being emulated does.

主要言語
Rust
スター
140
フォーク
14
平均マージ
3日 18時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/p4 のほかの issue

oxidecomputer/p4 の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。