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
  • Debugging and Troubleshooting

Debugging and Troubleshooting · Changes

Page history
Updated Debugging and Troubleshooting (markdown) authored Jul 26, 2021 by Jurij Nota's avatar Jurij Nota
Show whitespace changes
Inline Side-by-side
Showing with 8 additions and 2 deletions
+8 -2
  • Debugging-and-Troubleshooting.md Debugging-and-Troubleshooting.md +8 -2
  • No files found.
Debugging-and-Troubleshooting.md
View page @ a6da2089
......@@ -60,13 +60,17 @@ If logging is enabled, and you use the `simple_switch_CLI` when starting the top
### Event logging
To enable event logging when starting your switch, use the *--nanolog* command line option. For example, to use the ipc address *ipc:///tmp/bm-log.ipc*:
To enable event logging when starting your switch, use the `--nanolog` command line option. For example, to use the *ipc* address `ipc:///tmp/bm-log.ipc`:
```bash
sudo ./simple_switch -i 0@<iface0> -i 1@<iface1> --nanolog ipc:///tmp/bm-log.ipc <path to JSON file>
```
Use [tools/nanomsg_client.py](https://github.com/p4lang/behavioral-model/blob/master/tools/nanomsg_client.py) as follows when the switch is running:
```bash
sudo ./nanomsg_client.py [--thrift-port <port>]
```
The script will display events of significance (table hits / misses, parser transitions, ...) for each packet.
......@@ -83,7 +87,9 @@ To enable the debugger, make sure that you passed the `--enable-debugger` flag t
Use [tools/p4dbg.py](https://github.com/p4lang/behavioral-model/blob/master/tools/p4dbg.py) as follows when the switch is running to
attach the debugger to the switch:
sudo ./p4dbg.py [--thrift-port <port>]
```bash
sudo ./p4dbg.py [--thrift-port <port>]
```
You can find a P4 debugger user guide in the [BMv2 documentation](https://github.com/p4lang/behavioral-model/blob/master/docs/p4dbg_user_guide.md).
......
Clone repository

P4-Learning Documentation

  • BMv2 Simple Switch
  • Control Plane
  • Debugging and Troubleshooting

沪ICP备19002739号