Megaflow is an OpenVSwitch (OVS) feature than enables us to install flows for which some fields are wildcarded (the input port field is never wildcarded, as a totally wildcarded flow would be of little use). We do this by providing OVS with a flow mask upon creating a new flow. A mask is comprised of a subset of the flow's keys, where each field is either 0 or ~0, respectively specifying a wildcard or an exact match; the absence of a mask key is considered a total wildcard of all the fields in the flow's corresponding key.

We calculate the mask of a flow by keeping track throughout the simulation of which fields have contributed to that outcome and which have not. This last set of fields can be wildcarded while the previous requires an exact match. A field is considered seen, and thus an exact match in the flow mask, when we call the respective getter in the FlowMatch class. The mask is calculated by the FlowMask class and is triggered by the Flow class, before we serialize it to the datapath.

We don't store the flow mask in user space: flow deletion is done by specifying the flow's specific keys. The OVS module will apply all the masks it knows about to the specified flow and will remove all flows that match the result. This is also how flow lookup is performed. Note that the onus is on us to ensure we don't create overlapping, conflicting wildcarded flows: no guarantees are given as to which flow gets picked when different ones match an incoming packet.

We detect the version of the underlying OVS kernel module and suppress flow masks if megaflow is not supported.

[Mark] openvswitch megaflow的更多相关文章

  1. Openvswitch原理与代码分析(4):网络包的处理过程

      在上一节提到,Openvswitch的内核模块openvswitch.ko会在网卡上注册一个函数netdev_frame_hook,每当有网络包到达网卡的时候,这个函数就会被调用.   stati ...

  2. Openvswitch手册(1): 架构,SSL, Manager, Bridge

    Openvswitch是一个virutal swtich, 支持Open Flow协议,当然也有一些硬件Switch也支持Open Flow协议,他们都可以被统一的Controller管理,从而实现物 ...

  3. OpenvSwitch/OpenFlow 架构解析与实践案例

    目录 文章目录 目录 前言 软件定义网络(SDN) 虚拟交换机(vSwitch) 为什么说云计算时代的 SDN 非常重要 OpenFlow 简介 Open vSwitch Open vSwitch 的 ...

  4. java.io.IOException: mark/reset not supported

    java.io.IOException: mark/reset not supported at java.io.InputStream.reset(InputStream.java:348) at ...

  5. [mark] 使用Sublime Text 2时如何将Tab配置为4个空格

    在Mac OS X系统下,Sublime Text是一款比较赞的编辑器. 作为空格党的自觉,今天mark一下使用Sublime Text 2时如何将Tab配置为4个空格: 方法来自以下两个链接: ht ...

  6. 特邀美国EMC实战专家Mark来华授课

    “轻松搞定EMC-PCB和系统设计”课程介绍 本次课程特邀美国EMC领域权威专家Mark Montrose主讲,将涵盖满足产品电磁兼容性和信号完整性的基本原理.课程涉及多个领域,不仅仅针对PCB设计, ...

  7. 如何撤销 PhpStorm/Clion 等 JetBrains 产品的 “Mark as Plain Text” 操作 ?

    当把某个文件“Mark as Plain Text”时,该文件被当做普通文本,就不会有“代码自动完成提示”功能,如下图所示: 但是呢,右键菜单中貌似没有 相应的撤销 操作, 即使是把它删除,再新建一个 ...

  8. 使用openvswitch 和dnsmasq来实现虚拟机网络隔离

    openvswicth : 开源的网络虚拟化软件,可以划分vlan隔离虚拟机,做流量控制 dnsmasq:小心的dns,dhcp服务器 安装openvswicth wget  http://openv ...

  9. vim - mark

    Using markshttp://vim.wikia.com/wiki/Using_marks1. There is no visible indication of where marks are ...

随机推荐

  1. Apache 2.4.16、PHP5.6.11安装教程

    以前我写过Apache2.4和php5.5的安装教程,但是后来我自己跟着自己写的东西做时发现有很多问题,这里把这些问题重新修正,再写一个教程,供大家参考. 注意:WinXP系统请选择旧版本Apache ...

  2. html-----vedio标签(HTML5新标签VIDEO在IOS上默认全屏播放)

    今天做一个app时发现一个问题,应用html5中的video标签加载视频,在Android手机上默认播放大小,但是换成iPhone手机上出问题了,默认弹出全屏播放,查找了好多论坛,都没有谈论这个的.然 ...

  3. .net后台代码临时表创建

    写法一: var dt = new DataTable(); dt.Columns.Add(new DataColumn("Id", System.Type.GetType(&qu ...

  4. 李明杰的视频和李明杰的博客是学习OC的基础

    http://www.cocoachina.com/bbs/read.php?tid=196664

  5. CentOS安装glibc-2.14,错误安装libc.so.6丢失急救办法

    CentOS安装glibc-2.14,错误安装libc.so.6丢失急救办法   到http://ftp.gnu.org/gnu/glibc/下载glibc-2.14.tar.xz tar glibc ...

  6. 安装Postgresql踩过的坑

    PG安装相关的 1  系统语言的设置 PG的安装,和系统的locale设置有一定的关系,需要设置,如在.profile或.bashrc中 也可以运行下面的命令: dpkg-reconfigure lo ...

  7. 【转】MapReduce的优化

    相信每个程序员在编程时都会问自己两个问题“我如何完成这个任务”,以及“怎么能让程序运行得更快”.同样,MapReduce计算模型的多次优化也是为了更好地解答这两个问题. MapReduce计算模型的优 ...

  8. linux安装包资源库

    最近发现了一个很不错的linux的rpm资源库,可以在里面找到rpm安装过程中缺失的资源! 网址:http://pkgs.org/

  9. Linux性能监测:CPU篇(转)

    http://os.51cto.com/art/201012/239880.htm CPU 的占用主要取决于什么样的资源正在 CPU 上面运行,比如拷贝一个文件通常占用较少 CPU,因为大部分工作是由 ...

  10. display:inline-block和float:left的选择

    参考文章: http://www.zhangxinxu.com/wordpress/2010/11/%E6%8B%9C%E6%8B%9C%E4%BA%86%E6%B5%AE%E5%8A%A8%E5%B ...