MTPSA (Multi Tenant Programmable Switch Architecture) extends PSA with support for data plane virtualization. This repository contains an implementation of MTPSA based on the P4->NetFPGA workflow.
The MTPSA model consists of Superuser pipeline and multiple User pipelines.
-
Follow the P4->NetFPGA steps for initial setup: https://github.com/NetFPGA/P4-NetFPGA-public/wiki/Getting-Started#getting-started-guide
-
Execute
run.sh
to compile, run simulation tests, and generate a bitstream (.bit) file.
All project files are stored in a folder under $P4_PROJECT_DIR
(contrib-projects/sume-sdnet-switch/projects/
).
learning_switch
- Reference switchmtpsa0
- MTPSA with no user pipelines; only Superuser ingress and egress pipelinesmtpsa2
- MTPSA with two user pipelinesmtpsa3
- MTPSA with three user pipelinesmtpsa4
- MTPSA with four user pipelines
The $P4_PROJECT_DIR/src/*/commands.txt
file can be used to specify the table entries for a particular pipeline.
The $P4_PROJECT_DIR/testdata
folder contains a gen_testdata.py
script (one for each pipeline)
that generates applied/expected packets and metadata to be used in the simulations.
The Superuser pipeline consists of two P4 programs that correspond to ingress and egress packet processing.
$P4_PROJECT_DIR/src/suEgress/suEgress.p4
$P4_PROJECT_DIR/src/suIngress/suIngress.p4
Each User pipeline is defined by a P4 program stored in $P4_PROJECT_DIR/src/userX/userX.p4
(where X
is a user identifier).