当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Oracle net service: listener and service name resolution method
你应该知道的 JVM 基础知识
如何使用TiUP部署一个TiDB v5.0集群
Alertmanager重复/缺失告警现象探究及两个关键参数group_wait和group_interval的释义
try --finally
SSM项目在阿里云部署
Introduction to RDMA
用反射与注解获取两个不同对象间的属性值差异
数据库基本概念:OLTP/OLAP/HTAP、RPO/RTO、MPP
Prometheus Cortex使用Block存储时的相关问题
异常记录-21
Tensorflow&&Pytorch常见报错
异常记录-18
Use the SED command to process text efficiently
Oracle数据库性能分析之常用视图
【ES6快速入门】
Kids and COVID: why young immune systems are still on top
LeetCode刷题|13罗马数字转整数
bcc安装和基本工具使用说明
Ansible basic commands, roles, built-in variables and tests judgment