当前位置:网站首页>OVS and OVS + dpdk architecture analysis
OVS and OVS + dpdk architecture analysis
2022-04-23 06:59:00 【Wei Yanhua】
OVS Kernel architecture diagram
Interaction between kernel state and user state 
OVS The architecture is divided into fast paths (fast path) And slow path (slow path)
The fast path is kernel space (kernel space) Of openvswitch.ko
The slow path is user space (user space) Of ovs-vswitchd
OVS+DPDK framework
dpif-netdev: Fast path of user status , Based on netdev The equipment dpif API.
ofproto-dpif: Based on dpif Layer of ofproto API.
netdev-dpdk: Based on DPDK Of netdev API, Several network interfaces are defined as follows :
dpdk Physical network port : Its implementation is to use high-performance vectorization DPDK PMD The driver .
dpdkvhostuser Interface : vhost-user It can be connected to the data channel in user status , With the virtual machine virtio Network port fast communication . For the sake of performance , stay vhost burst The number of packets sent and received , Need and dpdk Physical network port settings burst The number of sending and receiving packets is the same .
DPDK Accelerated OVS The general flow of data flow forwarding is as follows :
1)OVS Of ovs-vswitchd Received from OVS A packet sent from a connected network port , Extract source from packet / Purpose IP、 Source / Purpose MAC、 Port and other information .
2)OVS View the precise flow table and fuzzy flow table in user mode , If hit , Then forward it directly .
3) If it doesn't hit , stay SDN When the controller is connected , after OpenFlow agreement , Notify the controller , Handled by the controller .
4) The controller issues a new flow table , The packet re initiates routing , matching ; Message forwarding , end .
DPDK Accelerated OVS With primordial OVS The difference is that , from OVS The message received by a connected network port does not need to openvswitch.ko Kernel state processing , A message through DPDK PMD The drive goes directly to the user state ovs-vswitchd in .
Data flow
Enter from a physical or virtual interface OvS-DPDK Packets receive unique identifiers or hashes based on their header fields , Then match it to the entry in one of the three main exchange tables : Exact match cache (EMC), Data path classifier (dpcls) or ofproto classifier . The identifier of the packet will traverse each of the three tables in order , Unless a match is found , under these circumstances , The appropriate action indicated by the matching rule in the table will be performed , And after all operations are completed, the data packet is forwarded to the switch .
These three tables have different characteristics and related throughput performance / Delay .EMC Provides the fastest processing speed for a limited number of table entries . The identifier of the packet must match all fields in the table ( Source IP And port , The goal is IP And port and protocol 5 Tuples ) The entries of exactly match , To achieve the fastest processing , Otherwise it will be in EMC On “ missing ” And pass it on to dpcls.dpcls Contains more table entries ( Arranged in multiple sub tables ), And enable wildcard matching of packet identifier ( for example , Target specified IP And port , But any source is allowed ). This provides about EMC Half the throughput performance , And can meet a large number of table entries .
dpcls A miss on will cause the packet identifier to be sent to ofproto classifier , In order to OpenFlow The controller can decide the operation . This path has the lowest performance , Than EMC slow 10 More than times .ofproto Matching in the classifier results in the creation of new table entries in a faster exchange table , So that subsequent packets in the same stream can be processed faster .
EMC Insertion probability
By default , Every time 100 There are... In each stream 1 Insert into exact match cache (EMC) in . Can be set by emc-insert-inv-prob Option to change this insertion probability :
ovs-vsctl --no-wait set Open_vSwitch . other_config:emc-insert-inv-prob=N
EMC In order to PMD For the boundary , Every PMD Own your own EMC;dpcls It is bounded by ports , Each port has its own dpcls;ofproto classifier It is bounded by a bridge , Each bridge has its own ofproto classifier
版权声明
本文为[Wei Yanhua]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230557208116.html
边栏推荐
- 如何使用TiUP部署一个TiDB v5.0集群
- [fish in the net] ansible awx calls playbook to transfer parameters
- Thinkphp5 -- object (think \ response \ JSON) to array
- LeetCode刷题|368最大整除子集(动态规划)
- Sum (if) in MySQL_ Sum (if ()) in MySQL
- 数据库基本概念:OLTP/OLAP/HTAP、RPO/RTO、MPP
- bcc安装和基本工具使用说明
- 【MySQL基础篇】数据导出导入权限与local_infile参数
- DDOS攻击/防御介绍
- The time format is incorrect, and an error is reported when running the SQL file
猜你喜欢
随机推荐
Typescript (top)
Baidu map coordinates, Google coordinates and Tencent coordinates are mutually transformed
Practice of openvswitch VLAN network
Tensorflow&&Pytorch常见报错
压力测试工具 Jmeter
bcc安装和基本工具使用说明
基于DPDK实现VPC和IDC间互联互通的高性能网关
Alertmanager重复/缺失告警现象探究及两个关键参数group_wait和group_interval的释义
【代码解析(5)】Communication-Efficient Learning of Deep Networks from Decentralized Data
Prometheus Cortex多租户读写的实现
PHP background parsing after JQ serialization
Batch modify / batch update the value of a field in the database
ansible模块之include_tasks:为什么加了tags后导入的任务没有执行?
异常记录-7
[no steps in a small step to a thousand miles] Oracle Application derivative ora-01455 error reporting processing
MySQL 【读写锁+表锁+行锁+MVCC】
[MySQL basics] data export and import permissions and local_ Infile parameter
Will restarting the Oracle listener break the existing connection
Curry realization of function continuous call calculation and accumulation
A website that directly downloads PNG icons without logging in