Skip to content
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c43f6ed
Move optional steps for testing VMs out of README.md file
jafingerhut Oct 16, 2024
459987f
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Oct 25, 2024
5f69ce2
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Oct 31, 2024
fcdf6d2
Merge remote-tracking branch 'upstream/master'
jafingerhut Nov 3, 2024
27310d1
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Nov 7, 2024
51d5317
Merge remote-tracking branch 'upstream/master'
jafingerhut Nov 13, 2024
0054e7b
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 1, 2024
b8a81f2
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 1, 2024
1b02938
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 10, 2024
f574bea
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 10, 2024
40ac9e0
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 30, 2024
365a909
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 30, 2024
e62c95b
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 30, 2024
0af41fd
Merge remote-tracking branch 'upstream/master'
jafingerhut Dec 30, 2024
d600b63
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 31, 2024
29fd124
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 31, 2024
fdd4721
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 1, 2025
089cbd8
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 3, 2025
ff1664a
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 25, 2025
b8c5cab
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jan 25, 2025
ff9c994
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 27, 2025
3224949
Add 2025-Jan-30 versions of source code for install.sh
jafingerhut Jan 30, 2025
9235e50
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Feb 11, 2025
fe22d96
Merge remote-tracking branch 'upstream/master'
jafingerhut Feb 28, 2025
2f66fc9
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Feb 28, 2025
82856d1
Merge remote-tracking branch 'upstream/master'
jafingerhut Mar 2, 2025
dcb3d72
Merge remote-tracking branch 'upstream/master'
jafingerhut Apr 1, 2025
2bb59c9
Merge remote-tracking branch 'up/master'
jafingerhut Apr 21, 2025
7f076ba
Merge remote-tracking branch 'up/master'
jafingerhut Apr 21, 2025
4e1408f
Merge remote-tracking branch 'up/master'
jafingerhut May 1, 2025
cdceaab
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut May 1, 2025
aa0e580
Merge remote-tracking branch 'up/master'
jafingerhut May 13, 2025
745f2bd
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut May 13, 2025
7b68640
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jun 1, 2025
21aca3b
Merge remote-tracking branch 'upstream/master'
jafingerhut Jun 1, 2025
72c2c09
Merge remote-tracking branch 'up/master'
jafingerhut Jul 3, 2025
cb9381d
Merge remote-tracking branch 'up/master'
jafingerhut Jul 5, 2025
70c4cd8
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Aug 1, 2025
b71ef2a
Merge remote-tracking branch 'up/master'
jafingerhut Aug 1, 2025
54b84c2
Merge remote-tracking branch 'up/master'
jafingerhut Sep 1, 2025
471c37a
Merge remote-tracking branch 'up/master'
jafingerhut Oct 1, 2025
cf02788
Merge remote-tracking branch 'up/master'
jafingerhut Nov 1, 2025
143c96d
Merge remote-tracking branch 'up/master'
jafingerhut Nov 14, 2025
573a295
Merge remote-tracking branch 'up/master'
jafingerhut Jan 17, 2026
bd8682a
Merge remote-tracking branch 'up/master'
jafingerhut Jan 23, 2026
488b5d4
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jan 23, 2026
6d5bb15
Merge remote-tracking branch 'up/master'
jafingerhut Feb 1, 2026
d9cb2b8
Merge remote-tracking branch 'up/master'
jafingerhut Feb 3, 2026
f562b70
Merge remote-tracking branch 'up/master'
jafingerhut Feb 21, 2026
5715558
Update the README to mention P4sim as a newer alternative
jafingerhut Feb 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 49 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,6 @@ All exercises in this repository use the v1model architecture, the documentation
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.
2. The include file `v1model.p4` has extensive comments and can be accessed [here](https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4).

## P4sim – A Simple P4 Behavioral Simulator

**P4sim** is a lightweight, dependency-free P4 packet-processing simulator designed for learning and experimentation.
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.

P4sim is intended for:

* Running P4 programs without installing large data plane frameworks
* Quickly testing parser and control-flow behavior
* Understanding how P4 programs process packets step-by-step

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).
It is mainly a **teaching and debugging tool**.

To learn more or try P4sim examples, see:
[`P4sim/README.md`](./doc/P4sim/README.md)

## Obtaining required software

If you are starting this tutorial at one of the proctored tutorial events,
Expand All @@ -118,12 +101,27 @@ you will need to do one of the following:
tools within it.
+ Install the P4 development tools on an existing system with a
supported version of Ubuntu Linux.
+ Install P4 development tools and also
[P4sim](https://github.com/HapCommSys/p4sim).
+ Note: No instructions have been written yet on how to run the
tutorials exercises using P4sim. If your goal is to learn from
doing the exercises, we recommend you ignore P4sim for now.

See the appropriate section below for more details on your choice.

If you have a Windows, Mac, or Linux system with a 64-bit Intel/AMD
processor architecture, or an Apple Silicon Mac, and are willing to
install and use VirtualBox to run a Linux virtual machine, then the
first option above is the quickest way to get started, followed by the
second option. If you prefer not to use VirtualBox for some reason,
or prefer to use an existing system with a supported version of Ubuntu
Linux installed, the third option may be best for you.

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

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

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

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).
There are instructions and scripts in another Github repository that
can, starting from a freshly installed Ubuntu 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).

### Install P4 development tools and also P4sim

[P4sim](https://github.com/HapCommSys/p4sim) is a lightweight,
dependency-free P4 packet-processing simulator designed for learning
and experimentation. 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.

P4sim is intended for:

* Running P4 programs without installing large data plane frameworks
* Quickly testing parser and control-flow behavior
* Understanding how P4 programs process packets step-by-step

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). It is mainly a
**teaching and debugging tool**.

To learn more or try P4sim examples, see:
[`P4sim/README.md`](./doc/P4sim/README.md)

# How to Contribute

Expand Down