ubuntu 14.04为例子

一、首先要fork到自己的github里面

源码目录

https://github.com/p4lang/p4factory

然后fork到自己的github里面

接着

git clone git@github.com:peiqiaoWang/p4factory.git

二、模块更新

更新p4factory的模块

git submodule update --init --recursive

大部分错误是出现在这里,会经常出现什么错误,很大一部分原因是因为网络不好,因为是外国网站下的,建议用一下VPN(本人是用手机热点,哭晕)

三、快速安装

1、安装全部的ubuntu 14.04的依赖 运行

./install_deps.sh

2、创建veth interfaces

sudo p4factory/tools/veth_setup.sh

3、采用自动配置文件生成 生成文件

cd p4factory
./autogen.sh
./configure

4、验证安装和测试一下模拟器

cd p4factory/targets/basic_routing/
make bm
sudo ./behavioral-model

5、跑一个小程序,在另一个终端

cd p4factory/targets/basic_routing/
sudo python run_tests.py --test-dir tests/ptf-tests/

相关文章:

  • 2021-07-07
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2021-10-21
  • 2022-02-17
  • 2021-09-06
  • 2021-07-29
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2022-01-12
  • 2022-01-14
  • 2021-11-21
  • 2022-12-23
  • 2022-01-21
相关资源
相似解决方案