当前位置:网站首页>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
边栏推荐
- Alertmanager重复/缺失告警现象探究及两个关键参数group_wait和group_interval的释义
- ovs与ovs+dpdk架构分析
- volatile 关键字的三大特点【数据可见性、指令禁止重排性、不保证操作原子性】
- rdam 原理解析
- LeetCode刷题|13罗马数字转整数
- 使用sed命令来高效处理文本
- tc ebpf 实践
- Ansible basic commands, roles, built-in variables and tests judgment
- The arithmetic square root of X in leetcode
- Prometheus Thanos快速指南
猜你喜欢
随机推荐
使用prom-label-proxy实现Prometheus Thanos的基于标签的多租户读
tensorflow下载
Prometheus监控influxdb的方法及指标释义
Virtio and Vhost_ Net introduction
LeetCode刷题|368最大整除子集(动态规划)
数据库基本概念:OLTP/OLAP/HTAP、RPO/RTO、MPP
bcc安装和基本工具使用说明
Installing redis using a small leather panel in the window environment
AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
【Shell脚本练习】将新加的磁盘批量添加到指定的VG中
异常记录-15
XDP类型的BPF程序
Introduction to RDMA
Tensorflow&&Pytorch常见报错
MySQL【sql性能分析+sql调优】
prometheus告警记录持久化(历史告警保存与统计)
异常记录-17
用反射与注解获取两个不同对象间的属性值差异
Imitation scallop essay reading page
Oracle数据库性能分析之常用视图








