尝试使用bmv2行为模型来跑p4实例。

原文说明:

We have released a new version of the behavioral model, written in C++. Some targets already support this new model -in addition to the original version, p4c-behavioral. If you see a target with a bmv2 directory, it means the new model is supported and you can try it out!

The new model splits the switch logic and the auto-generated PD API (drivers) into 2 different processes.

执行

打开三个终端,A,B,C。

A终端进入p4factory/targets/l2_switch/bmv2,模拟数据平面,执行如下命令:

make bm

./run_bm.sh  #to start the data plane

结果:

Adding interface veth0 as port 0
Adding interface veth2 as port 1
Adding interface veth4 as port 2
Adding interface veth6 as port 3
Adding interface veth8 as port 4
Adding interface veth10 as port 5
Adding interface veth12 as port 6
Adding interface veth14 as port 7
Adding interface veth16 as port 8
Thrift server was started

B终端进入p4factory/targets/l2_switch/bmv2,打开PD APIs(RPC服务器),执行如下命令:

sudo ./drivers  #in a second terminal, to start the PD APIs (RPC server)

结果:

Starting RPC server on port 9090

C终端进入l2_switch目录,跑实例:

sudo python run_tests.py --test-dir tests/ptf-tests/

结果:

WARNING: No route found for IPv6 destination :: (no default route?)
l2_switch.SimpleReplicationTest ... ok ----------------------------------------------------------------------
Ran 1 test in 0.813s OK

返回终端B,得到结果:

Adding Thrift service for P4 program l2_switch to server
In client_init
In clean_all
In smac_set_default_action_mac_learn
In dmac_set_default_action_broadcast
In mcast_src_pruning_set_default_action__nop
In mc_mgrp_create
In mc_node_create
In mc_associate_node
In mcast_src_pruning_table_add_with__drop
Received learning notification
I received 1 samples

2016/10/14

P4factory <Towards a better behavioral model: bmv2>的更多相关文章

  1. P4factory <Integration with Mininet>

    在终端A进入simple_router目录,make bm之后,执行 ./run_demo.bash 成功和Mininet进行协作: *** Creating network *** Adding h ...

  2. P4factory ReadMe 剩余部分

    Building and Running a Target Each P4 program (called a 'target') is set up in a directory under tar ...

  3. 基于OpenDaylight和Mininet的试验床平台搭建

    ##########################################平台架构######################################### 一.虚拟机安装和镜像加载 ...

  4. mininet + opendaylight环境配置

    环境配置 ubuntu18.04 镜像 mininet2.2.2 apt-get install mininet 但这种安装只是TLS版本的mininet,与最新版本在功能上有所差距. 控制器(ope ...

  5. 在 Laravel 中使用图片处理库 Integration/Image

    系统需求 PHP >= 5.3 Fileinfo Extension GD Library (>=2.0) … or … Imagick PHP extension (>=6.5.7 ...

  6. 按照Enterprise Integration Pattern搭建服务系统

    在前一篇文章中,我们已经对Enterprise Integration Pattern中所包含的各个组成进行了简单地介绍.限于篇幅(20页Word以内),我并没有深入地讨论各个组成.但是如果要真正地按 ...

  7. Enterprise Integration Pattern - 组成简介

    近些年来,越来越多的Web应用正在逐渐向大型化的方向发展.它们通常都会包含一系列相互协作的子服务.在开发过程中,如何让这些子服务协同工作常常是软件开发人员所最为头疼的问题,如各个子服务之间的数据表示不 ...

  8. Spring 4 + Quartz 2.2.1 Scheduler Integration Example

    In this post we will see how to schedule Jobs using Quartz Scheduler with Spring. Spring provides co ...

  9. mininet中iperf sever自动退出

    使用iperf 在mininet进行吞吐量测试是常用的方法,之前结束iperf server的方法是运行os.system('pkill iperf')命令. 但是这种方式iperf server有可 ...

  10. OpenCASCADE Gauss Integration

    OpenCASCADE Gauss Integration eryar@163.com Abstract. Numerical integration is the approximate compu ...

随机推荐

  1. ASP.NET之AreaRegistration

    ASP.NETMVC的AreaRegistration是用来干什么呢? 它是用来提供一个很好的接口让我们可以将Controller定义在其他的Library项目中,这主要可以用来解决模块化开发:一般情 ...

  2. 【Android 进阶】临时卸载root和恢复root功能

    [前言]为什么有这个需求? Q:首先,谈谈为啥想要root呢? A:有root才能有控制权,也才能折腾很多东西,比如:删删流氓软件,用用代理.软件自动安装等: Q:然后,那么为何又需要删除root呢? ...

  3. django默认开事务的麻烦事

    最近DBA发现总是有大事务报警,最终排查到是因为django默认在查询之前执行了 set autocommit=0 原来,mysql如果开了set autocommit=0,那么所有的语句一定是在一个 ...

  4. php怎么判断网页是电脑访问还是手机访问

    .第一种方法 <?php  function check_wap() {       ) {           ;$i<count($list);$i++){         ){    ...

  5. hdu 4003 树形dp+分组背包 2011大连赛区网络赛C

    题意:求K个机器人从同一点出发,遍历所有点所需的最小花费 链接:点我 Sample Input 3 1 1 //3个点,从1出发,1个机器人 1 2 1 1 3 1 3 1 2 1 2 1 1 3 1 ...

  6. jdbc、事务(Transaction)、批处理 回顾

    论文写的头疼,回顾一下jdbc,换换脑子 传统的写法: 1.加载驱动类 class.forname("jdbc类的包结构"); 2.获得连接 Connection conn=Dri ...

  7. [MySQL]安装和启动

    一 MySQL简介 1)MySQL MySQL是MySQL AB公司的数据库管理系统软件,是最流行的开源(Open Source,开放源代码)的关系型数据库管理系统. 2) MySQL具有以下主要特点 ...

  8. Xamarin Android提示内存溢出错误

    Xamarin Android提示内存溢出错误 错误信息:java.lang.OutOfMemoryError, Consider increasing the value of $(JavaMaxi ...

  9. ural 1217. Unlucky Tickets

    1217. Unlucky Tickets Time limit: 1.0 secondMemory limit: 64 MB Strange people live in Moscow! Each ...

  10. CodeForces Round 197 Div2

    这次出的题水爆了,借着这个机会终于把CF的号变蓝了.A. Helpful Mathstime limit per test2 secondsmemory limit per test256 megab ...