Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x4c/SoftNPU: Remote Access Preview MVP #2

Closed
27 tasks done
rcgoodfellow opened this issue Jun 19, 2022 · 0 comments
Closed
27 tasks done

x4c/SoftNPU: Remote Access Preview MVP #2

rcgoodfellow opened this issue Jun 19, 2022 · 0 comments
Assignees

Comments

@rcgoodfellow
Copy link
Collaborator

rcgoodfellow commented Jun 19, 2022

This is a tracking issue for the minimum viable product (MVP) needed for the remote access preview (RAP).

At a high level, the RAP requires

  • Compilation of the Sidecar P4 code into a complete P4 AST. Compilation of Sidecar-lite P4 code
  • Generation of Rust packet pipeline code from the Sidecar P4 AST.
  • Execution of the Sidecar Rust packet pipeline code in the SoftNPU pipeline execution harness which provides network I/O through the pipelines.
  • Implementation of SoftNPU as Propolis device (logistically similar to the current sidemux Propolis device)
  • Implementation of the necessary Barefoot SDE functions for DPD to run atop SoftNPU running as a Propolis device. Implment AAL interface in dendrite/asic/softnpu.

Note: Not considering full sidecar compilation as a blocker for MVP. Execution of sidecar-lite.p4 is sufficient for RAP purposes. In the fullness of time, we'll want sidecar-lite.p4 to go away. But this is not a blocker for RAP MVP.

Milestones

The Sidecar P4 code is relatively complex. And we'll not start by jumping into that code directly. The following are a series of milestones that build up to running the Sidecar P4 code from x4c (the compiler contained in this repo) compiled code and running that code on a Propolis-based SoftNPU device.

SoftNPU Packet Hub

This is a simple hub, i.e. a switch that broadcasts any packet it receives on all the ports that it has.

  • AST generation
  • Rust packet pipeline code generation.
  • SoftNPU Execution
  • Automated test coverage.

SoftNPU Packet Router

This is a simple router that has a pair of tables for IPv4 and IPv6 for longest prefix match (LPM) routing. IPv6 is the priority here.

  • AST generation
  • Rust packet pipeline code generation.
  • SoftNPU Execution
  • Automated test coverage.

SoftNPU Packet Router with Services and CPU Port

This builds on the previous Packet router. In addition to pure LPM routing, a services table is added which contains a combination of ternary and exact packet classifiers that can direct packets to custom service actions, some of which include forwarding to and from a special CPU port. Packets going to/from the CPU port will also carry the Sidecar header like they do in our existing Sidecar P4 code.

  • AST generation
  • Rust packet pipeline code generation.
  • SoftNPU Execution
  • Automated test coverage.

Packet Encapsulation and NAT

  • AST generation
  • Rust packet pipeline code generation.
  • SoftNPU Execution
  • TCP/UDP NAT
  • ICMP NAT

P4 Compiler Internals

The above tasks identify milestones on the path to victory. This section lists tasks that need to be accomplished inside the compiler for the above to work.

  • Ternary classification support in the HiCuts decision tree.
  • LPM classification support in the HiCuts decision tree.
  • Scalable pipeline observability (e.g. not the firehose or nothing approach of the Tofino sim). Leveraging the usdt crate seems like a good place to start here.
  • Complete Expression parsing, e.g. all the various operations that can happen on packet fields and variables. Not blocker for RAP MVP
  • Complete Expression code generation. Not blocker for RAP MVP.
@rcgoodfellow rcgoodfellow self-assigned this Jun 19, 2022
@rcgoodfellow rcgoodfellow changed the title Remote Access Preview MVP x4c/SoftNPU: Remote Access Preview MVP Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant