10/16/2016 發現CI/travis目錄下面有依賴工具的安裝腳本,供參考
switch是個參考的switch例子,很多表可以參考,並且生成了SAI等API供調用。
============================================
首先要參照前面兩篇文章安裝BMv2(p4-behavioral-model)和p4c-bmv2(p4c-bm)
安裝PTF:
git clone https://github.com/p4lang/ptf.git
cd ptf; sudo python setup.py install
安裝switch:
git clone https://github.com/p4lang/switch.git
cd switch
git submodule update --init --recursive
./autogen.sh
./configure --with-bmv2 --with-switchsai
make
#如果在configure步驟找不到bm相關頭文件,需要進入behavioral-model項目執行sudo make install
運行:
sudo tools/veth_setup.sh
sudo bmv2/run_bm.sh
新窗口:
sudo bmv2/run_drivers.sh
測試腳本:
sudo ./bmv2/run_tests.sh --test-dir tests/ptf-tests/pd-tests # for the PD tests
sudo ./bmv2/run_tests.sh --test-dir tests/ptf-tests/api-tests # for the switchapi tests
sudo ./bmv2/run_tests.sh --test-dir tests/ptf-tests/sai-tests # for the switchsai tests
BMv2的命令行調試工具:
bm_CLI
#show_ports, show_tables, switch_info...
p4lang: switch-更完善的P4例子
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Ubuntu18.04.3 安裝 Nvidia DeepStream 並在 P4 顯卡上解碼取幀存圖
芳樽清酒酌流年
2020-06-29 17:36:37
P4學習筆記(三)P4編程語言簡介
0pandas0
2020-06-17 07:45:23
P4學習筆記(二)一個簡單P4交換機實現
0pandas0
2020-06-17 07:45:23
P4學習筆記(一)初識P4
0pandas0
2020-06-17 07:45:23
P4(Perforce): p4python實現同步數據到本地
Allan_shore_ma
2020-05-13 20:22:40
p4factory 入門
JasonTang1992
2020-02-21 05:06:12
perforce使用心得(持續更新中)
fgupupup
2019-08-28 16:00:08
P4編程環境搭建+實現tutorials中basic的案例
我爱学习hh
2019-07-06 10:56:49
軟件目錄結構規範
leiwenbin627
2018-11-22 02:20:45
json和pickle數據序列化和反序列化
leiwenbin627
2018-11-22 02:20:45
內置函數
leiwenbin627
2018-11-12 02:46:10
生成器&迭代器
leiwenbin627
2018-11-10 02:16:14
裝飾器
leiwenbin627
2018-11-04 02:43:40
編輯器練習
leiwenbin627
2018-11-03 02:46:56
P4 behavioral-model: BMv2
iteye_5484
2018-09-17 07:56:11