Skip to content

GitLab

  • Menu
项目 Groups 代码片段
    • 正在加载...
  • 帮助
    • 帮助
    • 支持
    • 社区论坛
    • 提交反馈
  • 登录/注册
  • P p4-learning
  • Project information
    • Project information
    • 动态
    • 标记
    • 成员
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • 议题 0
    • 议题 0
    • 列表
    • 看板
    • 服务台
    • 里程碑
  • 合并请求 0
    • 合并请求 0
  • CI/CD
    • CI/CD
    • 流水线
    • 作业
    • 计划
  • Deployments
    • Deployments
    • 环境
    • 发布
  • Monitor
    • Monitor
    • 事件
  • 软件包与镜像库
    • 软件包与镜像库
    • 软件包注册表
    • Infrastructure Registry
  • 分析
    • 分析
    • CI/CD
    • 仓库
    • Value stream
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 动态
  • 分支图
  • 创建新议题
  • 作业
  • 提交
  • 议题看板
收起侧边栏
  • p4git
  • p4-learning
  • Wiki
  • Debugging and Troubleshooting

Debugging and Troubleshooting · 变更

页面历史
Updated Debugging and Troubleshooting (markdown) 编辑于 7月 26, 2021 作者: Jurij Nota's avatar Jurij Nota
Show whitespace changes
Inline Side-by-side
Showing with 8 addition and 2 deletion
+8 -2
  • Debugging-and-Troubleshooting.md Debugging-and-Troubleshooting.md +8 -2
  • 未找到文件。
Debugging-and-Troubleshooting.md
查看页面@ a6da2089
...@@ -60,13 +60,17 @@ If logging is enabled, and you use the `simple_switch_CLI` when starting the top ...@@ -60,13 +60,17 @@ If logging is enabled, and you use the `simple_switch_CLI` when starting the top
### Event logging ### 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> 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: 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>] sudo ./nanomsg_client.py [--thrift-port <port>]
```
The script will display events of significance (table hits / misses, parser transitions, ...) for each packet. 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 ...@@ -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 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: 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). 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).
......
克隆仓库

P4-Learning Documentation

  • BMv2 Simple Switch
  • Control Plane
  • Debugging and Troubleshooting

沪ICP备19002739号