From c43f6ed97544191ca804a8885caa3af8906e7f65 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Wed, 16 Oct 2024 18:55:00 -0400 Subject: [PATCH 1/4] 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 --- vm-ubuntu-20.04/README.md | 217 +--------------- vm-ubuntu-20.04/create-vm-image-for-others.md | 210 ++++++++++++++++ vm-ubuntu-24.04/README.md | 235 +----------------- vm-ubuntu-24.04/create-vm-image-for-others.md | 214 ++++++++++++++++ 4 files changed, 435 insertions(+), 441 deletions(-) create mode 100644 vm-ubuntu-20.04/create-vm-image-for-others.md create mode 100644 vm-ubuntu-24.04/create-vm-image-for-others.md diff --git a/vm-ubuntu-20.04/README.md b/vm-ubuntu-20.04/README.md index ade3084c..6a1eb7ff 100644 --- a/vm-ubuntu-20.04/README.md +++ b/vm-ubuntu-20.04/README.md @@ -1,10 +1,12 @@ # Creating the VM + + Below are the steps to create a brand new VM using Vagrant: + Install [Vagrant](https://developer.hashicorp.com/vagrant/docs/installation) on your system if it's not already installed. - + Navigate to the directory where you want to create the new VM. + + In a shell/terminal window, change to this `vm-ubuntu-20.04` + directory inside the `tutorials` directory. + Run the below command in the terminal. - ``` + ```bash vagrant up ``` @@ -13,214 +15,9 @@ - You can update these packages using `apt upgrade` within the VM. + Alternatively, a development VM can be created by running - ``` + ```bash vagrant up dev ``` -*Note* : that creating a development VM can take one to several -hours, depending upon the speed of your computer and Internet -connection. - -Below are steps that were performed _after_ one of the commands above -was run on the host OS, before creating the VM images. Some of these -steps could probably be automated with programs, and changes to the -`vagrant` scripts that can do so are welcome. I performed these steps -manually to create a VM image, simply to avoid the experimentation and -time required to automate them. I typically only create new VM images -once per month. - -+ Log in as user p4 (password p4) -+ Click "Upgrade" in the pop-up window asking if you want to upgrade - the system, if asked. This will download the latest Linux kernel - version released for Ubuntu 20.04, and other updated packages. -+ Reboot the system. -+ This is optional, but if you want to save a little disk space, use - - ``` - sudo apt purge - ``` - - to remove older version of Linux - kernel, if the upgrade installed a newer one. -+ Clean the local repository of retrieved package files to free up disk space - - ``` - sudo apt clean - ``` - -+ Log in as user p4 (password p4) -+ Start menu -> Preferences -> LXQt settings -> Monitor settings - + Change resolution from initial 800x600 to 1024x768. Apply the changes. - + Close monitor settings window - + *Note*: For some reason I do not know, these settings seem to be - undone, even if I use the "Save" button. They are temporarily in - effect if I shut down the system and log back in, but then in a few - seconds it switches back to 800x600. Strange. -+ Start menu -> Preferences -> LXQt settings -> Desktop - + In "Wallpaper mode" popup menu, choose "Center on the screen". - + Click Apply button - + Close "Desktop preferences" window -+ Several of the icons on the desktop have an exclamation mark on - them. If you try double-clicking those icons, it pops up a window - saying "This file 'Wireshark' seems to be a desktop entry. What do - you want to do with it?" with buttons for "Open", "Execute", and - "Cancel". Clicking "Execute" executes the associated command. - If you do a mouse middle click on one of these desktop icons, a - popup menu appears where the second-to-bottom choice is "Trust this - executable". Selecting that causes the exclamation mark to go away, - and future double-clicks of the icon execute the program without - first popping up a window to choose between Open/Execute/Cancel. I - did that for each of these desktop icons: - + Terminal - + Wireshark -+ Log off - -+ Log in as user vagrant (password vagrant) -+ Change monitor settings and wallpaper mode as described above for - user p4. -+ Open a terminal. - + Run the command - - ``` - ./clean.sh - ``` - which removes about 6 to 7 GBytes of - files created while building the projects. -+ Log off - - -# Notes on test results for the VM - -I have run the tests below on every VM image I release, before -releasing it. You need not run them again, unless you are curious how -to do so. - - -## p4c testing results - -Steps to run the p4c tests: - -+ Log in as user vagrant (password vagrant) -+ In a new terminal, execute these commands: - -If you are testing on a Release VM image, first get a copy of the p4c -source code using the following command. This is unnecessary with a -Development VM image, as there is already a `p4c` directory with the -version of source code used to create that image already included in -the home directory of the `vagrant` user account: - -```bash -# for Release VM image only -git clone --recursive https://github.com/p4lang/p4c -``` - -The following steps are common for both Release and Development VM -images: - -```bash -# Compile p4c again from source, since the clean.sh step reduced disk -# space by deleting the p4c/build directory. -git clone https://github.com/jafingerhut/p4-guide -cd p4c -~/p4-guide/bin/build-p4c.sh - -# Run the p4c tests -cd build -make -j2 check |& tee make-check-out.txt -``` - -As of 2024-08-01, the p4c compiler passes all of its included tests, -except for some of the p4testgen tests (if those are enabled). - - -## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository - -With the version of the [tutorials](https://github.com/p4lang/tutorials) repository -that comes pre-installed in the `p4` user account of this VM, the -following tests pass. - -First log in as the user `p4` (password `p4`) and open a terminal -window. -```bash -$ cd tutorials/exercises/basic -$ cp solution/basic.p4 basic.p4 -$ make run -``` - -If at the end of many lines of logging output you see a prompt -`mininet>`, you can try entering the command `h1 ping h2` to ping from -virtual host `h1` in the exercise to `h2`, and it should report a -successful ping every second. It will not stop on its own. You can -type Control-C to stop it and return to the `mininet>` prompt, and you -can type Control-D to exit from mininet and get back to the original -shell prompt. To ensure that any processes started by the above steps -are terminated, you can run this command: -```bash -$ make stop -``` - - -# Creating a single file image of the VM - -These notes are primarily here as a reminder for people creating VM -images for distribution. If you downloaded a VM image, these steps -were already performed, and there is no reason you need to perform -them again. - -For the particular case of creating the VM named: - -+ 'P4 Tutorial Development 2024-08-01' -+ created on August 1, 2024 - -here were the host OS details, in case it turns out that matters to -the finished VM image for some reason: - -+ Windows 10 Enterprise -+ VirtualBox 6.1.30 r148432 -+ Vagrant 2.2.18 - -In the VirtualBox GUI interface: - -+ Choose menu item File -> Export Appliance ... -+ Select the VM named 'P4 Tutorial Development 2024-08-01' and click - Continue button - -+ Format - + I used: Open Virtualization Format 1.0 - + Other available options were: - + Open Virtualization Format 0.9 - + Open Virtualization Format 2.0 -+ Target file - + I used: /Users/andy/Documents/P4 Tutorials Development 2024-08-01.ova -+ Mac Address Policy - + I used: Include only NAT network adapter MAC addresses - + Other available options were: - + Include all network adapter MAC addresses - + Strip all network adapter MAC addresses -+ Additionally - + Write Manifest file: checked - + Include ISO image files: unchecked - -Clicked "Continue" button. - -Virtual system settings: - -+ Name: P4 Tutorial 2024-08-01 -+ Product: I left this blank -+ Product-URL: I left this blank -+ Vendor: P4.org - P4 Language Consortium -+ Vendor-URL: https://p4.org -+ Version: 2024-08-01 -+ Description: - -``` -Open source P4 development tools built from latest source code as of 2024-Aug-01 and packaged into an Ubuntu 20.04 Desktop Linux VM for the AMD64 architecture. -``` - -+ License - -``` -Open source code available hosted at https://github.com/p4lang is released under the Apache 2.0 license. Libraries it depends upon, such as Protobuf, Thrift, gRPC, Ubuntu Linux, etc. are released under their own licenses. -``` - -Clicked "Export" button. +*Note* that creating a development VM can take several hours, +depending upon the speed of your computer and Internet connection. diff --git a/vm-ubuntu-20.04/create-vm-image-for-others.md b/vm-ubuntu-20.04/create-vm-image-for-others.md new file mode 100644 index 00000000..6f050d1f --- /dev/null +++ b/vm-ubuntu-20.04/create-vm-image-for-others.md @@ -0,0 +1,210 @@ +# Creating a VM image for distribution to others + +If you want to run `p4c` tests, see the next section on how to do so, +_before_ running the commands in this section, since the commands in +this section will delete files that take one to several hours to +create while compiling p4c, needed for running p4c tests. + +Below are steps that were performed _after_ the commands in the +README.md file were run on the host OS, before creating the VM images. +Some of these steps could probably be automated with programs, and +changes to the `vagrant` scripts that can do so are welcome. I +performed these steps manually to create a VM image, simply to avoid +the experimentation and time required to automate them. I typically +only create new VM images once per month. + ++ Log in as user p4 (password p4) ++ Click "Upgrade" in the pop-up window asking if you want to upgrade + the system, if asked. This will download the latest Linux kernel + version released for Ubuntu 20.04, and other updated packages. ++ Reboot the system. ++ This is optional, but if you want to save a little disk space, use + + ``` + sudo apt purge + ``` + + to remove older version of Linux + kernel, if the upgrade installed a newer one. ++ Clean the local repository of retrieved package files to free up disk space + + ``` + sudo apt clean + ``` + ++ Log in as user p4 (password p4) ++ Start menu -> Preferences -> LXQt settings -> Monitor settings + + Change resolution from initial 800x600 to 1024x768. Apply the changes. + + Close monitor settings window + + *Note*: For some reason I do not know, these settings seem to be + undone, even if I use the "Save" button. They are temporarily in + effect if I shut down the system and log back in, but then in a few + seconds it switches back to 800x600. Strange. ++ Start menu -> Preferences -> LXQt settings -> Desktop + + In "Wallpaper mode" popup menu, choose "Center on the screen". + + Click Apply button + + Close "Desktop preferences" window ++ Several of the icons on the desktop have an exclamation mark on + them. If you try double-clicking those icons, it pops up a window + saying "This file 'Wireshark' seems to be a desktop entry. What do + you want to do with it?" with buttons for "Open", "Execute", and + "Cancel". Clicking "Execute" executes the associated command. + If you do a mouse middle click on one of these desktop icons, a + popup menu appears where the second-to-bottom choice is "Trust this + executable". Selecting that causes the exclamation mark to go away, + and future double-clicks of the icon execute the program without + first popping up a window to choose between Open/Execute/Cancel. I + did that for each of these desktop icons: + + Terminal + + Wireshark ++ Log off + ++ Log in as user vagrant (password vagrant) ++ Change monitor settings and wallpaper mode as described above for + user p4. ++ Open a terminal. + + Run the command + + ``` + ./clean.sh + ``` + which removes about 6 to 7 GBytes of + files created while building the projects. ++ Log off + + +# Notes on test results for the VM + +I have run the tests below on every VM image I release, before +releasing it. You need not run them again, unless you are curious how +to do so. + + +## p4c testing results + +Steps to run the p4c tests: + ++ Log in as user vagrant (password vagrant) ++ In a new terminal, execute these commands: + +If you are testing on a Release VM image, first get a copy of the p4c +source code using the following command. This is unnecessary with a +Development VM image, as there is already a `p4c` directory with the +version of source code used to create that image already included in +the home directory of the `vagrant` user account: + +```bash +# for Release VM image only +git clone --recursive https://github.com/p4lang/p4c +``` + +The following steps are common for both Release and Development VM +images: + +```bash +# Compile p4c again from source, since the clean.sh step reduced disk +# space by deleting the p4c/build directory. +git clone https://github.com/jafingerhut/p4-guide +cd p4c +~/p4-guide/bin/build-p4c.sh + +# Run the p4c tests +cd build +make -j2 check |& tee make-check-out.txt +``` + +As of 2024-08-01, the p4c compiler passes all of its included tests, +except for some of the p4testgen tests (if those are enabled). + + +## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository + +With the version of the [tutorials](https://github.com/p4lang/tutorials) repository +that comes pre-installed in the `p4` user account of this VM, the +following tests pass. + +First log in as the user `p4` (password `p4`) and open a terminal +window. +```bash +$ cd tutorials/exercises/basic +$ cp solution/basic.p4 basic.p4 +$ make run +``` + +If at the end of many lines of logging output you see a prompt +`mininet>`, you can try entering the command `h1 ping h2` to ping from +virtual host `h1` in the exercise to `h2`, and it should report a +successful ping every second. It will not stop on its own. You can +type Control-C to stop it and return to the `mininet>` prompt, and you +can type Control-D to exit from mininet and get back to the original +shell prompt. To ensure that any processes started by the above steps +are terminated, you can run this command: +```bash +$ make stop +``` + + +# Creating a single file image of the VM + +These notes are primarily here as a reminder for people creating VM +images for distribution. If you downloaded a VM image, these steps +were already performed, and there is no reason you need to perform +them again. + +For the particular case of creating the VM named: + ++ 'P4 Tutorial Development 2024-08-01' ++ created on August 1, 2024 + +here were the host OS details, in case it turns out that matters to +the finished VM image for some reason: + ++ Windows 10 Enterprise ++ VirtualBox 6.1.30 r148432 ++ Vagrant 2.2.18 + +In the VirtualBox GUI interface: + ++ Choose menu item File -> Export Appliance ... ++ Select the VM named 'P4 Tutorial Development 2024-08-01' and click + Continue button + ++ Format + + I used: Open Virtualization Format 1.0 + + Other available options were: + + Open Virtualization Format 0.9 + + Open Virtualization Format 2.0 ++ Target file + + I used: /Users/andy/Documents/P4 Tutorials Development 2024-08-01.ova ++ Mac Address Policy + + I used: Include only NAT network adapter MAC addresses + + Other available options were: + + Include all network adapter MAC addresses + + Strip all network adapter MAC addresses ++ Additionally + + Write Manifest file: checked + + Include ISO image files: unchecked + +Clicked "Continue" button. + +Virtual system settings: + ++ Name: P4 Tutorial 2024-08-01 ++ Product: I left this blank ++ Product-URL: I left this blank ++ Vendor: P4.org - P4 Language Consortium ++ Vendor-URL: https://p4.org ++ Version: 2024-08-01 ++ Description: + +``` +Open source P4 development tools built from latest source code as of 2024-Aug-01 and packaged into an Ubuntu 20.04 Desktop Linux VM for the AMD64 architecture. +``` + ++ License + +``` +Open source code available hosted at https://github.com/p4lang is released under the Apache 2.0 license. Libraries it depends upon, such as Protobuf, Thrift, gRPC, Ubuntu Linux, etc. are released under their own licenses. +``` + +Clicked "Export" button. diff --git a/vm-ubuntu-24.04/README.md b/vm-ubuntu-24.04/README.md index 31466a58..9a2fb11c 100644 --- a/vm-ubuntu-24.04/README.md +++ b/vm-ubuntu-24.04/README.md @@ -1,10 +1,7 @@ # Introduction -This directory is still new and a bit experimental at this point. -Feel free to try it out and report problems if you find any. - -Known issues that anyone who knows how to fix is welcome to suggest -improvements: +Known minor issues that anyone who knows how to fix is welcome to +suggest improvements: + The desktop icon for the Wireshark application does not seem to exist, at least not under the name that worked for Ubuntu 20.04, so @@ -15,7 +12,8 @@ improvements: + Below are the steps to create a brand new VM using Vagrant: + Install [Vagrant](https://developer.hashicorp.com/vagrant/docs/installation) on your system if it's not already installed. - + Navigate to the directory where you want to create the new VM. + + In a shell/terminal window, change to this `vm-ubuntu-24.04` + directory inside the `tutorials` directory. + Run the below command in the terminal. ```bash @@ -30,228 +28,3 @@ improvements: *Note* that creating a development VM can take several hours, depending upon the speed of your computer and Internet connection. - - -# Creating a VM image for distribution to others - -If you are creating the VM for your own use, there is no need to read -further below. All later instructions are for those who wish to -create a VM image for others to download and use. - -Some of these steps could probably be automated with programs, and -changes to the `vagrant` scripts that can do so are welcome. I -perform these steps manually to create a VM image, simply to avoid the -experimentation and time required to automate them. I typically only -create new VM images once per month. - -+ Log in as user p4 (password p4) -+ Upgrade Ubuntu packages if newer ones are available: - - ```bash - sudo apt update - sudo apt upgrade - ``` - -+ Reboot the system. -+ This is optional, but if you want to save a little disk space, use - - ```bash - sudo apt purge - ``` - - to remove older version of Linux - kernel, if the upgrade installed a newer one. -+ Clean the local repository of retrieved package files to free up disk space - - ```bash - sudo apt clean - ``` - -+ Log in as user p4 (password p4) -+ Start menu -> Preferences -> LXQt settings -> Monitor settings - + Change resolution from initial 800x600 to 1024x768. Apply the changes. - + Close monitor settings window - + *Note*: For some reason I do not know, these settings seem to be - undone, even if I use the "Save" button. They are temporarily in - effect if I shut down the system and log back in, but then in a few - seconds it switches back to 800x600. Strange. -+ Start menu -> Preferences -> LXQt settings -> Desktop - + Click "Background" tab - + To the right of "Wallpaper image file" name, click "Browse" - button. Find and choose "lxqt-default-wallpaper.png" from the - list and click "Open". - + In "Wallpaper mode" popup menu, choose "Center on the screen". - + Click Apply button - + Close "Desktop preferences" window -+ Start menu -> Preferences -> LXQt settings -> Appearance - + Click "Icons Theme" in left column - + Click "Ubuntu-Mono-Light ..." in right column. - + Click "Apply" button, then "Close" button. -+ Several of the icons on the desktop have an exclamation mark on - them. If you try double-clicking those icons, it pops up a window - saying "This file 'Wireshark' seems to be a desktop entry. What do - you want to do with it?" with buttons for "Open", "Execute", and - "Cancel". Clicking "Execute" executes the associated command. - If you do a mouse middle click on one of these desktop icons, a - popup menu appears where the second-to-bottom choice is "Trust this - executable". Selecting that causes the exclamation mark to go away, - and future double-clicks of the icon execute the program without - first popping up a window to choose between Open/Execute/Cancel. I - did that for each of these desktop icons: - + Terminal - + Wireshark -+ Log off - -+ Log in as user vagrant (password vagrant) -+ Change monitor settings and wallpaper mode as described above for - user p4. -+ Open a terminal. - + Run the command - - ```bash - ./clean.sh - ``` - which removes about 6 to 7 GBytes of - files created while building the projects. -+ Log off - - -# Notes on test results for the VM - -I have run the tests below on every VM image I release, before -releasing it. You need not run them again, unless you are curious how -to do so. - - -## p4c testing results - -Steps to run the p4c tests: - -+ Log in as user vagrant (password vagrant) -+ In a new terminal, execute these commands: - -If you are testing on a Release VM image, first get a copy of the p4c -source code using the following command. This is unnecessary with a -Development VM image, as there is already a `p4c` directory with the -version of source code used to create that image already included in -the home directory of the `vagrant` user account: - -```bash -# for Release VM image only -git clone --recursive https://github.com/p4lang/p4c -``` - -The following steps are common for both Release and Development VM -images: - -```bash -# Compile p4c again from source, since the clean.sh step reduced disk -# space by deleting the p4c/build directory. -git clone https://github.com/jafingerhut/p4-guide -cd p4c -~/p4-guide/bin/build-p4c.sh - -# Run the p4c tests -cd build -make -j2 check |& tee out1.txt - -# The above fails about 500 tests that require root. Re-run those tests -# as root using the next command. -sudo PATH=${PATH} VIRTUAL_ENV=${VIRTUAL_ENV} ${P4GUIDE_SUDO_OPTS} make -j2 recheck |& tee out2.txt -``` - -As of 2024-08-01, the p4c compiler passes all but about 15 of its -included tests when built using the steps above. - - -## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository - -With the version of the [tutorials](https://github.com/p4lang/tutorials) repository -that comes pre-installed in the `p4` user account of this VM, the -following tests pass. - -First log in as the user `p4` (password `p4`) and open a terminal -window. -```bash -$ cd tutorials/exercises/basic -$ cp solution/basic.p4 basic.p4 -$ make run -``` - -If at the end of many lines of logging output you see a prompt -`mininet>`, you can try entering the command `h1 ping h2` to ping from -virtual host `h1` in the exercise to `h2`, and it should report a -successful ping every second. It will not stop on its own. You can -type Control-C to stop it and return to the `mininet>` prompt, and you -can type Control-D to exit from mininet and get back to the original -shell prompt. To ensure that any processes started by the above steps -are terminated, you can run this command: -```bash -$ make stop -``` - - -# Creating a single file image of the VM - -These notes are primarily here as a reminder for people creating VM -images for distribution. If you downloaded a VM image, these steps -were already performed, and there is no reason you need to perform -them again. - -For the particular case of creating the VM named: - -+ 'P4 Tutorial Development 2024-08-01' -+ created on August 1, 2024 - -here were the host OS details, in case it turns out that matters to -the finished VM image for some reason: - -+ Windows 10 Enterprise -+ VirtualBox 6.1.30 r148432 -+ Vagrant 2.2.18 - -In the VirtualBox GUI interface: - -+ Choose menu item File -> Export Appliance ... -+ Select the VM named 'P4 Tutorial Development 2024-08-01' and click - Continue button - -+ Format - + I used: Open Virtualization Format 1.0 - + Other available options were: - + Open Virtualization Format 0.9 - + Open Virtualization Format 2.0 -+ Target file - + I used: /Users/andy/Documents/P4 Tutorials Development 2024-08-01.ova -+ Mac Address Policy - + I used: Include only NAT network adapter MAC addresses - + Other available options were: - + Include all network adapter MAC addresses - + Strip all network adapter MAC addresses -+ Additionally - + Write Manifest file: checked - + Include ISO image files: unchecked - -Clicked "Continue" button. - -Virtual system settings: - -+ Name: P4 Tutorial 2024-08-01 -+ Product: I left this blank -+ Product-URL: I left this blank -+ Vendor: P4.org - P4 Language Consortium -+ Vendor-URL: https://p4.org -+ Version: 2024-08-01 -+ Description: - -``` -Open source P4 development tools built from latest source code as of 2024-Aug-01 and packaged into an Ubuntu 24.04 Desktop Linux VM for the AMD64 architecture. -``` - -+ License - -``` -Open source code available hosted at https://github.com/p4lang is released under the Apache 2.0 license. Libraries it depends upon, such as Protobuf, Thrift, gRPC, Ubuntu Linux, etc. are released under their own licenses. -``` - -Clicked "Export" button. diff --git a/vm-ubuntu-24.04/create-vm-image-for-others.md b/vm-ubuntu-24.04/create-vm-image-for-others.md new file mode 100644 index 00000000..2e38ca84 --- /dev/null +++ b/vm-ubuntu-24.04/create-vm-image-for-others.md @@ -0,0 +1,214 @@ +# Creating a VM image for distribution to others + +If you want to run `p4c` tests, see the next section on how to do so, +_before_ running the commands in this section, since the commands in +this section will delete files that take one to several hours to +create while compiling p4c, needed for running p4c tests. + +If you are creating the VM for your own use, there is no need to read +further below. All later instructions are for those who wish to +create a VM image for others to download and use. + +Some of these steps could probably be automated with programs, and +changes to the `vagrant` scripts that can do so are welcome. I +perform these steps manually to create a VM image, simply to avoid the +experimentation and time required to automate them. I typically only +create new VM images once per month. + ++ Log in as user p4 (password p4) ++ Upgrade Ubuntu packages if newer ones are available: + + ```bash + sudo apt update + sudo apt upgrade + ``` + ++ Reboot the system. ++ This is optional, but if you want to save a little disk space, use + + ```bash + sudo apt purge + ``` + + to remove older version of Linux + kernel, if the upgrade installed a newer one. ++ Clean the local repository of retrieved package files to free up disk space + + ```bash + sudo apt clean + ``` + ++ Log in as user p4 (password p4) ++ Start menu -> Preferences -> LXQt settings -> Monitor settings + + Change resolution from initial 800x600 to 1024x768. Apply the changes. + + Close monitor settings window + + *Note*: For some reason I do not know, these settings seem to be + undone, even if I use the "Save" button. They are temporarily in + effect if I shut down the system and log back in, but then in a few + seconds it switches back to 800x600. Strange. ++ Start menu -> Preferences -> LXQt settings -> Desktop + + Click "Background" tab + + To the right of "Wallpaper image file" name, click "Browse" + button. Find and choose "lxqt-default-wallpaper.png" from the + list and click "Open". + + In "Wallpaper mode" popup menu, choose "Center on the screen". + + Click Apply button + + Close "Desktop preferences" window ++ Start menu -> Preferences -> LXQt settings -> Appearance + + Click "Icons Theme" in left column + + Click "Ubuntu-Mono-Light ..." in right column. + + Click "Apply" button, then "Close" button. ++ Several of the icons on the desktop have an exclamation mark on + them. If you try double-clicking those icons, it pops up a window + saying "This file 'Wireshark' seems to be a desktop entry. What do + you want to do with it?" with buttons for "Open", "Execute", and + "Cancel". Clicking "Execute" executes the associated command. + If you do a mouse middle click on one of these desktop icons, a + popup menu appears where the second-to-bottom choice is "Trust this + executable". Selecting that causes the exclamation mark to go away, + and future double-clicks of the icon execute the program without + first popping up a window to choose between Open/Execute/Cancel. I + did that for each of these desktop icons: + + Terminal + + Wireshark ++ Log off + ++ Log in as user vagrant (password vagrant) ++ Change monitor settings and wallpaper mode as described above for + user p4. ++ Open a terminal. + + Run the command + + ```bash + ./clean.sh + ``` + which removes about 6 to 7 GBytes of + files created while building the projects. ++ Log off + + +# Notes on test results for the VM + +I have run the tests below on every VM image I release, before +releasing it. You need not run them again, unless you are curious how +to do so. + + +## p4c testing results + +Steps to run the p4c tests: + ++ Log in as user vagrant (password vagrant) ++ In a new terminal, execute these commands: + +```bash +# Compile p4c again from source, since the clean.sh step reduced disk +# space by deleting the p4c/build directory. +git clone https://github.com/jafingerhut/p4-guide +cd p4c +~/p4-guide/bin/build-p4c.sh + +# Run the p4c tests +cd build +make -j2 check |& tee out1.txt + +# The above fails about 500 tests that require root. Re-run those tests +# as root using the next command. +sudo PATH=${PATH} VIRTUAL_ENV=${VIRTUAL_ENV} ${P4GUIDE_SUDO_OPTS} make -j2 recheck |& tee out2.txt +``` + +As of 2024-08-01, the p4c compiler passes all but about 15 of its +included tests when built using the steps above. + + +## Send ping packets in the solution to `basic` exercise of `p4lang/tutorials` repository + +With the version of the [tutorials](https://github.com/p4lang/tutorials) repository +that comes pre-installed in the `p4` user account of this VM, the +following tests pass. + +First log in as the user `p4` (password `p4`) and open a terminal +window. +```bash +$ cd tutorials/exercises/basic +$ cp solution/basic.p4 basic.p4 +$ make run +``` + +If at the end of many lines of logging output you see a prompt +`mininet>`, you can try entering the command `h1 ping h2` to ping from +virtual host `h1` in the exercise to `h2`, and it should report a +successful ping every second. It will not stop on its own. You can +type Control-C to stop it and return to the `mininet>` prompt, and you +can type Control-D to exit from mininet and get back to the original +shell prompt. To ensure that any processes started by the above steps +are terminated, you can run this command: +```bash +$ make stop +``` + + +# Creating a single file image of the VM + +These notes are primarily here as a reminder for people creating VM +images for distribution. If you downloaded a VM image, these steps +were already performed, and there is no reason you need to perform +them again. + +For the particular case of creating the VM named: + ++ 'P4 Tutorial Development 2024-08-01' ++ created on August 1, 2024 + +here were the host OS details, in case it turns out that matters to +the finished VM image for some reason: + ++ Windows 10 Enterprise ++ VirtualBox 6.1.30 r148432 ++ Vagrant 2.2.18 + +In the VirtualBox GUI interface: + ++ Choose menu item File -> Export Appliance ... ++ Select the VM named 'P4 Tutorial Development 2024-08-01' and click + Continue button + ++ Format + + I used: Open Virtualization Format 1.0 + + Other available options were: + + Open Virtualization Format 0.9 + + Open Virtualization Format 2.0 ++ Target file + + I used: /Users/andy/Documents/P4 Tutorials Development 2024-08-01.ova ++ Mac Address Policy + + I used: Include only NAT network adapter MAC addresses + + Other available options were: + + Include all network adapter MAC addresses + + Strip all network adapter MAC addresses ++ Additionally + + Write Manifest file: checked + + Include ISO image files: unchecked + +Clicked "Continue" button. + +Virtual system settings: + ++ Name: P4 Tutorial 2024-08-01 ++ Product: I left this blank ++ Product-URL: I left this blank ++ Vendor: P4.org - P4 Language Consortium ++ Vendor-URL: https://p4.org ++ Version: 2024-08-01 ++ Description: + +``` +Open source P4 development tools built from latest source code as of 2024-Aug-01 and packaged into an Ubuntu 24.04 Desktop Linux VM for the AMD64 architecture. +``` + ++ License + +``` +Open source code available hosted at https://github.com/p4lang is released under the Apache 2.0 license. Libraries it depends upon, such as Protobuf, Thrift, gRPC, Ubuntu Linux, etc. are released under their own licenses. +``` + +Clicked "Export" button. From 322494984d045d085562715f3e7fb3fece7ff1d5 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Thu, 30 Jan 2025 21:17:19 +0000 Subject: [PATCH 2/4] Add 2025-Jan-30 versions of source code for install.sh Signed-off-by: Andy Fingerhut --- vm-ubuntu-24.04/install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vm-ubuntu-24.04/install.sh b/vm-ubuntu-24.04/install.sh index ccc7728f..a7eae56b 100755 --- a/vm-ubuntu-24.04/install.sh +++ b/vm-ubuntu-24.04/install.sh @@ -27,11 +27,12 @@ print_usage() { 1>&2 echo "" 1>&2 echo "Dates supported:" 1>&2 echo " 2025-Jan-01" + 1>&2 echo " 2025-Jan-30" } if [ $# -eq 0 ] then - VERSION="2025-Jan-01" + VERSION="2025-Jan-30" echo "No version specified. Defaulting to ${VERSION}" elif [ $# -eq 1 ] then @@ -49,6 +50,13 @@ case ${VERSION} in export INSTALL_P4C_SOURCE_VERSION="1dc0afae2207f4bb9f5ab45f105ed569cc1ac89b" export INSTALL_PTF_SOURCE_VERSION="c554f83685186be4cfa9387eb5d6d700d2bbd7c0" ;; + 2025-Jan-30) + # 2025-Jan-01 versions: + export INSTALL_BEHAVIORAL_MODEL_SOURCE_VERSION="892c42198082d3252f4c6facc7363c02ca1d71d2" + export INSTALL_PI_SOURCE_VERSION="2bb40f7ab800b91b26f3aed174bbbfc739a37ffa" + export INSTALL_P4C_SOURCE_VERSION="2776b1948529bc7e8ccfb2f6ea2a9c1ab1f68796" + export INSTALL_PTF_SOURCE_VERSION="c554f83685186be4cfa9387eb5d6d700d2bbd7c0" + ;; latest) echo "Using the latest version of all p4lang repository source code." ;; From fe9e97338863c9dae92c3c1c2ca11707c1b1903b Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Fri, 17 Apr 2026 03:44:40 -0400 Subject: [PATCH 3/4] Use SPDX lines for copyright holder and license info on Barefoot and ONF files That is, files with copyright notices in them that have Barefoot Networks or the Open Networking Foundation as the copyright holder. Signed-off-by: Andy Fingerhut --- utils/mininet/multi_switch_mininet.py | 17 ++--------------- utils/mininet/p4_mininet.py | 16 ++-------------- utils/mininet/single_switch_mininet.py | 17 ++--------------- utils/netstat.py | 16 ++-------------- utils/p4_mininet.py | 16 ++-------------- utils/p4apprunner.py | 16 +++------------- utils/p4runtime_lib/bmv2.py | 16 ++-------------- utils/p4runtime_lib/convert.py | 16 ++-------------- utils/p4runtime_lib/error_utils.py | 16 ++-------------- utils/p4runtime_lib/helper.py | 16 ++-------------- utils/p4runtime_lib/simple_controller.py | 18 +++--------------- utils/p4runtime_lib/switch.py | 16 ++-------------- utils/p4runtime_switch.py | 18 +++--------------- utils/run_exercise.py | 23 +++-------------------- vm-ubuntu-20.04/p4.vim | 1 + vm-ubuntu-20.04/p4_16-mode.el | 2 +- vm-ubuntu-24.04/p4.vim | 1 + vm-ubuntu-24.04/p4_16-mode.el | 2 +- vm/p4.vim | 1 + vm/p4_16-mode.el | 2 +- 20 files changed, 38 insertions(+), 208 deletions(-) diff --git a/utils/mininet/multi_switch_mininet.py b/utils/mininet/multi_switch_mininet.py index 97d4ff75..8ebd5e8f 100755 --- a/utils/mininet/multi_switch_mininet.py +++ b/utils/mininet/multi_switch_mininet.py @@ -1,20 +1,7 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 - -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import argparse import importlib diff --git a/utils/mininet/p4_mininet.py b/utils/mininet/p4_mininet.py index ea6417df..b6f39f5e 100644 --- a/utils/mininet/p4_mininet.py +++ b/utils/mininet/p4_mininet.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import os import socket diff --git a/utils/mininet/single_switch_mininet.py b/utils/mininet/single_switch_mininet.py index b6b72b5e..446475ec 100755 --- a/utils/mininet/single_switch_mininet.py +++ b/utils/mininet/single_switch_mininet.py @@ -1,20 +1,7 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 - -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import argparse from subprocess import PIPE, Popen diff --git a/utils/netstat.py b/utils/netstat.py index 6c813905..6779e956 100644 --- a/utils/netstat.py +++ b/utils/netstat.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import psutil diff --git a/utils/p4_mininet.py b/utils/p4_mininet.py index 44148d22..ddb77392 100644 --- a/utils/p4_mininet.py +++ b/utils/p4_mininet.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import os import tempfile diff --git a/utils/p4apprunner.py b/utils/p4apprunner.py index 6dba5d45..ec14c16d 100755 --- a/utils/p4apprunner.py +++ b/utils/p4apprunner.py @@ -1,18 +1,8 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 diff --git a/utils/p4runtime_lib/bmv2.py b/utils/p4runtime_lib/bmv2.py index 67254f65..ae6767ef 100644 --- a/utils/p4runtime_lib/bmv2.py +++ b/utils/p4runtime_lib/bmv2.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 from p4.tmp import p4config_pb2 from .switch import SwitchConnection diff --git a/utils/p4runtime_lib/convert.py b/utils/p4runtime_lib/convert.py index 91fe5538..22b747bf 100644 --- a/utils/p4runtime_lib/convert.py +++ b/utils/p4runtime_lib/convert.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import math import re import socket diff --git a/utils/p4runtime_lib/error_utils.py b/utils/p4runtime_lib/error_utils.py index 0c04a317..1325b0c3 100644 --- a/utils/p4runtime_lib/error_utils.py +++ b/utils/p4runtime_lib/error_utils.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/utils/p4runtime_lib/helper.py b/utils/p4runtime_lib/helper.py index eb631eb8..55a79c44 100644 --- a/utils/p4runtime_lib/helper.py +++ b/utils/p4runtime_lib/helper.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import re import google.protobuf.text_format diff --git a/utils/p4runtime_lib/simple_controller.py b/utils/p4runtime_lib/simple_controller.py index 773d0b2f..35fcd795 100755 --- a/utils/p4runtime_lib/simple_controller.py +++ b/utils/p4runtime_lib/simple_controller.py @@ -1,20 +1,8 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. + +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import argparse import json import os diff --git a/utils/p4runtime_lib/switch.py b/utils/p4runtime_lib/switch.py index 19c468ee..df0675d6 100644 --- a/utils/p4runtime_lib/switch.py +++ b/utils/p4runtime_lib/switch.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 from abc import abstractmethod from datetime import datetime from queue import Queue diff --git a/utils/p4runtime_switch.py b/utils/p4runtime_switch.py index 542b41c4..35c6f831 100644 --- a/utils/p4runtime_switch.py +++ b/utils/p4runtime_switch.py @@ -1,19 +1,7 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Barefoot Networks, Inc. -# Copyright 2017-present Open Networking Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2017 Barefoot Networks, Inc. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import os import tempfile diff --git a/utils/run_exercise.py b/utils/run_exercise.py index 4c0d8fbc..a3b9ed17 100755 --- a/utils/run_exercise.py +++ b/utils/run_exercise.py @@ -1,25 +1,8 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Adapted by Robert MacDavid (macdavid@cs.princeton.edu) from scripts found in -# the p4app repository (https://github.com/p4lang/p4app) -# -# We encourage you to dissect this script to better understand the BMv2/Mininet -# environment used by the P4 tutorial. + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import argparse import json import os diff --git a/vm-ubuntu-20.04/p4.vim b/vm-ubuntu-20.04/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm-ubuntu-20.04/p4.vim +++ b/vm-ubuntu-20.04/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm-ubuntu-20.04/p4_16-mode.el b/vm-ubuntu-20.04/p4_16-mode.el index 41ca56b7..3479fd6e 100644 --- a/vm-ubuntu-20.04/p4_16-mode.el +++ b/vm-ubuntu-20.04/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017 diff --git a/vm-ubuntu-24.04/p4.vim b/vm-ubuntu-24.04/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm-ubuntu-24.04/p4.vim +++ b/vm-ubuntu-24.04/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm-ubuntu-24.04/p4_16-mode.el b/vm-ubuntu-24.04/p4_16-mode.el index 41ca56b7..3479fd6e 100644 --- a/vm-ubuntu-24.04/p4_16-mode.el +++ b/vm-ubuntu-24.04/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017 diff --git a/vm/p4.vim b/vm/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm/p4.vim +++ b/vm/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm/p4_16-mode.el b/vm/p4_16-mode.el index 474c73e0..d10df091 100644 --- a/vm/p4_16-mode.el +++ b/vm/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017 From 968575428e8cb8c50b7eebdb76070e306b174d01 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Fri, 17 Apr 2026 03:49:41 -0400 Subject: [PATCH 4/4] Restore some comments that were unintentionally removed. Signed-off-by: Andy Fingerhut --- utils/run_exercise.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils/run_exercise.py b/utils/run_exercise.py index a3b9ed17..672f1998 100755 --- a/utils/run_exercise.py +++ b/utils/run_exercise.py @@ -3,6 +3,13 @@ # SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # # SPDX-License-Identifier: Apache-2.0 + +# Adapted by Robert MacDavid (macdavid@cs.princeton.edu) from scripts found in +# the p4app repository (https://github.com/p4lang/p4app) +# +# We encourage you to dissect this script to better understand the BMv2/Mininet +# environment used by the P4 tutorial. + import argparse import json import os