The network multi-core processor hardware is designed to be related to parallel processing, including parallel computing between common kernels, parallel computing within cores, and parallel computing between cores and coprocessor. How to organize parallel computing between cores and coprocessor is the focus of the research on parallel models of network processors. On the basis of hardware parallelism, software processing is to make full use of the independence between processing tasks and hand over different tasks to different hardware units for processing at the same time.
Generally, a network application can be divided into three logical layers: control layer, data processing layer, and management layer. From the perspective of processing tasks oriented to network processors, the parallel features of different processing layers are also different. Tasks at the control and management layers are generally management and control operations with poor real-time performance, such as maintenance of Route tables and port status polling. tasks at the data layer are grouped and processed in a real-time manner.
The software parallel model of the network processor is divided into the following three layers:
1. Group-Level Parallelism
Most network applications are based on groups. Different groups are generally processed in a similar way, and groups are generally independent. In this way, groups can be processed in parallel by different processing units. However, this kind of processing also has some limitations, that is, when the group that belongs to the same stream is processed in parallel by different processing units, there must be a reorganization and ordering process for the group. Although the upper-layer TCP and other protocols allow unordered grouping, in order to reduce the time of terminal grouping, the order of grouping is also guaranteed.
2. Group Parallelism
Some tasks are independent of each other in the internal processing of the group, similar to the thread-Level Parallelism in the microprocessor design.
3. Script-level concurrency
In a network processor, a special hardware structure is used to execute the processor in parallel, such as the over-standard technology. In addition, some processors also use thread-level parallel technology. Research shows that in general non-specific integer scientific computing applications, command-level parallel is very limited, so most network processors do not use the command-level parallel technology in large quantities.
Group-level parallel processing is implemented using a multi-core processor. Multiple cores are used to process multiple network packets at the same time. Each core has its own command memory and in-chip local memory, you can execute commands independently and cache frequently used local data so that each core can run at full speed without waiting for slow external storage access operations.