当前位置:网站首页>Network equipment hard core technology insider router Chapter 17 dpdk and its prequel (II)
Network equipment hard core technology insider router Chapter 17 dpdk and its prequel (II)
2022-07-27 15:27:00 【User 8289326】
yesterday , We see , The emergence of multi-core processors has greatly improved the throughput of soft forwarding , But the optimization of cache has become the bottleneck of multi-core . In addition to the MBUF In addition to being optimized , There's another important thing —— Optimization of counters .
Whether it's a switch , Or routers , An important function is the interface counter .
You can see that in the picture , Each interface on the router has a count of the number of packets sent and received , And byte count . Because the data packets of each interface may be processed by any processor core , We need to think about : If each processor core operates on the counter ,CPU What happens inside ?
If the processor core A from RAM Read this counter , And add a number , meanwhile , Processor core B It is also necessary to accumulate this counter . therefore , The two processors collide . To solve this problem ,CPU Provides a locking mechanism , But in this way ……
All processor cores have to queue up when processing counters , Processing efficiency is conceivable .
therefore , Engineers assigned a set of counters to each core , Each core processes a packet , Are accumulated on their own counters , Accumulate when the check counter instruction is executed . such , It perfectly solves the problems mentioned above .
Of course , Because the network processor based on multi-core has some special acceleration coprocessors for network processing , Such as Parser( Message parser ), It can read the front of the packet 64 byte , And read the second layer address according to the preset register value 、 Third floor address 、TCP/UDP Port number and other information , hold CPU The core time is liberated from the repetitive parsing of packets , It also greatly accelerates the processing of data packets . Under the blessing of these factors ,8 nucleus 32 Threads do 10M The above pps It is not difficult to .
The words are divided into two parts , Each table a .
Intel To give up IXP NP After the product line , Witness MIPS/ARM stay 10Gbps To 100Gbps The network equipment market of , You can imagine the bitterness in your heart . however , Due to Intel led x86 The system has natural limitations ……
Let us Pull the timeline back to the little dark room of the Stanford professors and their wives .
be based on X86 The initial implementation of the router of the processor is shown in the figure above . as time goes on , Shared PCI The bus evolved into point-to-point PCI-E Bus .
actually , Because the network card has long supported DMA, All packets received by the network card can be written directly RAM in , The problem lies in the later process .
We know , stay DMA After completion , The network card will send CPU The core initiates the interrupt .CPU One of the core processing interrupts , Interrupt the original process , Go into kernel state , Access the packets received by the network card , And copy it to the user status , Back to the operating system . There are three questions :
- Interrupting the original process will cause instruction cache cacheline miss.
- Copying packets to user mode will waste a lot of time .
- Returning to the original operating system will cause instruction cache cacheline miss.
DPDK By solving these problems , Greatly improved Intel The processor is in Linux Packet processing performance under .
We mentioned repeatedly cache, So far , It is necessary to insert a special issue , Have a good chat about this thing , because , This concept will also be mentioned many times in the following hard core technology insider of computing and storage devices ……
边栏推荐
- Network equipment hard core technology insider router Chapter 11 Cisco asr9900 disassembly (V)
- Internship: compilation of other configuration classes
- DevEco Studio2.1运行项目报错
- LeetCode 面试题 17.21. 直方图的水量 双指针,单调栈/hard
- With just two modifications, apple gave styleganv2 3D generation capabilities
- Unity性能优化------渲染优化(GPU)之LOD(Level of detail)
- IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一
- 4种单片机驱动继电器方案
- 工具 - markdown编辑器常用方法
- 网络设备硬核技术内幕 路由器篇 4 贾宝玉梦游太虚幻境(下)
猜你喜欢

LeetCode 面试题 17.21. 直方图的水量 双指针,单调栈/hard

修改frameworks资源文件如何单编

Kubernetes CNI classification / operation mechanism

MySQL 面试40连问,面试官你再问下去我可要翻脸了

华为鸿蒙模拟器去除顶部导航栏方法

EMC design scheme of USB2.0 Interface

How to package AssetBundle

After configuring corswebfilter in grain mall, an error is reported: resource sharing error:multiplealloworiginvalues

Tools - common methods of markdown editor

LeetCode 781. 森林中的兔子 哈希表/数学问题 medium
随机推荐
Four kinds of relay schemes driven by single chip microcomputer
魔塔项目中的问题解决
网络设备硬核技术内幕 路由器篇 4 贾宝玉梦游太虚幻境(下)
Unity最简洁的对象池实现
Photoelectric isolation circuit design scheme (six photoelectric isolation circuit diagrams based on optocoupler and ad210an)
Kubernetes CNI classification / operation mechanism
网络设备硬核技术内幕 路由器篇 19 DPDK(四)
After configuring corswebfilter in grain mall, an error is reported: resource sharing error:multiplealloworiginvalues
网络设备硬核技术内幕 路由器篇 18 DPDK及其前传(三)
Introduction of the connecting circuit between ad7606 and stm32
DevEco Studio2.1运行项目报错
STM32F10x_ Hardware I2C read / write EEPROM (standard peripheral library version)
The design method of integral operation circuit is introduced in detail
Network equipment hard core technology insider router Chapter 3 Jia Baoyu sleepwalking in Taixu Fantasy (middle)
网络设备硬核技术内幕 路由器篇 11 CISCO ASR9900拆解 (五)
网络设备硬核技术内幕 路由器篇 (10) CISCO ASR9900拆解 (四)
网络设备硬核技术内幕 路由器篇 15 从鹿由器到路由器 (下)
初探STM32掉电复位PDR
光电隔离电路设计方案(六款基于光耦、AD210AN的光电隔离电路图)
Problem solving in magic tower project