zoukankan      html  css  js  c++  java
  • P4安装

    P4安装篇

    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/
    
  • 相关阅读:
    bzoj2763: [JLOI2011]飞行路线(分层图spfa)
    8.20noip模拟题
    8.19noip模拟题
    1046: [HAOI2007]上升序列(dp)
    bzoj1079: [SCOI2008]着色方案(dp)
    逆序对
    P1966 火柴排队(逆序对)
    NOIP 2015 DAY2
    8.15学校模拟
    差分
  • 原文地址:https://www.cnblogs.com/wpqwpq/p/5928383.html
Copyright © 2011-2022 走看看