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. Conversion to Dalvik format failed with error 1(android)

    1.如果不修改android sdk版本,则使用project clean 命令作用于某工程即可. (该处理方式只是在高版本中兼容了低版本工程,未真正意义上的升级) 2.如果修改android sdk ...

  2. 在windows下安装pip scrapy...

    将 C:\Users\用户名\AppData\Local\Programs\Python\Python35\Scripts C:\Users\用户名\AppData\Local\Programs\Py ...

  3. 移动端rem适配问题

    将下面这段代码,放在头部的script标签里,可解决字体适配问题 比例是28px = 1rem function __setFontSize__(){document.documentElement. ...

  4. python操作----Memcached

    Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度.Memcached ...

  5. wordpress建站过程5——footer.php

    footer中写的就只有网站地图,公司信息等等简单东西而已: <?php wp_footer(); ?> <div class="footer"> < ...

  6. if和switch的原理

    在C语言中,if和switch是条件分支的重要组成部分.if的功能是计算判断条件的值,根据返回的值的不同来决定跳转到哪个部分.值为真则跳转到if语句块中,否则跳过if语句块.下面来分析一个简单的if实 ...

  7. JavaScript input框输入实时校验

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  8. zoj 1718 poj 2031 Building a Space Station

    最小生成树,用了Kruskal算法.POJ上C++能过,G++不能过... 算出每两个圆心之间的距离,如果距离小于两半径之和,那么这两个圆心之间的距离直接等于0,否则等于距离-R[i]-R[j]. # ...

  9. hdu1010

    #include <stdio.h>#include <string.h>#include <math.h> int n,m,t;char map[10][10]; ...

  10. html5权威指南:表格元素

    第十一章:表格元素                                                                                           ...