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. cocos2d-x中的init,onEnter,onExit......

    CCNode的init()方法和onEnter()方法: 一.调用顺序显示FirstScene时: FirstLayer::initFirstLayer::onEnterFirstLayer::onE ...

  2. eclipse 导入tomcat7源码

    导入tomcat的源码其实说简单也不简单,说不简单也简单,主要还是环境问题,中间花费了我很多时间,网上找了很多都没什么用,参考一些文章,然后自己慢慢摸索出来的. 环境:(1)jdk:jdk1.6.0_ ...

  3. <密码的实现>输入密码的时候,显示“*”,而不是显示输入内容

    一开始还以为用C语言和C++不能实现输入密码的时候显示出“*”而不显示输入的内容呢!没想到偶然的机会试出了用while循环结构可以实现.以下是我整理的C语言和C++的代码,供初学者参考. 这是C语言实 ...

  4. PowerCmd(命令行增强工具) 2.2 免费版

    软件名称: PowerCmd(命令行增强工具) 2.2 免费版 软件语言: 英文 授权方式: 免费软件 运行环境: Win7 / Vista / Win2003 / WinXP 软件大小: 1.8MB ...

  5. 1张图看懂RAID功能,6张图教会配置服务器【转】

    RAID 包含一组或者一个集合甚至一个阵列.使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集.将至少两个磁盘连接到一个 RAID 控制器,而成为一个逻辑卷,也可以将多个驱动器放在一个组中.一 ...

  6. [linux]查看机器有几个cpu,是否支持64位

    1. 查看物理CPU的个数#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l 2. 查看逻辑CPU的个数#cat /pr ...

  7. Linux kernel Vhost-net 和 Virtio-net代码详解

    场景 Host上运行qemu kvm虚拟机,其中虚拟机的网卡类型为virtio-net,而Host上virtio-net backend使用vhost-net 数据包进入虚拟机代码分析 首先看vhos ...

  8. typeof使用笔记

    typeof操作符返回一个字符串,表示未经计算的操作数的类型 以下是可能值的列表 类型      结果 Undefined   "undefined" Null  "nu ...

  9. 分布式版本控制系统Git-----3.图形化Tortoisegit创建本地库并且提交到远程服务器上

    [前提你已经有了自己的远程仓库帐号密码和HTTP地址] PS:图形化会方便,但是个人认为还是敲命令比较好,会锻炼人的思维和逻辑. 1.首先在任意一个地方创建test目录.若要把test目录放在Git的 ...

  10. HDU 5867 Water problem

    处理出1-99的,之后的加上多少hundred和and即可.整百和一千的时候注意一下. #pragma comment(linker, "/STACK:1024000000,10240000 ...