官网:
https://www.dpdk.org/
https://launchpad.net/kolla
PCI 设备
[查看和列出PCI设备。]
lspci
[网卡驱动程序设置特定的参数]
modprobe xxxx
[查看是否正常运行]
ifconfig
内存 设备
64位Linux通常使用48位来表示虚拟地址空间,43位表示物理地址。
#uname -m
,然后按回车。如果输出是x86_64,那么你的系统就是64位的。如果输出是i386或者i686,那么你的系统是32位的。
用户空间和内核空间被划分为两个空间,每个空间最大支持256TB。
可以通过cat /proc/cpuinfo和cat /proc/meminfo来查看处理器和内存的信息。
CPU亲和性
在多核心CPU中,每个CPU都有自己的缓存和寄存器。为了更好地利用这些硬件资源,可以将特定进程绑定到特定的CPU上,这个过程被称为CPU亲和性设置。
可以使用 taskset
命令来实现CPU亲和性设置。
RDMA内核驱动程序
mlx4_ib、mlx5_ib或mana_ib
modprobe uio_pci_generic
modprobe igb_uio
确保IOMMU已禁用或已设置为passthrough模式。
cat /sys/class/iommu_group/iommu_group*/devices/iommu_group*/uevent
如果输出中包含"enabled",则表示IOMMU已启用。
[禁用]
echo "disabled" | sudo tee /sys/bus/platform/drivers/iommu_v2/control
[如果需要将IOMMU设置为passthrough模式,可以使用以下命令:]
echo "passthrough" | sudo tee /sys/bus/platform/drivers/iommu_v2/mode
C malloc 分配内存
#include <stdlib.h>
// 分配一个足够大的缓冲区来存储数据包
char *buffer = (char *)malloc(desired_packet_size);
if (buffer == NULL) {
// 处理内存分配失败的情况
}
mmap 分配内存
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
// 打开一个文件描述符或设备文件
int fd = open("/path/to/file", O_RDWR);
if (fd == -1) {
// 处理文件打开失败的情况
}
// 映射文件到内存中
void *buffer = mmap(NULL, desired_packet_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (buffer == MAP_FAILED) {
// 处理内存映射失败的情况
}
DPDK介绍
DPDK(Data Plane Development Kit):
是一组快速处理数据包的开发平台及接口。有intel主导开发,主要基于Linux系统,用于快速数据包处理的函数库与驱动集合,可以极大提高数据处理性能和吞吐量,提高数据平面应用程序的工作效率。
DPDK的作用:
在数据平面应用中为快速处理数据包提供一个简单而完善的架构。在理解此工具集之后,开发人员可以以此为基础进行新的原型设计处理大并发网络数据请求。
当前数据包的处理流程是这样:
数据包到达网卡,网卡发送中断通知CPU,CPU将数据包拷贝到内核空间中,应用程序从内核空间中拷贝数据到用户态空间,数据处理。
在这个过程中数据包处理耗时的操作有:
- 网卡每次收到数据都发送中断,打断cpu的工作。切换和恢复过程都耗时
- 网络数据包经过TCP/IP协议栈,达到真正的应用处理程序时走过很多的流程
- 应用程序拿到网络数据时需要经过内核空间到用户态空间的一次copy,增加耗时
dpdk解决问题办法:
- DPDK技术是重载网卡驱动,直接将数据传递给用户态的应用程序,避免了中间环节的经过TCP/IP协议栈,内核空间到用户空间的copy。
- 同时针对第一点网卡频繁的中断,应用程序可以使用轮询的方式获取网卡上的数据,避免中断造成的场景切换和恢复浪费的时间。
ovs-dpdk
普通ovs
ovs的架构图:
ovs处理流表的过程是:
1.ovs的datapath接收到从ovs连接的某个网络设备发来的数据包,从数据包中提取源/目的IP、源/目的MAC、端口等信息。
2.ovs在内核状态下查看流表结构(通过Hash),观察是否有缓存的信息可用于转发这个数据包。
3.内核不知道如何处置这个数据包会将其发送给用户态的ovs-vswitchd。
4.ovs-vswitchd进程接收到upcall后,将检查数据库以查询数据包的目的端口是哪里,然后告诉内核应该将数据包转发到哪个端口,例如eth0。
5.内核执行用户此前设置的动作。即内核将数据包转发给端口eth0,进而数据被发送出去。
ovs-dpdk
DPDK加速的OVS与原始OVS的区别在于,从OVS连接的某个网络端口接收到的报文不需要openvswitch.ko内核态的处理,报文通过DPDK PMD驱动直接到达用户态ovs-vswitchd里。
DPDK加速的OVS数据流转发的大致流程如下:
1.OVS的ovs-vswitchd接收到从OVS连接的某个网络端口发来的数据包,从数据包中提取源/目的IP、源/目的MAC、端口等信息。
2.OVS在用户态查看精确流表和模糊流表,如果命中,则直接转发。
3.如果还不命中,在SDN控制器接入的情况下,经过OpenFlow协议,通告给控制器,由控制器处理。
4.控制器下发新的流表,该数据包重新发起选路,匹配;报文转发,结束。
总结
主要区别在于流表的处理。普通ovs流表转发在内核态,而ovs-dpdk流表转发在用户态。
编译工具安装
apt-get update
apt install automake libtool build-essential openssl -y
apt install desktop-file-utils groff graphviz -y
apt install checkpolicy python-sphinx python-twisted-core -y
编译安装dpdk
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-16.11.tar.gz
mkdir -p /usr/src/dpdk
解压并进入目录
make config T=x86_64-native-linuxapp-gcc
make install T=x86_64-native-linuxapp-gcc DESTDIR=/usr/src/dpdk
make install T=x86_64-native-linuxapp-gcc DESTDIR=/usr
编译安装ovs
wget http://openvswitch.org/releases/openvswitch-2.7.0.tar.gz
解压并进入目录
./boot.sh
./configure \
--with-dpdk=/usr/src/dpdk \
--prefix=/usr \
--exec-prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
make install
系统设置
vim /boot/grub2/grub.cfg
找到引导的相应内核参数,在后面添加:iommu=pt intel_iommu=on
linux /vmlinuz-4.4.0-142-generic root=/dev/mapper/ubuntu–vg-root ro recovery nomodeset iommu=pt intel_iommu=on
重启生效
设置dpdk驱动
modprobe uio_pci_generic
dpdk-devbind --bind=uio_pci_generic enp1s0f0
dpdk-devbind --bind=uio_pci_generic enp1s0f1
配置大页
查看当前的hugepage
grep HugePages_ /proc/meminfo
修改hugepage的页数为1024
临时设置大页的方法,重启失效:
echo 1024 > /proc/sys/vm/nr_hugepages
配置保存的设置方法,重启生效:
echo 'vm.nr_hugepages=1024' > /etc/sysctl.d/hugepages.conf
挂载hugepages
mount -t hugetlbfs none /dev/hugepages
启动ovs进程
准备ovs相关路径
mkdir -p /etc/openvswitch
mkdir -p /var/run/openvswitch
删除旧的ovs配置数据和创建新的(可选)
如果不需要旧配置时,可以选择该操作
rm /etc/openvswitch/conf.db
ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema
启动ovsdb server
ovsdb-server /etc/openvswitch/conf.db \
-vconsole:emer -vsyslog:err -vfile:info \
--remote=punix:/var/run/openvswitch/db.sock \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir \
--log-file=/var/log/openvswitch/ovsdb-server.log \
--pidfile=/var/run/openvswitch/ovsdb-server.pid \
--detach --monitor
第一次启动ovs需要初始化
ovs-vsctl --no-wait init
初始化dpdk
从ovs-v2.7.0开始,开启dpdk功能已不是vswitchd进程启动时指定–dpdk等参数了,而是通过设置ovsdb来开启dpdk功能
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
自定义一些dpdk的参数(可选)
指定的sockets从hugepages预先分配的内存
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
指定在某些core上运行
ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x02
查看自定义的dpdk参数
ovs-vsctl get Open_vSwitch . other_config:dpdk-socket-mem
ovs-vsctl get Open_vSwitch . other_config:pmd-cpu-mask
ovs-vsctl get Open_vSwitch . other_config:dpdk-init
启动是vswitchd进程
ovs-vswitchd unix:/var/run/openvswitch/db.sock \
-vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir \
--log-file=/var/log/openvswitch/ovs-vswitchd.log \
--pidfile=/var/run/openvswitch/ovs-vswitchd.pid \
--detach --monitor
ovs工具使用
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
ovs-vsctl show
把dpdk端口加入网桥
先使用dpdk-devbind命令查看当前已绑定的dpdk网卡,并记住相应的PCI地址
dpdk-devbind --status
ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=0000:01:00.0
ovs-vsctl add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=0000:01:00.1
完成分割线
到这里就安装完成了,并且两台主机之间可以直接转发数据。
测速
在两主机之间使用iperf工具测速,服务端收集到的测速信息如下:
两主机之间是1000Mb的带宽
iperf -s
{
"Controller": {
"01f2e1b6-22d3-4ecd-ac00-4731a204d96b": {
"controller_rate_limit": 100,
"target": "tcp:127.0.0.1:6633",
"controller_burst_limit": 25,
"inactivity_probe": 10000
},
"e1b9baf9-a21c-400b-82ad-df886a7b9db0": {
"target": "tcp:127.0.0.1:6633",
"inactivity_probe": 10000
},
"aab7bf24-2e9d-458a-9031-9809a8341a05": {
"target": "tcp:127.0.0.1:6633",
"inactivity_probe": 10000
}
},
"Port": {
"b093bc1e-4f3f-46dd-b01b-50092404f80b": {
"name": "breth1-ovs",
"interfaces": ["uuid", "e9fd02bd-acd5-4611-ae29-559f6fae5283"]
},
"ac768e11-5af1-4371-8c88-ce1b978cb4df": {
"name": "qr-18caa21d-07",
"interfaces": ["uuid", "b8b36f9b-a283-4919-92d2-c9064574213f"],
"other_config": ["map", [
["net_uuid", "7ddf11f2-1d6f-4ee2-9cca-14e9c9fdc5bf"],
["network_type", "vxlan"],
["physical_network", "None"],
["segmentation_id", "331"],
["tag", "1"]
]],
"tag": 1
},
"7a2e64af-9dfd-4a8f-8d77-d85cb598433b": {
"name": "phy-breth1-ovs",
"interfaces": ["uuid", "99e1d1d4-fd8e-46c9-ad8e-7324b3cd901e"]
},
"ee7f3f94-f6a0-4ac6-a7a9-40a0f221795e": {
"name": "patch-tun",
"interfaces": ["uuid", "c903f54a-5da0-4696-82ff-0de359f02fda"],
"other_config": ["map", [
["mcast-snooping-flood", "False"],
["mcast-snooping-flood-reports", "False"]
]]
},
"7eafa0c1-0063-47d1-9fad-1f654c304e7f": {
"name": "sg-6b2e11b3-bd",
"interfaces": ["uuid", "a563a62c-8042-4afa-a5ef-61347f9f2bad"],
"other_config": ["map", [
["net_uuid", "7ddf11f2-1d6f-4ee2-9cca-14e9c9fdc5bf"],
["network_type", "vxlan"],
["physical_network", "None"],
["segmentation_id", "331"],
["tag", "1"]
]],
"tag": 1
},
"21e4dbcd-cf52-4a82-a543-4f85b7f7d411": {
"name": "br-int",
"interfaces": ["uuid", "f9917f1d-7027-40e4-8ce8-40f7dc3dc9d2"]
},
"dd41c7d8-862e-4942-8477-d86fc6fee3fc": {
"name": "patch-int",
"interfaces": ["uuid", "89916fea-640e-4277-ae69-cfc536725df2"]
},
"73f4152b-e4a5-4ad1-9d30-cdb626b797a6": {
"name": "vxlan-0a02160f",
"interfaces": ["uuid", "0b72ac6e-aaf9-4244-9e30-950f00a7aeb0"]
},
"510d9767-64d1-4d09-acbe-71da9248aab2": {
"name": "qg-5a2b4fe0-42",
"interfaces": ["uuid", "b2829fbf-c858-4c98-9435-bb41bf7521da"],
"other_config": ["map", [
["net_uuid", "9fb4f4b5-dde1-49d3-8cf0-bde94d73766a"],
["network_type", "vlan"],
["physical_network", "physnet1"],
["segmentation_id", "1050"],
["tag", "8"]
]],
"tag": 8
},
"56ef9fe0-5db4-48dd-8613-242a2a048e01": {
"name": "int-breth1-ovs",
"interfaces": ["uuid", "30219843-d7b3-4d5f-942c-8451bec23753"],
"other_config": ["map", [
["mcast-snooping-flood", "False"],
["mcast-snooping-flood-reports", "False"]
]]
},
"b4afca09-17ee-41ef-92c6-509b15e465ec": {
"name": "p-breth1-ovs",
"interfaces": ["uuid", "07ce3bd9-39b9-436f-95fe-0460b0f42fbf"]
},
"986a6801-a31a-4a70-b7c6-9ccb19c25caa": {
"name": "br-tun",
"interfaces": ["uuid", "fbd00d6d-2f65-42de-a410-4e687e80f6d8"]
},
"c0b64264-b5bd-4688-84b5-bd115b4e9879": {
"name": "tap4bb9102a-8c",
"interfaces": ["uuid", "7cd88035-5073-4e72-9c5d-e875d0d3b81a"],
"other_config": ["map", [
["net_uuid", "7ddf11f2-1d6f-4ee2-9cca-14e9c9fdc5bf"],
["network_type", "vxlan"],
["physical_network", "None"],
["segmentation_id", "331"],
["tag", "1"]
]],
"tag": 1
},
"2acbdb5c-5339-46ae-8695-4a2f0f1d743e": {
"name": "fg-9cef45e9-86",
"interfaces": ["uuid", "81a04c7e-0d97-4d53-8148-c9987f094545"],
"other_config": ["map", [
["net_uuid", "9fb4f4b5-dde1-49d3-8cf0-bde94d73766a"],
["network_type", "vlan"],
["physical_network", "physnet1"],
["segmentation_id", "1050"],
["tag", "8"]
]],
"tag": 8
}
},
"Bridge": {
"684ee13d-c097-4b5c-86f4-b54af9791283": {
"name": "br-int",
"datapath_type": "system",
"controller": ["uuid", "01f2e1b6-22d3-4ecd-ac00-4731a204d96b"],
"other_config": ["map", [
["disable-in-band", "true"],
["mac-table-size", "50000"],
["mcast-snooping-disable-flood-unregistered", "false"]
]],
"ports": ["set", [
["uuid", "21e4dbcd-cf52-4a82-a543-4f85b7f7d411"],
["uuid", "2acbdb5c-5339-46ae-8695-4a2f0f1d743e"],
["uuid", "510d9767-64d1-4d09-acbe-71da9248aab2"],
["uuid", "56ef9fe0-5db4-48dd-8613-242a2a048e01"],
["uuid", "7eafa0c1-0063-47d1-9fad-1f654c304e7f"],
["uuid", "ac768e11-5af1-4371-8c88-ce1b978cb4df"],
["uuid", "c0b64264-b5bd-4688-84b5-bd115b4e9879"],
["uuid", "ee7f3f94-f6a0-4ac6-a7a9-40a0f221795e"]
]],
"fail_mode": "secure",
"datapath_version": "<unknown>",
"protocols": ["set", ["OpenFlow10", "OpenFlow13", "OpenFlow14"]]
},
"62fd99e7-0ef2-4dd0-b9d8-8e0a88842eff": {
"name": "br-tun",
"datapath_type": "system",
"controller": ["uuid", "aab7bf24-2e9d-458a-9031-9809a8341a05"],
"other_config": ["map", [
["disable-in-band", "true"],
["mac-table-size", "50000"]
]],
"ports": ["set", [
["uuid", "73f4152b-e4a5-4ad1-9d30-cdb626b797a6"],
["uuid", "986a6801-a31a-4a70-b7c6-9ccb19c25caa"],
["uuid", "dd41c7d8-862e-4942-8477-d86fc6fee3fc"]
]],
"fail_mode": "secure",
"datapath_version": "<unknown>",
"protocols": ["set", ["OpenFlow10", "OpenFlow13", "OpenFlow14"]]
},
"d6523e88-917f-462c-b761-154342d55c50": {
"name": "breth1-ovs",
"datapath_type": "system",
"controller": ["uuid", "e1b9baf9-a21c-400b-82ad-df886a7b9db0"],
"other_config": ["map", [
["disable-in-band", "true"],
["mac-table-size", "50000"]
]],
"ports": ["set", [
["uuid", "7a2e64af-9dfd-4a8f-8d77-d85cb598433b"],
["uuid", "b093bc1e-4f3f-46dd-b01b-50092404f80b"],
["uuid", "b4afca09-17ee-41ef-92c6-509b15e465ec"]
]],
"fail_mode": "secure",
"datapath_version": "<unknown>",
"protocols": ["set", ["OpenFlow10", "OpenFlow13", "OpenFlow14"]]
}
},
"Open_vSwitch": {
"ab2f32d8-542f-42eb-a4a2-a74740baeb91": {
"manager_options": ["uuid", "85629f36-8cbd-4c10-b9ad-47af1fc46521"],
"bridges": ["set", [
["uuid", "62fd99e7-0ef2-4dd0-b9d8-8e0a88842eff"],
["uuid", "684ee13d-c097-4b5c-86f4-b54af9791283"],
["uuid", "d6523e88-917f-462c-b761-154342d55c50"]
]],
"dpdk_version": "none",
"cur_cfg": 117,
"external_ids": ["map", [
["system-id", "con01"]
]],
"next_cfg": 117,
"datapath_types": ["set", ["netdev", "system"]],
"iface_types": ["set", ["bareudp", "erspan", "geneve", "gre", "gtpu", "internal", "ip6erspan", "ip6gre", "lisp", "patch", "stt", "system", "tap", "vxlan"]]
}
},
"_comment": "compacting database online",
"_is_diff": true,
"Interface": {
"e9fd02bd-acd5-4611-ae29-559f6fae5283": {
"name": "breth1-ovs",
"ofport": 65534,
"type": "internal"
},
"c903f54a-5da0-4696-82ff-0de359f02fda": {
"name": "patch-tun",
"ofport": 2,
"options": ["map", [
["peer", "patch-int"]
]],
"type": "patch"
},
"07ce3bd9-39b9-436f-95fe-0460b0f42fbf": {
"name": "p-breth1-ovs",
"ofport": 1
},
"a563a62c-8042-4afa-a5ef-61347f9f2bad": {
"name": "sg-6b2e11b3-bd",
"ofport": 23,
"external_ids": ["map", [
["attached-mac", "fa:16:3e:d9:bb:16"],
["iface-id", "6b2e11b3-bd1a-42ff-851a-050b1b28f146"],
["iface-status", "active"]
]],
"type": "internal"
},
"0b72ac6e-aaf9-4244-9e30-950f00a7aeb0": {
"name": "vxlan-0a02160f",
"ofport": 2,
"options": ["map", [
["df_default", "true"],
["egress_pkt_mark", "0"],
["in_key", "flow"],
["local_ip", "10.2.22.11"],
["out_key", "flow"],
["remote_ip", "10.2.22.15"]
]],
"type": "vxlan"
},
"fbd00d6d-2f65-42de-a410-4e687e80f6d8": {
"name": "br-tun",
"ofport": 65534,
"type": "internal"
},
"89916fea-640e-4277-ae69-cfc536725df2": {
"name": "patch-int",
"ofport": 1,
"options": ["map", [
["peer", "patch-tun"]
]],
"type": "patch"
},
"b8b36f9b-a283-4919-92d2-c9064574213f": {
"name": "qr-18caa21d-07",
"ofport": 6,
"external_ids": ["map", [
["attached-mac", "fa:16:3e:8e:17:59"],
["iface-id", "18caa21d-0745-45e1-8fff-fac6a546a170"],
["iface-status", "active"]
]],
"type": "internal"
},
"b2829fbf-c858-4c98-9435-bb41bf7521da": {
"name": "qg-5a2b4fe0-42",
"ofport": 24,
"external_ids": ["map", [
["attached-mac", "fa:16:3e:33:96:bc"],
["iface-id", "5a2b4fe0-424a-4eb0-b59d-6c929b08559d"],
["iface-status", "active"]
]],
"type": "internal"
},
"81a04c7e-0d97-4d53-8148-c9987f094545": {
"name": "fg-9cef45e9-86",
"ofport": 22,
"external_ids": ["map", [
["attached-mac", "fa:16:3e:23:43:1a"],
["iface-id", "9cef45e9-86e3-499f-b535-eeb7e40ecc82"],
["iface-status", "active"]
]],
"type": "internal"
},
"f9917f1d-7027-40e4-8ce8-40f7dc3dc9d2": {
"name": "br-int",
"ofport": 65534,
"type": "internal"
},
"99e1d1d4-fd8e-46c9-ad8e-7324b3cd901e": {
"name": "phy-breth1-ovs",
"ofport": 2,
"options": ["map", [
["peer", "int-breth1-ovs"]
]],
"type": "patch"
},
"30219843-d7b3-4d5f-942c-8451bec23753": {
"name": "int-breth1-ovs",
"ofport": 1,
"options": ["map", [
["peer", "phy-breth1-ovs"]
]],
"type": "patch"
},
"7cd88035-5073-4e72-9c5d-e875d0d3b81a": {
"name": "tap4bb9102a-8c",
"ofport": 3,
"external_ids": ["map", [
["attached-mac", "fa:16:3e:24:96:10"],
["iface-id", "4bb9102a-8cef-4455-b2d8-82fe58f3b6c9"],
["iface-status", "active"]
]],
"type": "internal"
}
},
"_date": 1706760511959,
"Manager": {
"85629f36-8cbd-4c10-b9ad-47af1fc46521": {
"target": "ptcp:6640:127.0.0.1",
"inactivity_probe": 10000
}
}
}
{
"cksum": "3781850481 26690",
"name": "Open_vSwitch",
"version": "8.3.0",
"tables": {
"Controller": {
"columns": {
"local_gateway": {
"type": {
"min": 0,
"key": "string"
}
},
"enable_async_messages": {
"type": {
"min": 0,
"key": "boolean"
}
},
"local_netmask": {
"type": {
"min": 0,
"key": "string"
}
},
"type": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["primary", "service"]]
}
}
},
"controller_rate_limit": {
"type": {
"min": 0,
"key": {
"minInteger": 100,
"type": "integer"
}
}
},
"role": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["master", "other", "slave"]]
}
}
},
"max_backoff": {
"type": {
"min": 0,
"key": {
"minInteger": 1000,
"type": "integer"
}
}
},
"inactivity_probe": {
"type": {
"min": 0,
"key": "integer"
}
},
"connection_mode": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["in-band", "out-of-band"]]
}
}
},
"is_connected": {
"ephemeral": true,
"type": "boolean"
},
"status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"controller_burst_limit": {
"type": {
"min": 0,
"key": {
"minInteger": 25,
"type": "integer"
}
}
},
"local_ip": {
"type": {
"min": 0,
"key": "string"
}
},
"controller_queue_size": {
"type": {
"min": 0,
"key": {
"minInteger": 1,
"maxInteger": 512,
"type": "integer"
}
}
},
"target": {
"type": "string"
}
}
},
"Bridge": {
"indexes": [
["name"]
],
"columns": {
"name": {
"mutable": false,
"type": "string"
},
"flood_vlans": {
"type": {
"max": 4096,
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
},
"stp_enable": {
"type": "boolean"
},
"ports": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "uuid",
"refTable": "Port"
}
}
},
"auto_attach": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "AutoAttach"
}
}
},
"fail_mode": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["secure", "standalone"]]
}
}
},
"rstp_enable": {
"type": "boolean"
},
"rstp_status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"flow_tables": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 254,
"type": "integer"
},
"value": {
"type": "uuid",
"refTable": "Flow_Table"
}
}
},
"netflow": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "NetFlow"
}
}
},
"datapath_type": {
"type": "string"
},
"controller": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "uuid",
"refTable": "Controller"
}
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ipfix": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "IPFIX"
}
}
},
"mirrors": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "uuid",
"refTable": "Mirror"
}
}
},
"datapath_id": {
"ephemeral": true,
"type": {
"min": 0,
"key": "string"
}
},
"mcast_snooping_enable": {
"type": "boolean"
},
"protocols": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["OpenFlow10", "OpenFlow11", "OpenFlow12", "OpenFlow13", "OpenFlow14", "OpenFlow15"]]
}
}
},
"sflow": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "sFlow"
}
}
},
"datapath_version": {
"type": "string"
}
}
},
"Queue": {
"isRoot": true,
"columns": {
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"dscp": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 63,
"type": "integer"
}
}
}
}
},
"IPFIX": {
"columns": {
"cache_active_timeout": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4200,
"type": "integer"
}
}
},
"obs_point_id": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"sampling": {
"type": {
"min": 0,
"key": {
"minInteger": 1,
"maxInteger": 4294967295,
"type": "integer"
}
}
},
"targets": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string"
}
},
"obs_domain_id": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
},
"cache_max_flows": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
}
}
},
"NetFlow": {
"columns": {
"active_timeout": {
"type": {
"key": {
"minInteger": -1,
"type": "integer"
}
}
},
"engine_type": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 255,
"type": "integer"
}
}
},
"engine_id": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 255,
"type": "integer"
}
}
},
"add_id_to_interface": {
"type": "boolean"
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"targets": {
"type": {
"max": "unlimited",
"key": "string"
}
}
}
},
"Open_vSwitch": {
"maxRows": 1,
"isRoot": true,
"columns": {
"statistics": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"dpdk_initialized": {
"type": "boolean"
},
"manager_options": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "uuid",
"refTable": "Manager"
}
}
},
"cur_cfg": {
"type": "integer"
},
"dpdk_version": {
"type": {
"min": 0,
"key": "string"
}
},
"next_cfg": {
"type": "integer"
},
"iface_types": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string"
}
},
"datapath_types": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string"
}
},
"db_version": {
"type": {
"min": 0,
"key": "string"
}
},
"system_version": {
"type": {
"min": 0,
"key": "string"
}
},
"bridges": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "uuid",
"refTable": "Bridge"
}
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ovs_version": {
"type": {
"min": 0,
"key": "string"
}
},
"ssl": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "SSL"
}
}
},
"system_type": {
"type": {
"min": 0,
"key": "string"
}
},
"datapaths": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": {
"type": "uuid",
"refTable": "Datapath"
}
}
}
}
},
"CT_Zone": {
"columns": {
"timeout_policy": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "CT_Timeout_Policy"
}
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
}
}
},
"QoS": {
"isRoot": true,
"columns": {
"queues": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
},
"value": {
"type": "uuid",
"refTable": "Queue"
}
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"type": {
"type": "string"
}
}
},
"Datapath": {
"columns": {
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ct_zones": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 65535,
"type": "integer"
},
"value": {
"type": "uuid",
"refTable": "CT_Zone"
}
}
},
"datapath_version": {
"type": "string"
},
"capabilities": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
}
}
},
"SSL": {
"maxRows": 1,
"columns": {
"bootstrap_ca_cert": {
"type": "boolean"
},
"certificate": {
"type": "string"
},
"private_key": {
"type": "string"
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ca_cert": {
"type": "string"
}
}
},
"Port": {
"indexes": [
["name"]
],
"columns": {
"name": {
"mutable": false,
"type": "string"
},
"bond_downdelay": {
"type": "integer"
},
"statistics": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "integer"
}
},
"protected": {
"type": "boolean"
},
"fake_bridge": {
"type": "boolean"
},
"mac": {
"type": {
"min": 0,
"key": "string"
}
},
"trunks": {
"type": {
"max": 4096,
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
},
"rstp_status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"tag": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
},
"cvlans": {
"type": {
"max": 4096,
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
},
"bond_updelay": {
"type": "integer"
},
"bond_active_slave": {
"type": {
"min": 0,
"key": "string"
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"bond_mode": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["active-backup", "balance-slb", "balance-tcp"]]
}
}
},
"qos": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "QoS"
}
}
},
"bond_fake_iface": {
"type": "boolean"
},
"interfaces": {
"type": {
"max": "unlimited",
"key": {
"type": "uuid",
"refTable": "Interface"
}
}
},
"vlan_mode": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["access", "dot1q-tunnel", "native-tagged", "native-untagged", "trunk"]]
}
}
},
"rstp_statistics": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "integer"
}
},
"lacp": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["active", "off", "passive"]]
}
}
}
}
},
"sFlow": {
"columns": {
"agent": {
"type": {
"min": 0,
"key": "string"
}
},
"header": {
"type": {
"min": 0,
"key": "integer"
}
},
"polling": {
"type": {
"min": 0,
"key": "integer"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"sampling": {
"type": {
"min": 0,
"key": "integer"
}
},
"targets": {
"type": {
"max": "unlimited",
"key": "string"
}
}
}
},
"Flow_Sample_Collector_Set": {
"isRoot": true,
"indexes": [
["id", "bridge"]
],
"columns": {
"id": {
"type": {
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
},
"ipfix": {
"type": {
"min": 0,
"key": {
"type": "uuid",
"refTable": "IPFIX"
}
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"bridge": {
"type": {
"key": {
"type": "uuid",
"refTable": "Bridge"
}
}
}
}
},
"CT_Timeout_Policy": {
"columns": {
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"timeouts": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["icmp_first", "icmp_reply", "tcp_close", "tcp_close_wait", "tcp_established", "tcp_fin_wait", "tcp_last_ack", "tcp_retransmit", "tcp_syn_recv", "tcp_syn_sent", "tcp_syn_sent2", "tcp_time_wait", "tcp_unack", "udp_first", "udp_multiple", "udp_single"]]
},
"value": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
}
}
},
"Mirror": {
"columns": {
"select_all": {
"type": "boolean"
},
"statistics": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "integer"
}
},
"name": {
"type": "string"
},
"output_vlan": {
"type": {
"min": 0,
"key": {
"minInteger": 1,
"maxInteger": 4095,
"type": "integer"
}
}
},
"select_dst_port": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"refType": "weak",
"type": "uuid",
"refTable": "Port"
}
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"select_src_port": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"refType": "weak",
"type": "uuid",
"refTable": "Port"
}
}
},
"snaplen": {
"type": {
"min": 0,
"key": {
"minInteger": 14,
"maxInteger": 65535,
"type": "integer"
}
}
},
"output_port": {
"type": {
"min": 0,
"key": {
"refType": "weak",
"type": "uuid",
"refTable": "Port"
}
}
},
"select_vlan": {
"type": {
"max": 4096,
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
}
}
},
"Flow_Table": {
"columns": {
"name": {
"type": {
"min": 0,
"key": "string"
}
},
"prefixes": {
"type": {
"max": 3,
"min": 0,
"key": "string"
}
},
"groups": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"overflow_policy": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["evict", "refuse"]]
}
}
},
"flow_limit": {
"type": {
"min": 0,
"key": {
"minInteger": 0,
"type": "integer"
}
}
}
}
},
"Interface": {
"indexes": [
["name"]
],
"columns": {
"statistics": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "integer"
}
},
"mac": {
"type": {
"min": 0,
"key": "string"
}
},
"options": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ingress_policing_kpkts_rate": {
"type": {
"key": {
"minInteger": 0,
"type": "integer"
}
}
},
"bfd_status": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"cfm_health": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 100,
"type": "integer"
}
}
},
"ofport": {
"type": {
"min": 0,
"key": "integer"
}
},
"admin_state": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["down", "up"]]
}
}
},
"error": {
"type": {
"min": 0,
"key": "string"
}
},
"cfm_fault_status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string"
}
},
"lacp_current": {
"ephemeral": true,
"type": {
"min": 0,
"key": "boolean"
}
},
"ingress_policing_kpkts_burst": {
"type": {
"key": {
"minInteger": 0,
"type": "integer"
}
}
},
"mtu": {
"ephemeral": true,
"type": {
"min": 0,
"key": "integer"
}
},
"status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"ofport_request": {
"type": {
"min": 0,
"key": {
"minInteger": 1,
"maxInteger": 65279,
"type": "integer"
}
}
},
"link_state": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["down", "up"]]
}
}
},
"cfm_remote_opstate": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["down", "up"]]
}
}
},
"cfm_fault": {
"ephemeral": true,
"type": {
"min": 0,
"key": "boolean"
}
},
"link_speed": {
"ephemeral": true,
"type": {
"min": 0,
"key": "integer"
}
},
"duplex": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["full", "half"]]
}
}
},
"ingress_policing_rate": {
"type": {
"key": {
"minInteger": 0,
"type": "integer"
}
}
},
"name": {
"mutable": false,
"type": "string"
},
"mtu_request": {
"type": {
"min": 0,
"key": {
"minInteger": 1,
"type": "integer"
}
}
},
"ifindex": {
"ephemeral": true,
"type": {
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 4294967295,
"type": "integer"
}
}
},
"cfm_flap_count": {
"type": {
"min": 0,
"key": "integer"
}
},
"type": {
"type": "string"
},
"mac_in_use": {
"ephemeral": true,
"type": {
"min": 0,
"key": "string"
}
},
"link_resets": {
"ephemeral": true,
"type": {
"min": 0,
"key": "integer"
}
},
"lldp": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"cfm_remote_mpids": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "integer"
}
},
"bfd": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"cfm_mpid": {
"type": {
"min": 0,
"key": "integer"
}
},
"ingress_policing_burst": {
"type": {
"key": {
"minInteger": 0,
"type": "integer"
}
}
}
}
},
"AutoAttach": {
"columns": {
"mappings": {
"type": {
"max": "unlimited",
"min": 0,
"key": {
"minInteger": 0,
"maxInteger": 16777215,
"type": "integer"
},
"value": {
"minInteger": 0,
"maxInteger": 4095,
"type": "integer"
}
}
},
"system_description": {
"type": "string"
},
"system_name": {
"type": "string"
}
}
},
"Manager": {
"indexes": [
["target"]
],
"columns": {
"is_connected": {
"ephemeral": true,
"type": "boolean"
},
"connection_mode": {
"type": {
"min": 0,
"key": {
"type": "string",
"enum": ["set", ["in-band", "out-of-band"]]
}
}
},
"other_config": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"external_ids": {
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"status": {
"ephemeral": true,
"type": {
"max": "unlimited",
"min": 0,
"key": "string",
"value": "string"
}
},
"target": {
"type": "string"
},
"max_backoff": {
"type": {
"min": 0,
"key": {
"minInteger": 1000,
"type": "integer"
}
}
},
"inactivity_probe": {
"type": {
"min": 0,
"key": "integer"
}
}
}
}
}
}