Parallel Protocol Stack Instances for Data Packet Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In cloud computing environments, parallel protocol stack instances in a multi-core CPU architecture face conflicts when multiple protocol stack instances contend for a shared socket, leading to incomplete data packet processing due to mismatches between the protocol stack instance specified by an application and the network adapter.
Innovation Solution
A method and apparatus that perform lower-layer protocol processing on a data packet using a first protocol stack instance, determine a target socket for upper-layer processing, and associate it with a second protocol stack instance based on affinity, allowing both layers to complete protocol processing independently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple protocol stack instances share one socket, then resource utilization is improved, but processing reliability deteriorates due to contention and mismatches between application-specified and adapter-distributed instances
Solution Approach 1:
The patent segments the protocol processing function into two independent parts: lower-layer protocol processing (performed by the first protocol stack instance that receives the data packet) and upper-layer protocol processing (performed by the second protocol stack instance associated with the target socket). This segmentation allows each part to be handled by the most appropriate instance without conflict, resolving the contradiction between resource sharing and processing reliability.
2Manufacturing precision
If an application specifies an association relationship between socket and protocol stack instance, then processing accuracy is improved, but adaptability deteriorates when network adapter distribution conflicts with application specification
Solution Approach 1:
The patent introduces a target socket as an intermediary between the first protocol stack instance (that received the data packet) and the second protocol stack instance (that is associated with the socket by the application). The target socket enables the system to dynamically determine which protocol stack instance should handle upper-layer processing, balancing both application specifications and network adapter distribution policies, thus resolving the contradiction between processing accuracy and adaptability.
3Reliability
If parallel protocol stack instances exclusively occupy sockets, then processing reliability is improved, but device complexity increases due to socket contention and conflict resolution mechanisms
Solution Approach 1:
The patent divides protocol processing into lower-layer and upper-layer segments, allowing different protocol stack instances to handle different segments independently. This segmentation eliminates the need for complex conflict resolution mechanisms while maintaining reliability, as each instance operates on its designated segment without interfering with others.
Solution Approach 2:
The patent extracts the socket association relationship from the conflict-prone single-instance model and applies it selectively only to upper-layer protocol processing. The lower-layer processing remains independent and is not affected by socket associations, thereby reducing overall system complexity while preserving reliability where it matters most.
4Device complexity
If a single protocol stack instance handles complete protocol processing, then device complexity is reduced, but productivity deteriorates due to inability to utilize multi-core parallelism
Solution Approach 1:
The patent segments protocol processing across multiple protocol stack instances running on different CPU cores, with the first instance handling lower-layer processing and the second instance handling upper-layer processing. This segmentation enables true multi-core parallelism, significantly improving productivity while maintaining manageable complexity through clear functional separation.
Solution Approach 2:
The patent transitions from a single-dimension (single instance handling all layers) to a two-dimension approach (multiple instances handling different layers simultaneously). This dimensional change allows the system to leverage multi-core parallelism effectively, improving processing capability without proportionally increasing complexity.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention provides a method and an apparatus for processing a data packet based on parallel protocol stack instances, where lower-layer protocol processing is performed, by using a first protocol stack instance, on a data packet that is distributed to the first protocol stack instance; after a target socket that is needed to perform upper-layer protocol processing on the data packet on which the lower-layer protocol processing has been performed is determined, an associated second protocol stack instance is determined by using the target socket; and the upper-layer protocol processing is performed, by using the target socket and the second protocol stack instance, on the data packet on which the lower-layer protocol processing has been performed. A lower-layer protocol processing part and an upper-layer protocol processing part in protocol processing are separately completed by different protocol stacks, and the second protocol stack instance that performs the upper-layer protocol processing is determined by using the target socket; therefore, a technical problem that protocol processing cannot be performed on a data packet because a protocol stack instance specified by an APP conflicts with a protocol stack instance specified by a network adapter is resolved.