Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P p4-learning
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • p4git
  • p4-learning
  • Wiki
  • Useful Scripts

Useful Scripts · Changes

Page history
Updated Getting Started (markdown) authored Jul 26, 2021 by Jurij Nota's avatar Jurij Nota
Show whitespace changes
Inline Side-by-side
Showing with 0 additions and 2 deletions
+0 -2
  • Useful-Scripts.md Useful-Scripts.md +0 -2
  • No files found.
Useful-Scripts.md 0 → 100644
View page @ df92b986
In this section we will add scripts that might come handy. For instance, a script to upgrade some of the
software you can find in the VM.
### Installing all the p4-tools that come with the VM
If you just want to install all the software required to start developing
P4 you can use the [install-p4-tools.sh](../vm/bin/install-p4-tools.sh) script.
You can change the two following variables to enable/disable debugging or the
required software for the P4runtime.
```bash
DEBUG_FLAGS=true
ENABLE_P4_RUNTIME=true
```
### Updating BMV2
We provide a very useful script that allows you to easily update `bmv2` to the latest version,
to a different commit, enable/disable debugging, multiqueuing and more. If you built the `vm`
using vagrant or use the provided VM this script will be already installed in `/bin/` and you
directly used it.
```bash
update-bmv2 -h
update-bmv2 [OPTION]... [FILE]...
Update bmv2/PI script options.
Options:
--enable-multi-queue: Enables simple_switch multiple queues per port
--update-code: Before building cleans and pulls code from master or <use-commit>
--bmv2-commit: Specific commit we want to checkout before building the bmv2
--pi-commit: Specific commit we want to checkout before building PI
--enable-debugging: Compiles the switch with debugging options
--enable-p4runtime: Compiles the simple_switch_grpc
```
You can find the script [here](../vm/bin/update-bmv2.sh).
### Updating P4C
We also provide a similar script to update `p4c`, the P4 code compiler.
```bash
update-p4c -h
update-p4c [OPTION]... [FILE]...
Update p4c script options.
Options:
--update-code Username for script
--p4c-commit: Specific commit we want to checkout before building the bmv2
--enable-debugging: Compiles the switch with debugging options
--copy-p4include: Copies a custom p4include to the global path
--only-copy-p4include: Does not compile p4c
```
You can find the script [here](../vm/bin/update-p4c.sh).
Clone repository

P4-Learning Documentation

  • BMv2 Simple Switch
  • Control Plane
  • Debugging and Troubleshooting

沪ICP备19002739号