尝试使用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. kail ip配置

    设置ip /etc/network/interfaces # This file describes the network interfaces available on your system # ...

  2. 一、HTML和CSS基础--网页布局--实践--导航条菜单的制作

    案例一:导航菜单的制作 垂直菜单

  3. php 克隆和引用类

    /*class Ren { public $name; public $sex; function __construct($n,$s) { $this->name=$n; $this-> ...

  4. js prototype

    1 原型法设计模式 在.Net中可以使用clone()来实现原型法 原型法的主要思想是,现在有1个类A,我想要创建一个类B,这个类是以A为原型的,并且能进行扩展.我们称B的原型为A. 2 javasc ...

  5. 【Linux工具】GIT+Gollum在Ubuntu下搭建本地WIKI编辑系统

    1 设置淘宝的gem镜像 1.1 不用镜像的痛苦 如果直接用官网的话,会有如下的错误信息,添加源.安装gem都是一样的错误,就算能连上也会很慢: $ gem sources -a https://ru ...

  6. Struts2的@ResultPath

    转自:http://blog.csdn.net/yandufeng/article/details/8105495 这里我要补充一下:要理解Annotation,最好的方法还是看源码,struts中c ...

  7. 使用SQL Server维护计划实现数据库定时自动备份

    在SQL Server中出于数据安全的考虑,所以需要定期的备份数据库.而备份数据库一般又是在凌晨时间基本没有数据库操作的时候进行,所以我们不可能要求管理员每天守到晚上1点去备份数据库.要实现数据库的定 ...

  8. 【转】apache kafka技术分享系列(目录索引)

    转自:  http://blog.csdn.net/lizhitao/article/details/39499283   估计大神会不定期更新,所以还是访问这个链接看最新的目录list比较好 apa ...

  9. Linux常用命令_(系统管理)

    用户管理:useradd.passwd.userdel用户组管理:groupadd.groupdel.gpasswd系统信息:uname.who.whoami.id登录注销:login.logout. ...

  10. 2016.6.17 kali Linux 隧道工具

    隧道工具的基本概念: 1.在计算机网络中,隧道工具是指使用一种网络协议去封装另一种网络协议的技术. 2.通常用来数据伪装或者穿越防火墙,在入侵目标系统后,可用来提升权限和权限维持. Kali中的隧道工 ...