Skip to content

Commit bc6c7ed

Browse files
authored
Readme updates 2026-Feb-21 (#720)
* Move optional steps for testing VMs out of README.md file This may help avoid new users being confused that they must follow those instructions. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Add 2025-Jan-30 versions of source code for install.sh Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Update the README to mention P4sim as a newer alternative with recommendations not to use it yet if your primary goal is to learn from the existing exercises. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> --------- Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
1 parent 9bfef81 commit bc6c7ed

1 file changed

Lines changed: 49 additions & 21 deletions

File tree

README.md

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,6 @@ All exercises in this repository use the v1model architecture, the documentation
8484
1. The BMv2 Simple Switch target document accessible [here](https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md) talks mainly about the v1model architecture.
8585
2. The include file `v1model.p4` has extensive comments and can be accessed [here](https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4).
8686

87-
## P4sim – A Simple P4 Behavioral Simulator
88-
89-
**P4sim** is a lightweight, dependency-free P4 packet-processing simulator designed for learning and experimentation.
90-
Unlike BMv2 or P4-DPDK, P4sim does **not** emulate a full switch pipeline. Instead, it provides a minimal execution environment that evaluates P4 parser, control, and deparser logic on user-provided packets.
91-
92-
P4sim is intended for:
93-
94-
* Running P4 programs without installing large data plane frameworks
95-
* Quickly testing parser and control-flow behavior
96-
* Understanding how P4 programs process packets step-by-step
97-
98-
P4sim is **not** a performance model and does not aim to replicate full-featured switch behavior (such as multitable pipelines, extern objects, or architecture-specific metadata).
99-
It is mainly a **teaching and debugging tool**.
100-
101-
To learn more or try P4sim examples, see:
102-
[`P4sim/README.md`](./doc/P4sim/README.md)
103-
10487
## Obtaining required software
10588

10689
If you are starting this tutorial at one of the proctored tutorial events,
@@ -118,12 +101,27 @@ you will need to do one of the following:
118101
tools within it.
119102
+ Install the P4 development tools on an existing system with a
120103
supported version of Ubuntu Linux.
104+
+ Install P4 development tools and also
105+
[P4sim](https://github.com/HapCommSys/p4sim).
106+
+ Note: No instructions have been written yet on how to run the
107+
tutorials exercises using P4sim. If your goal is to learn from
108+
doing the exercises, we recommend you ignore P4sim for now.
109+
110+
See the appropriate section below for more details on your choice.
111+
112+
If you have a Windows, Mac, or Linux system with a 64-bit Intel/AMD
113+
processor architecture, or an Apple Silicon Mac, and are willing to
114+
install and use VirtualBox to run a Linux virtual machine, then the
115+
first option above is the quickest way to get started, followed by the
116+
second option. If you prefer not to use VirtualBox for some reason,
117+
or prefer to use an existing system with a supported version of Ubuntu
118+
Linux installed, the third option may be best for you.
121119

122120
### Download a virtual machine with the P4 development tools already installed
123121

124-
You will need a system with a 64-bit Intel/AMD processor architecture,
125-
with [VirtualBox](https://virtualbox.org) installed on it. See the
126-
table
122+
You will need a Windows, Mac, or Linux system with a 64-bit Intel/AMD
123+
processor architecture, or an Apple Silicon Mac, with
124+
[VirtualBox](https://virtualbox.org) installed on it. See the table
127125
[here](https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md)
128126
for a list of virtual machine images that you can download, then use
129127
VirtualBox's File->Import Appliance menu item to add the virtual
@@ -138,7 +136,37 @@ See the instructions [here](vm-ubuntu-24.04/README.md).
138136

139137
### To install P4 development tools on an existing system
140138

141-
There are instructions and scripts in another Github repository that can, starting from a freshly installed Ubuntu 20.04, 22.04, or 24.04 Linux system with enough RAM and free disk space, install all of the necessary P4 development tools to run the exercises in this repository. You can find those instructions and scripts [here](https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md) (note that you must clone a copy of that entire repository in order for its install scripts to work).
139+
There are instructions and scripts in another Github repository that
140+
can, starting from a freshly installed Ubuntu 22.04, or 24.04 Linux
141+
system with enough RAM and free disk space, install all of the
142+
necessary P4 development tools to run the exercises in this
143+
repository. You can find those instructions and scripts
144+
[here](https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md)
145+
(note that you must clone a copy of that entire repository in order
146+
for its install scripts to work).
147+
148+
### Install P4 development tools and also P4sim
149+
150+
[P4sim](https://github.com/HapCommSys/p4sim) is a lightweight,
151+
dependency-free P4 packet-processing simulator designed for learning
152+
and experimentation. Unlike BMv2 or P4-DPDK, P4sim does **not**
153+
emulate a full switch pipeline. Instead, it provides a minimal
154+
execution environment that evaluates P4 parser, control, and deparser
155+
logic on user-provided packets.
156+
157+
P4sim is intended for:
158+
159+
* Running P4 programs without installing large data plane frameworks
160+
* Quickly testing parser and control-flow behavior
161+
* Understanding how P4 programs process packets step-by-step
162+
163+
P4sim is **not** a performance model and does not aim to replicate
164+
full-featured switch behavior (such as multitable pipelines, extern
165+
objects, or architecture-specific metadata). It is mainly a
166+
**teaching and debugging tool**.
167+
168+
To learn more or try P4sim examples, see:
169+
[`P4sim/README.md`](./doc/P4sim/README.md)
142170

143171
# How to Contribute
144172

0 commit comments

Comments
 (0)