WO2015113435A1 - 基于并行协议栈实例的数据包处理方法和装置 - Google Patents
基于并行协议栈实例的数据包处理方法和装置 Download PDFInfo
- Publication number
- WO2015113435A1 WO2015113435A1 PCT/CN2014/091614 CN2014091614W WO2015113435A1 WO 2015113435 A1 WO2015113435 A1 WO 2015113435A1 CN 2014091614 W CN2014091614 W CN 2014091614W WO 2015113435 A1 WO2015113435 A1 WO 2015113435A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- protocol stack
- stack instance
- protocol
- data packet
- target socket
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
Definitions
- the present invention relates to communication technologies, and in particular, to a data packet processing method and apparatus based on an example of a parallel protocol stack.
- a parallel protocol stack instance includes at least two protocol stack instances, each protocol stack instance running on a virtual CPU (VCPU) of the CPU, using a socket associated with the exclusive protocol stack instance The way to avoid the competition between the above multi-protocol stack instances.
- VCPU virtual CPU
- each protocol stack instance may perform protocol processing on the data packets in parallel by using a socket associated with the protocol stack instance.
- the application specifies the association relationship between the socket and the protocol stack instance when instructing to create the socket required for the foregoing protocol processing, so that only the associated protocol stack instance specified by the APP occupies the socket pair data.
- the packet is processed by the protocol.
- the instance of the protocol stack to which the network card diverts the data packet is different from the protocol stack instance associated with the socket specified by the APP, the instance of the protocol stack specified by the APP conflicts with the protocol stack instance specified by the network card. In the case, the packet cannot be processed by the protocol.
- an embodiment of the present invention provides a data packet processing method and apparatus based on an example of a parallel protocol stack.
- the first aspect provides a packet processing method based on a parallel protocol stack instance, where the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, and the method includes: utilizing the first protocol The stack instance feeds the data packet that the network card offloads to the first protocol stack instance. Performing a low-level protocol processing; determining a target socket socket required for performing processing of the upper layer protocol on the data packet processed by the lower layer protocol; determining, according to the target socket, a second protocol stack instance associated with the target socket Performing, by using the target socket and the second protocol stack instance, the upper layer protocol processing on the data packet processed by the low layer protocol; wherein the low layer protocol processing and the upper layer protocol processing jointly complete the The complete protocol processing of the data packet.
- the determining, according to the target socket, the second protocol stack instance associated with the target socket including: according to the target socket and the location in the affinity map Determining an affinity between each protocol stack instance included in the parallel protocol stack instance, determining the second protocol stack instance associated with the target socket; between the target socket and each of the protocol stack instances
- the affinity is used to indicate the number of data packets that need to be processed by the upper layer protocol by using the target socket in the data packet that the network card has been offloaded to each protocol stack instance.
- the target socket and the parallel protocol stack instance included in the affinity map are included
- the affinity between the protocol stack instances, before determining the second protocol stack instance associated with the target socket further includes: updating the pro according to the number of the data packets processed by the lower layer protocol And the affinity between the target socket and the first protocol stack instance recorded in the sex map.
- the method further includes: determining whether n ⁇ A is greater than B, where A is the target socket and the first Affinity between protocol stack instances, B is the affinity between the target socket and the associated protocol stack instance recorded in the affinity map, n is a preset coefficient; An affinity between the target socket in the sex map and each protocol stack instance included in the parallel protocol stack instance, determining the second protocol stack instance associated with the target socket, including: if n ⁇ A Not greater than B, determining an instance of the protocol stack associated with the target socket recorded in the affinity map as the second protocol stack instance associated with the target socket.
- the target socket and the parallel protocol stack instance included in the affinity map are included Affinity between the protocol stack instances, determining the second protocol stack instance associated with the target socket, further comprising: if n ⁇ A is greater than B, determining the first protocol stack instance as And the second protocol stack instance associated with the target socket, and updating the protocol stack instance associated with the target socket recorded in the affinity map to the first protocol stack instance.
- the determining, by using the target socket socket required for performing upper layer protocol processing on the data packet processed by the low layer protocol includes: in a socket table Performing a search to obtain the target socket required for performing upper layer protocol processing on the data packet processed by the lower layer protocol.
- the performing, by using the target socket and the second protocol stack instance, performing the upper layer protocol processing on the data packet processed by the low layer protocol includes: adding, by the lower layer protocol, the data packet to an underlying data receiving queue of the target socket; and when the linked list is associated according to the protocol stack instance corresponding to the second protocol stack instance, polling the And performing the upper layer protocol processing on the data packet in the bottom data receiving queue by using the second protocol stack instance; the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate The second protocol stack instance has a socket of an association relationship.
- the method further includes: utilizing The parent protocol stack instance of each protocol stack instance included in the parallel protocol stack instance creates the target socket that has no association relationship with each protocol stack instance; the parent protocol stack instance is that the application APP adopts random The mode or parameter specification mode or load balancing mode is selected.
- the method further includes: receiving a first data packet sent by the application APP, and determining a required protocol for performing the protocol processing on the first data packet. Determining a target socket; determining the second association associated with the target socket The stack instance is configured to perform protocol processing on the first data packet by using the target socket and the second protocol stack instance.
- the second aspect provides a packet processing method based on a parallel protocol stack instance, where the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, where the method includes: receiving an application APP a data packet; determining a target socket socket required for protocol processing of the first data packet; determining, according to an association relationship between the target socket and the second protocol stack instance, the first node associated with the target socket
- the second protocol stack is configured to perform protocol processing on the first data packet by using the target socket and the second protocol stack instance; wherein, the association relationship between the target socket and the second protocol stack instance is Determining, when the first protocol stack instance and the second protocol stack instance perform protocol processing on the second data packet, the first protocol stack instance performs low-level protocol processing on the second data packet, where the second protocol The stack instance performs upper layer protocol processing on the second data packet, where the lower layer protocol processing and the upper layer protocol processing together complete a complete protocol for the second data packet .
- the performing, by using the target socket and the second protocol stack instance, performing protocol processing on the first data packet including: using the first data packet Adding to the APP data sending queue of the target socket; when the APP data sending queue of the target socket is polled according to the protocol stack instance associated with the second protocol stack instance, the target socket and the target socket are used.
- the second protocol stack instance performs low-level protocol processing and upper layer protocol processing on the first data packet in the APP data sending queue respectively; the protocol stack instance association linked list corresponding to the second protocol stack instance is used to indicate The second protocol stack instance has a socket of an association relationship.
- the determining, according to the association relationship between the target socket and the second protocol stack instance, the second protocol stack instance associated with the target socket including: according to affinity And determining, by the sex map, whether the target socket has an associated protocol stack instance; the affinity map is used to record a protocol stack instance associated with the target socket; and if the target socket has an associated protocol stack instance, determining The protocol stack instance associated with the target socket is the second protocol stack instance.
- the method further includes: if the target socket does not have an associated protocol stack instance, the control message is Adding to the receiving queue of the parent protocol stack instance of the target socket; the parent protocol stack instance of the target socket is a protocol stack instance for creating the target socket; The message is used to perform protocol processing on the first data packet; when the control message in the receive queue of the parent protocol stack instance is polled, the control message is parsed to obtain the first a data packet; performing protocol processing on the first data packet by using the parent protocol stack instance; and updating a protocol stack instance associated with the target socket recorded in the affinity map to the parent protocol stack instance.
- the determining a target socket socket required for performing protocol processing on the first data packet includes: performing a retrieval in a socket table, and determining a protocol required for performing protocol processing on the first data packet The target socket.
- the method before determining the target socket socket required for performing protocol processing on the first data packet, further includes: using the parent protocol stack instance, creating the target socket that has no association relationship with each protocol stack instance included in the parallel protocol stack instance, where the parent protocol stack instance is that the APP adopts a random manner or The parameter specification mode or load balancing mode is selected in each of the protocol stack instances.
- the method further includes: adding the first data packet processed by the protocol to the network card
- the sending queue is configured to enable the network card to send the first data packet after the protocol processing.
- a third aspect provides a packet processing apparatus based on a parallel protocol stack instance, where the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, and the apparatus includes: a low layer processing module, configured to: Determining, by the first protocol stack instance, the data packet that is offloaded by the network card to the first protocol stack instance, and the first determining module, configured to determine, by using the low-layer protocol, the data packet
- the upper layer protocol is configured to process the required target socket socket;
- the second determining module is configured to determine, according to the target socket, a second protocol stack instance associated with the target socket; and an upper layer processing module, configured to use the target socket And performing, by the second protocol stack instance, the upper layer protocol processing on the data packet processed by the low layer protocol; wherein the low layer protocol processing module and the upper layer protocol processing module jointly complete the data packet Complete protocol processing.
- the second determining module is specifically configured to use, between the target socket included in the affinity map and each protocol stack instance included in the parallel protocol stack instance. Affinity, determining the second protocol stack instance associated with the target socket; affinity between the target socket and each of the protocol stack instances is used to indicate the network card to each of In the data packet that has been offloaded by the protocol stack instance, the number of data packets that need to be processed by the upper layer protocol by using the target socket is required.
- the device further includes: an update module, configured to process the data according to the low layer protocol The number of packets is updated to update the affinity between the target socket and the first protocol stack instance described in the affinity map.
- the device further includes: a determining module, configured to determine whether n ⁇ A is greater than B, where For the affinity between the target socket and the first protocol stack instance, B is the affinity between the target socket and the associated protocol stack instance recorded in the affinity map, where n is a second determining module, comprising: a first determining unit, configured to determine, if n ⁇ A is not greater than B, an instance of a protocol stack associated with the target socket recorded in the affinity map As the second protocol stack instance associated with the target socket.
- the second determining module further includes: a second determining unit, configured to: if n ⁇ A is greater than B And determining, by the first protocol stack instance, the second protocol stack instance associated with the target socket, and updating the protocol stack instance associated with the target socket recorded in the affinity map to The first protocol stack instance is described.
- the first determining module is specifically configured to perform a search in the socket table, and obtain an upper layer protocol processing process on the data packet processed by the low layer protocol.
- the target socket required.
- the upper layer processing module includes: a queue unit, configured to add the data packet processed by the low layer protocol to the target The lower layer data receiving queue of the socket; the upper layer processing unit is configured to use the second protocol stack instance pair when polling the target socket according to the protocol stack instance association list corresponding to the second protocol stack instance The data packet in the underlying data receiving queue is processed by the upper layer protocol; the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate a socket that has an association relationship with the second protocol stack instance.
- the device further includes: a creating module, configured to use one of the protocol stack instances included in the protocol stack instance included in the parallel protocol stack instance, The target socket is not associated with each protocol stack instance; the parent protocol stack instance is selected by the application APP in a random manner, a parameter specification manner, or a load balancing manner.
- the device further includes: a receiving module, configured to receive a first data packet sent by the application APP, where the first determining module is further used Determining the target socket socket required for protocol processing of the first data packet; the second determining module is further configured to determine the target required for protocol processing of the first data packet After the socket socket, the second protocol stack instance associated with the target socket is determined; a protocol processing module is configured to perform the first data packet by using the target socket and the second protocol stack instance Protocol processing.
- a fourth aspect is to provide a data packet processing apparatus based on a parallel protocol stack instance, where the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, and the apparatus includes: a receiving module, configured to receive a first data packet sent by the application, a first determining module, configured to determine a target socket socket required for protocol processing of the first data packet, and a second determining module, configured to use the target socket and the first Determining, by the second protocol stack instance, the second protocol stack instance associated with the target socket; the first processing module, configured to use the target socket and the second protocol stack instance, to perform the first The data packet is subjected to protocol processing; wherein the association between the target socket and the second protocol stack instance is determined when the first protocol stack instance and the second protocol stack instance perform protocol processing on the second data packet The first protocol stack instance performs low layer protocol processing on the second data packet, and the second protocol stack instance pairs the second data packet Performing upper layer protocol processing, the low layer protocol processing and the upper layer protocol processing together complete complete protocol processing on the
- the first processing module includes: a queue unit, configured to add the first data packet to an APP data sending queue of the target socket; And when the APP data sending queue of the target socket is polled according to the protocol stack instance association list corresponding to the second protocol stack instance, using the target socket and the second protocol stack instance to The first data packet in the APP data sending queue is respectively subjected to low layer protocol processing and upper layer protocol processing; the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate that the second protocol stack instance has an association relationship with the second protocol stack instance. Socket.
- the second determining module includes: a determining unit, configured to determine, according to the affinity map, whether the target socket has an associated protocol stack instance;
- the sufficiency map is used to record the protocol stack instance associated with the target socket, and the determining unit is configured to determine, if the target socket has an associated protocol stack instance, the protocol stack instance associated with the target socket is The second protocol stack instance is described.
- the device further includes: a queue module, configured to: if the target socket does not have an associated protocol stack For example, the control message is added to the receive queue of the parent protocol stack instance of the target socket; the parent protocol stack instance of the target socket is a protocol stack instance for creating the target socket; the control message is used for Instructing to perform protocol processing on the first data packet; the parsing module is configured to parse the control message when the control message in the receive queue of the parent protocol stack instance is polled, to obtain the a data packet; a second processing module, configured to perform protocol processing on the first data packet by using the parent protocol stack instance; and an update module, configured to associate the target socket recorded in the affinity map The protocol stack instance is updated to the parent stack instance.
- a queue module configured to: if the target socket does not have an associated protocol stack For example, the control message is added to the receive queue of the parent protocol stack instance of the target socket; the parent protocol stack instance of the target socket is a protocol stack instance for creating the target socket; the control message is used for Instruct
- the first determining module is specifically configured to perform a retrieval in the socket table, and determine the target socket required for performing protocol processing on the first data packet.
- the device further includes: a creating module, by using the parent protocol stack instance, creating and None of the protocol stack instances included in the parallel protocol stack instance have the associated relationship Socket, the parent protocol stack instance is selected by the APP in a random manner or a parameter specification manner or a load balancing manner in the protocol stack instances.
- the device further includes: a sending module, configured to add the first data packet processed by the protocol to a sending queue of the network card, so that the network card sends the first after the protocol processing data pack.
- the method and the device provided by the embodiment of the present invention perform low-level protocol processing on a data packet that is offloaded to the first protocol stack instance by using the first protocol stack instance, and determine a target required for performing upper-layer protocol processing on the data packet processed by the low-layer protocol.
- the associated second protocol stack instance is determined by the target socket, and the target protocol and the second protocol stack instance are used to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the protocol processing is completed by different protocol stacks respectively.
- the lower layer protocol processing part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol stack instance specified by the APP conflicts with the protocol stack instance specified by the network card.
- FIG. 1 is a schematic flowchart of a data packet processing method based on an example of a parallel protocol stack according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of another method for processing a data packet based on an example of a parallel protocol stack according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart of a data packet processing method based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 4 is a schematic flowchart of another method for processing a data packet based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 5 is a packet processing device based on an example of a parallel protocol stack according to an embodiment of the present invention. Schematic diagram of the structure
- FIG. 6 is a schematic structural diagram of another data packet processing apparatus based on an example of a parallel protocol stack according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of another data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of another data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- FIG. 1 is a schematic flowchart of a data packet processing method based on a parallel protocol stack instance according to an embodiment of the present invention.
- the method provided in this embodiment is performed by a parallel protocol stack instance, and the parallel protocol stack instance includes at least a first
- the protocol stack instance and the second protocol stack instance, as shown in Figure 1, include:
- the network card includes multiple physical queues, and the data packet that is offloaded to the first protocol stack instance is obtained from the physical queue corresponding to the first protocol stack instance, and the data packet is processed by the first protocol stack instance.
- the low-level protocol processing can be handled by the three layers and below specified in the Open System Interconnect (OSI).
- OSI Open System Interconnect
- the search is performed in the socket table to obtain a target socket required for performing upper layer protocol processing on the data packet.
- the upper layer protocol may be processed by four layers and above specified in the OSI, and the socket table is used to record the correspondence between the hash value of the data packet and the socket, and the hash value may be a quintuple of the data packet.
- the information can be retrieved in the socket table according to the hash value of the data packet, and the target socket required for the upper layer protocol processing of the data packet is obtained.
- one of the protocol stack instances is used to initially establish a parent protocol stack instance of the target socket, and the target socket that has no association relationship with each protocol stack instance is created, for example, the target socket is created in the memory.
- the shared area, the parent protocol stack instance is selected by the APP in a random manner or a parameter designation manner or a load balancing manner. Determining a second protocol stack instance from each protocol stack instance according to an affinity between each protocol stack instance included in the parallel protocol stack instance and the target socket, or using a load balancing policy, or randomly Establishing an association relationship between the target socket and the second protocol stack instance.
- the affinity between the protocol stack instance and the target socket is used to indicate the total number of data packets that need to be processed by the upper layer protocol by using the target socket in the data packet that the network card has been offloaded to the protocol stack instance.
- the low layer protocol processing and the upper layer protocol processing together complete complete protocol processing on the data packet, for example, the underlying protocol processing completes the protocol processing of the third layer and below specified in the OSI of the data packet, and the upper layer protocol processing
- the four-layer and above protocol processing specified in the OSI is completed, and the low-layer protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the data packet processed by the lower layer protocol is added to the bottom data receiving queue of the target socket, and when the target socket is associated according to the protocol stack instance corresponding to the second protocol stack instance, the The second protocol stack instance performs upper layer protocol processing on the data packet in the bottom data receiving queue to obtain user data carried by the data packet.
- the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate a socket that has an association relationship with the second protocol stack instance.
- the data packet processing method based on the parallel protocol stack instance may be further configured to receive the first data packet sent by the APP, and then determine to perform protocol negotiation on the first data packet. Determining the target socket socket required, and determining the second protocol stack instance associated with the target socket, and then using the target socket and the second protocol stack instance to the first data The package is processed by the protocol.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 2 is a schematic flowchart of another method for processing a data packet based on a parallel protocol stack according to an embodiment of the present invention.
- the method provided in this embodiment is performed by a parallel protocol stack instance, as shown in FIG. 2, and includes:
- each physical queue in the network card has a corresponding relationship with each protocol stack instance in the parallel protocol stack, and may be a one-to-one correspondence between the physical queue and the protocol stack instance, or multiple physical queues corresponding to one protocol stack instance. This is not limited.
- the NIC adds the data packet that is offloaded to the first protocol stack instance to the physical queue corresponding to the first protocol stack instance, and the first protocol stack obtains the data packet from the physical queue.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet, for example, the three-layer protocol and the following protocol specified in the OSI.
- the search is performed in the socket table to obtain a target socket required for performing upper layer protocol processing on the data packet.
- the upper layer protocol can be processed by four layers and above specified in the OSI.
- the affinity between the protocol stack instance and the target socket is used to indicate the total number of data packets that need to be processed by the upper layer protocol by using the target socket in the data packet that the network card has been offloaded to the protocol stack instance. For a socket, multiple connections may occur, and traffic of multiple connections may be split to multiple protocol stack instances. If the configuration needs to handle socket a by protocol stack instance A, then protocol stack instance B needs to receive socket a processing. After the data packet, it needs to be forwarded to the protocol stack instance A for processing. If the configuration is directly processed by the protocol stack instance B, the socket a can be directly obtained from the cache cache, and the protocol stack instance is obviously selected. B handles socket a more efficiently.
- the socket a and the protocol stack instance B have data affinity, so that the traffic of the socket a is preferentially distributed to the protocol stack instance B for processing. That is, the protocol stack instance with the most affinity with a socket is selected to process the socket, so that the maximum traffic does not need to be forwarded, and the efficiency is maximized.
- the affinity map of the target socket is used to record the affinity of each protocol stack instance in the parallel protocol stack with the target socket, the associated protocol stack instance currently associated with the target socket, the parent protocol stack instance of the target socket, and the target socket.
- the preset coefficients include an affinity array, an identifier of the associated protocol stack instance, an identifier of the parent protocol stack instance, and a preset coefficient.
- the affinity array is used to indicate the affinity of each protocol stack instance in the parallel protocol stack to the target socket.
- the first protocol stack instance performs low-level protocol processing on the data packet, the number of data packets processed by the low-level protocol obtained by the statistics is increased, and the number of statistics obtained is increased to the affinity of the affinity map.
- the first protocol stack instance is in affinity with the target socket.
- the affinity of the first protocol stack instance and the target socket is X in the affinity array of the affinity map, and the number of data packets processed by the lower layer protocol obtained by the statistics is Y, the update is performed.
- n ⁇ A is greater than B. If yes, perform 206-207, otherwise perform 208-209.
- A is the affinity between the target socket and the first protocol stack instance
- B is the affinity between the target socket and the currently associated protocol stack instance
- n is a preset coefficient
- n The value ranges from a positive number. In general, the value of n is a positive number that is not greater than 1.
- n may be greater than 1; the associated protocol stack instance is a protocol stack currently associated with the target socket as recorded in the affinity map example.
- n ⁇ A is greater than B, record the first protocol stack instance as an association protocol stack instance in the affinity map, and establish a relationship between the first protocol stack instance and the target socket. connection relation.
- n ⁇ A is greater than B, it is required to replace the associated protocol stack in the affinity map with the first protocol stack, and establish an association relationship between the first protocol stack instance and the target socket.
- the first protocol stack instance continues to perform upper layer protocol processing on the data packet processed by the low layer protocol, obtains user data carried by the data packet, and adds the user data to the application receiving queue of the target socket, when the APP polls The user data is obtained from the queue when the queue is in use.
- n ⁇ A is not greater than B, determine that the protocol stack instance currently associated with the target socket is the second protocol stack instance associated with the target socket.
- the user data is transmitted to the APP.
- the data packet processed by the low layer protocol is added to an underlying data receiving queue of the target socket.
- the second protocol stack instance is used to perform an upper layer protocol on the data packet in the bottom data receiving queue. Processing; the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate a socket that has an association relationship with the second protocol stack instance.
- the low layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet
- the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet
- the upper layer protocol The processing completes the four-layer and above protocol processing specified in the OSI
- the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the upper layer protocol processing is performed on the data packet processed by the low-layer protocol.
- the associated second protocol stack instance is determined by the target socket, and the target protocol and the second protocol stack instance are used to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because different protocol stacks are adopted.
- the lower layer protocol processing part and the upper layer protocol processing part in the protocol processing are respectively completed, and the second protocol stack instance processed by the upper layer protocol is determined by the target socket, thereby solving the conflict between the protocol stack instance specified by the APP and the protocol stack instance specified by the network card.
- the technical problem caused by the inability to protocolize the packet.
- FIG. 3 is a schematic flowchart of a data packet processing method based on a parallel protocol stack instance according to another embodiment of the present invention.
- the method provided in this embodiment is performed by a parallel protocol stack instance, and the parallel protocol stack instance includes at least a first
- the protocol stack instance and the second protocol stack instance, as shown in FIG. 3, include:
- the search is performed in the socket table to obtain a target socket required for performing protocol processing on the first data packet.
- the target socket is an instance of a parent protocol stack in each protocol stack instance selected by the APP in a random manner or a parameter specification manner or a load balancing manner, and the instance created by the parent protocol stack instance does not exist with each protocol stack instance.
- the socket of the association is an instance of a parent protocol stack in each protocol stack instance selected by the APP in a random manner or a parameter specification manner or a load balancing manner, and the instance created by the parent protocol stack instance does not exist with each protocol stack instance.
- the association between the target socket and the second protocol stack instance is determined when the first protocol stack instance and the second protocol stack instance perform protocol processing on the second data packet, where the first protocol stack is The instance performs low-level protocol processing on the second data packet, where the second protocol stack instance performs upper layer protocol processing on the second data packet, and the low-level protocol processing and the upper layer protocol processing jointly complete the second Complete protocol processing of the packet.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 4 is a schematic flowchart of another method for processing a data packet based on a parallel protocol stack according to another embodiment of the present invention.
- the method provided by this embodiment is performed by a parallel protocol stack instance, and the parallel protocol stack instance includes at least a A protocol stack instance and a second protocol stack instance, as shown in FIG. 4, include:
- the method includes: using a parent protocol stack instance of the parallel protocol stack instance to initially establish the target socket, and creating a target socket that has no association relationship with each protocol stack instance included in the parallel protocol stack instance, where the parent The protocol stack instance is selected by the APP in a random manner or a parameter designation manner or a load balancing manner in each protocol stack instance included in the foregoing parallel protocol stack instance.
- the affinity map is used to record the protocol stack instance currently associated with the target socket, and the associated protocol stack instance recorded in the affinity map is an instance of the protocol stack currently associated with the target socket.
- the association relationship is determined from each protocol stack instance according to the affinity between each protocol stack instance included in the parallel protocol stack instance and the target socket, and then the target socket and the second protocol are established. The relationship between stack instances.
- the affinity between the protocol stack instance and the target socket is used to indicate the total number of data packets that need to be processed by the upper layer protocol by using the target socket in the data packet that the network card has been offloaded to the protocol stack instance.
- the target socket has an associated protocol stack instance, add the first data packet to an APP data sending queue of the target socket.
- the target socket includes an APP data sending queue, an APP data receiving queue, and an underlying data receiving queue.
- the APP data sending queue is used to store the data packets sent by the APP
- the APP data receiving queue is used to store the data packets sent to the APP
- the bottom data receiving queue is used to store the data packets split by the network card.
- the first data in the APP data sending queue is used by using the target socket and the second protocol stack instance.
- the packet performs low-level protocol processing and upper layer protocol processing, respectively.
- the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate a socket that has an association relationship with the second protocol stack instance.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the target socket does not have an associated protocol stack instance, add a control message to a receive queue of the target protocol stack instance of the target socket.
- the parent protocol stack instance of the target socket is an instance of a protocol stack for creating the target socket, and the control message is used to indicate protocol processing on the first data packet.
- the receive queue of the parent stack instance is used to store data packets or control messages that need to be processed by the parent stack.
- the receiving queue of each protocol stack is polled.
- the control message is taken out from the queue, and the control message is parsed to obtain the first data packet.
- the target socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the low layer protocol to obtain user data, and the protocol processing is completed by using different protocol stacks respectively.
- the lower layer protocol processing part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol stack instance specified by the APP conflicts with the protocol stack instance specified by the network card.
- FIG. 5 is a schematic structural diagram of a data packet processing apparatus based on an example of a parallel protocol stack according to an embodiment of the present invention.
- the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, as shown in FIG. 5 .
- the method includes a low-level processing module 51, a first determining module 52, a second determining module 55, and an upper processing module 53.
- the low-level processing module 51 is configured to perform low-level protocol processing on the data packet that the network card offloads to the first protocol stack instance by using the first protocol stack instance.
- the first determining module 52 is connected to the lower layer processing module 51, and is configured to determine a target socket socket required for performing upper layer protocol processing on the data packet processed by the lower layer protocol.
- the first determining module 52 is specifically configured to perform a search in the socket table, and determine a target socket required for performing upper layer protocol processing on the data packet.
- the second determining module 55 is connected to the first determining module 52, and is configured to determine, according to the target socket, a second protocol stack instance associated with the target socket.
- the second determining module 55 is specifically configured to determine, according to the affinity between the target socket in the affinity map and each protocol stack instance included in the parallel protocol stack instance, to determine the target socket.
- the second protocol stack instance; the affinity between the target socket and each of the protocol stack instances is used to indicate that the network card is diverted to the data packet of each protocol stack instance, and needs to be utilized.
- the upper layer processing module 53 is connected to the second determining module 55, configured to perform upper layer protocol processing on the data packet processed by the low layer protocol by using the target socket and the second protocol stack instance associated with the target socket. .
- the lower layer protocol processing module 51 and the upper layer protocol processing module 53 jointly complete the number According to the complete protocol of the package.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the upper layer processing module 53 is configured to add the data packet processed by the low layer protocol to an underlying data receiving queue of the target socket; and associate with a protocol stack instance corresponding to the second protocol stack instance. a linked list, when the target socket is polled, performing, by using the second protocol stack instance, the upper layer protocol processing on the data packet in the bottom data receiving queue; the protocol stack corresponding to the second protocol stack instance The instance association list is used to indicate a socket having an association relationship with the second protocol stack instance.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 6 is a schematic structural diagram of another data packet processing apparatus based on an example of a parallel protocol stack according to an embodiment of the present invention.
- the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, as shown in FIG. 6 .
- the data packet processing apparatus based on the parallel protocol stack instance in this embodiment further includes:
- the creating module 54 is connected to the first determining module 52, and is configured to create a node that has no association relationship with each protocol stack instance by using one of the protocol stack instances included in the parallel protocol stack instance.
- the target socket is configured to create a node that has no association relationship with each protocol stack instance by using one of the protocol stack instances included in the parallel protocol stack instance.
- the parent protocol stack instance is selected by the APP in a random manner or a parameter designation manner or a load balancing manner.
- the data packet processing apparatus based on the parallel protocol stack instance further includes:
- the update module 57 is connected to the first determining module 52 for processing according to the lower layer protocol
- the number of subsequent data packets updates the affinity between the target socket and the first protocol stack instance described in the affinity map.
- the determining module 58 is connected to the updating module 57 and the second determining module 55, and is configured to determine whether n ⁇ A is greater than B, where A is an affinity between the target socket and the first protocol stack instance, B
- n is a preset coefficient, n takes a positive number, and the value of the specific n can refer to running a parallel protocol stack instance.
- the processing performance of the CPU if the processing performance of the CPU is excellent, n can be correspondingly smaller, and vice versa, the value of n is larger; the instance of the associated protocol stack recorded in the affinity map is the protocol stack instance currently associated with the target socket. .
- the second determining module 55 further includes a first determining unit 551 and a second determining unit 552.
- a first determining unit 551, configured to determine, as n ⁇ A is not greater than B, a protocol stack instance associated with the target socket recorded in the affinity map as the second protocol associated with the target socket Stack instance.
- a second determining unit 552 configured to determine the first protocol stack instance as the second protocol stack instance associated with the target socket if n ⁇ A is greater than B, and in the affinity map The recorded protocol stack associated with the target socket is updated to the first protocol stack instance.
- the upper layer processing module 53 includes:
- the queue unit 531 is configured to add the data packet processed by the lower layer protocol to an underlying data receiving queue of the target socket.
- the upper layer processing unit 532 is connected to the queue unit 531, and configured to use the second protocol stack instance to perform the rounding when the target socket is polled according to the protocol stack instance associated with the second protocol stack instance.
- the data packet in the underlying data receiving queue is processed by the upper layer protocol; the protocol stack instance association list corresponding to the second protocol stack instance is used to indicate a socket that has an association relationship with the second protocol stack instance.
- the packet processing device based on the parallel protocol stack instance may be disposed on the parallel protocol stack.
- the low-level processing module 51, the first determining module 52, the second determining module 55, the updating module 57, and the determining module 58 may be disposed in the first protocol stack instance; the queue in the upper processing module 53
- the unit 531 can be disposed in the first protocol stack instance, and the upper layer processing unit 532 in the upper layer processing module 53 can be disposed in the second protocol stack instance.
- the data packet processing apparatus based on the parallel protocol stack instance further includes: a receiving module 61. And a protocol processing module 62.
- the receiving module 61 is connected to the first determining module 52, and configured to receive the first data packet sent by the application APP.
- the first determining module 52 is further configured to determine the target socket socket required for protocol processing of the first data packet.
- the second determining module 55 is further configured to determine the second protocol stack instance associated with the target socket after determining the target socket socket required for protocol processing of the first data packet.
- the protocol processing module 62 is connected to the second determining module 55, and is configured to perform protocol processing on the first data packet by using the target socket and the second protocol stack instance.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the functional modules of the data packet processing apparatus of the parallel protocol stack example provided in this embodiment may be used to execute the data packet processing method flow of the parallel protocol stack instance shown in FIG. 1 and FIG. 2, and the specific working principle is not described herein. Description of method embodiments.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 7 is a schematic structural diagram of a data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, as shown in FIG. 7 .
- the method includes: a receiving module 71, a first determining module 72, a first processing module 73, and a second determining module 70.
- the receiving module 71 is configured to receive the first data packet sent by the application APP.
- the first determining module 72 is connected to the receiving module 71 and configured to determine a target socket socket required for protocol processing of the first data packet.
- the first determining module 72 is specifically configured to perform a search in the socket table to obtain a target socket required for performing protocol processing on the first data packet.
- the second determining module 70 is connected to the first determining module 72, and is configured to determine, according to the association relationship between the target socket and the second protocol stack instance, a second protocol stack instance associated with the target socket.
- the first processing module 73 is connected to the second determining module 70, and is configured to perform protocol processing on the first data packet by using the target socket and the second protocol stack instance.
- the association between the target socket and the second protocol stack instance is determined when the first protocol stack instance and the second protocol stack instance perform protocol processing on the second data packet, where the first protocol stack is The instance performs low-level protocol processing on the second data packet, where the second protocol stack instance performs upper layer protocol processing on the second data packet, and the low-level protocol processing and the upper layer protocol processing jointly complete the second Complete protocol processing of the packet.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 8 is a schematic structural diagram of another apparatus for processing a data packet based on a parallel protocol stack according to another embodiment of the present invention.
- the parallel protocol stack instance includes at least a first protocol stack instance and a second protocol stack instance, as shown in FIG. 8 .
- the second determining module 70 in the packet processing device based on the parallel protocol stack instance in the embodiment further includes:
- the determining unit 701 is configured to determine, according to the affinity map, whether the target socket exists Associated protocol stack instance.
- the affinity map is used to record the protocol stack instance currently associated with the target socket, and the associated protocol stack instance in the affinity map is used to indicate the protocol stack instance currently associated with the target socket.
- the determining unit 702 is connected to the determining unit 701, and is configured to: if the target socket has an associated protocol stack instance, determine that the protocol stack instance associated with the target socket is the second protocol stack instance.
- the first processing module 73 includes a queue unit 731 and a processing unit 732.
- the queue unit 731 is configured to add the first data packet to the APP data sending queue of the target socket.
- the processing unit 732 is connected to the queue unit 731, and is configured to use the target socket and the office when the APP data sending queue of the target socket is polled according to the protocol stack instance association list corresponding to the second protocol stack instance.
- the second protocol stack instance performs low-level protocol processing and upper layer protocol processing on the first data packet in the APP data sending queue respectively; the protocol stack instance association linked list corresponding to the second protocol stack instance is used to indicate The socket in which the second protocol stack instance has an association relationship.
- the data packet processing apparatus based on the parallel protocol stack instance further includes: a creation module 78, a queue module 75, a parsing module 76, a second processing module 77, and an update module 80.
- the creating module 78 is connected to the first determining module 72, and is configured to use the parent protocol stack instance to create the target socket that has no association relationship with each protocol stack instance included in the parallel protocol stack instance.
- the parent protocol stack instance is selected by the APP in a random manner or a parameter specification manner or a load balancing manner in each protocol stack instance.
- the queue module 75 is connected to the first determining module 72, and is configured to add a control message to the receiving queue of the parent protocol stack instance of the target socket if the target socket does not have an associated protocol stack instance; the target The parent protocol stack instance of the socket is a protocol stack instance for creating the target socket; the control message is used to indicate protocol processing on the first data packet.
- the parsing module 76 is connected to the queue module 75, and configured to parse the control message to obtain the first data packet when polling the control message in the receiving queue of the parent protocol stack instance.
- the second processing module 77 is connected to the parsing module 76 for performing protocol processing on the first data packet by using the parent protocol stack instance.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet. That is to say, the network layer corresponding to the upper layer protocol processing is higher than the network layer corresponding to the low layer protocol processing.
- the update module 74 is connected to the second processing module 77, and is configured to update the protocol stack instance associated with the target socket recorded in the affinity map to the parent protocol stack instance.
- the data packet processing apparatus based on the parallel protocol stack instance further includes:
- the sending module 79 is connected to the second processing module 77 and the first processing module 73, and configured to add the first data packet processed by the protocol to the sending queue of the network card, so that the network card sends the protocol processed A packet of data.
- the functional modules of the data packet processing apparatus of the parallel protocol stack example provided in this embodiment may be used to execute the data packet processing method flow of the parallel protocol stack example shown in FIG. 3 and FIG. 4, and the specific working principle is not described herein. Description of method embodiments.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- FIG. 9 is a schematic structural diagram of a data packet processing apparatus based on an example of a parallel protocol stack according to another embodiment of the present invention.
- the apparatus in this embodiment may include: a memory 81, a communication interface 82, and processing. 83.
- the memory 81 is configured to store a program.
- the program may include program code, and the program code includes computer operation instructions.
- the memory 81 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk storage. Device.
- the communication interface 82 is configured to receive a data packet that is offloaded to the first protocol stack instance.
- the processor 83 is configured to execute a program stored in the memory 81, configured to: perform low-level protocol processing on the data packet that is offloaded by the network card to the first protocol stack instance by using the first protocol stack instance;
- the data packet processed by the lower layer protocol performs a target socket socket required for upper layer protocol processing; according to the target socket, determines a second protocol stack instance associated with the target socket; using the target socket and the The second protocol stack instance performs the upper layer protocol processing on the data packet processed by the low layer protocol; wherein the low layer protocol processing and the upper layer protocol processing together complete complete protocol processing on the data packet.
- the processor 83 is specifically configured to: use one of the protocol stack instances to initially establish a target protocol stack instance, and create the target socket that has no association relationship with each protocol stack instance, where the parent The protocol stack instance is selected by the APP in a random manner or a parameter designation manner or a load balancing manner; the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the low-layer protocol processing is determined.
- the subsequent data packet performs a target socket socket required for upper layer protocol processing; according to the affinity between each protocol stack instance included in the parallel protocol stack instance and the target socket, from each protocol stack instance, Determining a second protocol stack instance; the affinity between the protocol stack instance and the target socket is used to indicate that the network card has been offloaded to the protocol stack instance, and the target socket is required to perform upper layer protocol processing.
- the total number of data packets establishing an association relationship between the target socket and the second protocol stack instance. And using the target socket and the second protocol stack instance associated with the target socket to perform upper layer protocol processing on the data packet processed by the low layer protocol to obtain user data.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the functional modules of the data packet processing apparatus of the parallel protocol stack example provided in this embodiment may be used to execute the data packet processing method flow of the parallel protocol stack instance shown in FIG. 1 and FIG. 2, and the specific working principle is not described herein. Description of method embodiments.
- the data that is offloaded to the first protocol stack instance is used by using the first protocol stack instance.
- the packet performs low-level protocol processing, determines the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol, determines the associated second protocol stack instance through the target socket, and uses the target socket and the second protocol stack instance to lower the layer.
- the data packet processed by the protocol is processed by the upper layer protocol. Since the lower layer protocol processing part and the upper layer protocol processing part in the protocol processing are respectively completed by different protocol stacks, the second protocol stack instance for performing the upper layer protocol processing is determined by the target socket. Therefore, the technical problem that the protocol cannot be processed by the protocol due to the conflict between the protocol stack instance specified by the APP and the protocol stack instance specified by the network card is solved.
- FIG. 10 is a schematic structural diagram of another apparatus for processing a data packet based on a parallel protocol stack according to another embodiment of the present invention.
- the apparatus in this embodiment may include: a memory 91, a communication interface 92, and Processor 93.
- the memory 91 is configured to store a program.
- the program may include program code, and the program code includes computer operation instructions.
- the memory 91 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
- the communication interface 92 is configured to receive the first data packet sent by the APP.
- the processor 93 is configured to execute a program stored in the memory 91, configured to: receive a first data packet sent by the application APP, and determine a target socket socket required for protocol processing of the first data packet; An association between the target socket and the second protocol stack instance, determining the second protocol stack instance associated with the target socket; using the target socket and the second protocol stack instance, performing the first data packet a protocol processing, where the association relationship between the target socket and the second protocol stack instance is determined when the first protocol stack instance and the second protocol stack instance perform protocol processing on the second data packet, where The first protocol stack instance performs low-level protocol processing on the second data packet, and the second protocol stack instance performs upper layer protocol processing on the second data packet, where the lower layer protocol processing and the upper layer protocol processing are completed together Complete protocol processing of the second data packet.
- the processor 93 is specifically configured to determine, according to the affinity map, whether the target socket has an associated protocol stack instance, and if the target socket has an associated protocol stack instance, determine the association with the target socket.
- the second protocol stack instance performs protocol processing on the first data packet by using the target socket and the second protocol stack instance, for example, adding the first data packet to the APP data sending queue of the target socket,
- the linked list is associated with the protocol stack corresponding to the second protocol stack instance, and the APP data sending queue of the target socket is polled
- the second protocol stack instance has a target socket of the association relationship.
- the control message is added to the receive queue of the target protocol stack instance of the target socket; the parent protocol stack instance of the target socket is used to create the target socket.
- the control stack message is used to indicate that the first data packet is subjected to protocol processing; when the control message in the receive queue is polled, the control message is parsed to obtain the a first data packet; performing protocol processing on the first data packet by using the parent protocol stack instance.
- the lower layer protocol processing and the upper layer protocol processing together complete the complete protocol processing of the data packet, for example, the underlying protocol processing completes the protocol processing of the three layers and the following specified in the OSI of the data packet, and the upper layer protocol processing is completed.
- the four-layer and above protocol processing specified in the OSI, the low-level protocol processing and the upper layer protocol processing together complete the seven-layer protocol processing specified in the OSI of the data packet.
- the communication interface 92 is further configured to add the first data packet processed by the protocol to a sending queue of the network card, so that the network card sends the first data packet after the protocol processing.
- the functional modules of the data packet processing apparatus of the parallel protocol stack example provided in this embodiment may be used to execute the data packet processing method flow of the parallel protocol stack example shown in FIG. 3 and FIG. 4, and the specific working principle is not described herein. Description of method embodiments.
- the first protocol stack instance is used to perform low-level protocol processing on the data packet that is offloaded to the first protocol stack instance, and the target socket required for the upper layer protocol processing of the data packet processed by the lower layer protocol is determined, and the target is passed.
- the socket determines the associated second protocol stack instance, and uses the target socket and the second protocol stack instance to perform upper layer protocol processing on the data packet processed by the lower layer protocol, because the lower layer protocol processing in the protocol processing is completed by different protocol stacks respectively.
- the part and the upper layer protocol processing part determine the second protocol stack instance that is processed by the upper layer protocol through the target socket, thereby solving the problem that the protocol package instance specified by the APP conflicts with the protocol stack instance specified by the network card, and the protocol cannot be processed by the protocol.
- the aforementioned program can be stored in a computer readable storage medium.
- the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, disk, or optical disk, etc., which can be stored.
- the medium of the program code includes: ROM, RAM, disk, or optical disk, etc., which can be stored.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
Claims (32)
- 一种基于并行协议栈实例的数据包处理方法,其特征在于,所述并行协议栈实例中至少包括第一协议栈实例和第二协议栈实例,所述方法包括:利用所述第一协议栈实例对网卡向所述第一协议栈实例分流的所述数据包进行低层协议处理;确定对所述低层协议处理后的所述数据包进行上层协议处理所需的目标套接字socket;根据所述目标socket,确定与所述目标socket关联的第二协议栈实例;利用所述目标socket和所述第二协议栈实例对所述低层协议处理后的所述数据包进行所述上层协议处理;其中,所述低层协议处理和所述上层协议处理共同完成对所述数据包的完整协议处理。
- 根据权利要求1所述的方法,其特征在于,所述根据所述目标socket,确定与所述目标socket关联的第二协议栈实例,包括:根据亲和性图谱中所述目标socket与所述并行协议栈实例包含的每个协议栈实例之间的亲和性,确定与所述目标socket关联的所述第二协议栈实例;所述目标socket与所述每个协议栈实例之间的亲和性用于指示所述网卡向所述每个协议栈实例已分流的数据包中,需要利用所述目标socket进行上层协议处理的数据包数量。
- 根据权利要求2所述的方法,其特征在于,所述根据亲和性图谱中所述目标socket与所述并行协议栈实例包含的每个协议栈实例之间的亲和性,确定与所述目标socket关联的所述第二协议栈实例之前,还包括:根据所述低层协议处理后的所述数据包的个数,更新所述亲和性图谱中所记载的所述目标socket与所述第一协议栈实例之间的亲和性。
- 根据权利要求3所述的方法,其特征在于,所述根据所述低层协议处理后的所述数据包的个数,更新所述亲和性图谱中所记载的所述目标socket与所述第一协议栈实例之间的亲和性之后,还包括:判断n×A是否大于B,其中,A为所述目标socket与所述第一协议栈 实例之间的亲和性,B为所述亲和性图谱中记载的所述目标socket与关联的协议栈实例之间的亲和性,n为预设系数;则所述根据亲和性图谱中所述目标socket与所述并行协议栈实例包含的每个协议栈实例之间的亲和性,确定与所述目标socket关联的所述第二协议栈实例,包括:若n×A不大于B,则确定将所述亲和性图谱中记载的所述目标socket关联的协议栈实例作为与所述目标socket关联的所述第二协议栈实例。
- 根据权利要求4所述的方法,其特征在于,所述根据亲和性图谱中所述目标socket与所述并行协议栈实例包含的每个协议栈实例之间的亲和性,确定与所述目标socket关联的所述第二协议栈实例,还包括:若n×A大于B,则将所述第一协议栈实例确定为与所述目标socket关联的所述第二协议栈实例,并将所述亲和性图谱中记载的所述目标socket关联的协议栈实例更新为所述第一协议栈实例。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述确定对所述低层协议处理后的所述数据包进行上层协议处理所需的目标套接字socket,包括:在socket表中进行检索,获得对所述低层协议处理后的所述数据包进行上层协议处理所需的所述目标socket。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述利用所述目标socket和所述第二协议栈实例对所述低层协议处理后的所述数据包进行所述上层协议处理,包括:将所述低层协议处理后的所述数据包加入到所述目标socket的底层数据接收队列中;当根据所述第二协议栈实例对应的协议栈实例关联链表,轮询到所述目标socket时,利用所述第二协议栈实例对所述底层数据接收队列中的所述数据包进行所述上层协议处理;所述第二协议栈实例对应的协议栈实例关联链表用于指示与所述第二协议栈实例存在关联关系的socket。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述确定对所述低层协议处理后的所述数据包进行上层协议处理所需的目标套接字socket之前,还包括:利用所述并行协议栈实例包括的各协议栈实例中的一个父协议栈实例, 创建与所述各协议栈实例均不存在关联关系的所述目标socket;所述父协议栈实例是应用APP采用随机方式或者参数指定方式或者负载均衡方式选定的。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:接收所述应用APP发送的第一数据包;确定对所述第一数据包进行协议处理所需要的所述目标套接字socket;确定与所述目标socket关联的所述第二协议栈实例;利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理。
- 一种基于并行协议栈实例的数据包处理方法,其特征在于,所述并行协议栈实例中至少包括第一协议栈实例和第二协议栈实例,所述方法包括:接收应用APP发送的第一数据包;确定对所述第一数据包进行协议处理所需要的目标套接字socket;根据所述目标socket与第二协议栈实例的关联关系,确定与所述目标socket关联的所述第二协议栈实例;利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理;其中,所述目标socket与所述第二协议栈实例的关联关系,是所述第一协议栈实例和所述第二协议栈实例对第二数据包进行协议处理时确定的,所述第一协议栈实例对所述第二数据包进行低层协议处理,所述第二协议栈实例对所述第二数据包进行上层协议处理,所述低层协议处理和所述上层协议处理共同完成对所述第二数据包的完整协议处理。
- 根据权利要求10所述的方法,其特征在于,所述利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理,包括:将所述第一数据包加入到所述目标socket的APP数据发送队列中;当根据所述第二协议栈实例对应的协议栈实例关联链表,轮询到所述目标socket的APP数据发送队列时,利用所述目标socket和所述第二协议栈实例对所述APP数据发送队列中的所述第一数据包分别进行低层协议处理和上层协议处理;所述第二协议栈实例对应的协议栈实例关联链表用于指示 与所述第二协议栈实例存在关联关系的socket。
- 根据权利要求10所述的方法,其特征在于,所述根据所述目标socket与第二协议栈实例的关联关系,确定与所述目标socket关联的第二协议栈实例,包括:根据亲和性图谱,判断所述目标socket是否存在关联的协议栈实例;所述亲和性图谱用于记载与所述目标socket关联的协议栈实例;若所述目标socket存在关联的协议栈实例,则确定所述与所述目标socket关联的协议栈实例为所述第二协议栈实例。
- 根据权利要求12所述的方法,其特征在于,所述方法还包括:若所述目标socket不存在关联的协议栈实例,则将控制消息加入到所述目标socket的父协议栈实例的接收队列中;所述目标socket的父协议栈实例是用于创建所述目标socket的协议栈实例;所述控制消息用于指示对所述第一数据包进行协议处理;当轮询到所述父协议栈实例的接收队列中的所述控制消息时,对所述控制消息进行解析,获得所述第一数据包;利用所述父协议栈实例对所述第一数据包进行协议处理;将所述亲和性图谱中记载的所述目标socket关联的协议栈实例更新为所述父协议栈实例。
- 根据权利要求10-13任一项所述的方法,其特征在于,所述确定对所述第一数据包进行协议处理所需要的目标套接字socket,包括:在socket表中进行检索,确定对所述第一数据包进行协议处理所需的所述目标socket。
- 根据权利要求13所述的方法,其特征在于,所述确定对所述第一数据包进行协议处理所需要的目标套接字socket之前,还包括:利用所述父协议栈实例,创建与所述并行协议栈实例包括的各协议栈实例均不存在关联关系的所述目标socket,所述父协议栈实例是所述APP采用随机方式或者参数指定方式或者负载均衡方式在所述各协议栈实例中选定的。
- 根据权利要求10-13任一项所述的方法,其特征在于,所述利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理之后,还包括:将所述协议处理后的第一数据包加入到网卡的发送队列中,以使所述网卡发送所述协议处理后的第一数据包。
- 一种基于并行协议栈实例的数据包处理装置,其特征在于,所述并行协议栈实例中至少包括第一协议栈实例和第二协议栈实例,所述装置包括:低层处理模块,用于利用所述第一协议栈实例对网卡向所述第一协议栈实例分流的所述数据包进行低层协议处理;第一确定模块,用于确定对所述低层协议处理后的所述数据包进行上层协议处理所需的目标套接字socket;第二确定模块,用于根据所述目标socket,确定与所述目标socket关联的第二协议栈实例;上层处理模块,用于利用所述目标socket和所述第二协议栈实例对所述低层协议处理后的所述数据包进行所述上层协议处理;其中,所述低层协议处理模块和所述上层协议处理模块共同完成对所述数据包的完整协议处理。
- 根据权利要求17所述的装置,其特征在于,所述第二确定模块,具体用于根据亲和性图谱中所述目标socket与所述并行协议栈实例包含的每个协议栈实例之间的亲和性,确定与所述目标socket关联的所述第二协议栈实例;所述目标socket与所述每个协议栈实例之间的亲和性用于指示所述网卡向所述每个协议栈实例已分流的数据包中,需要利用所述目标socket进行上层协议处理的数据包数量。
- 根据权利要求18所述的装置,其特征在于,所述装置,还包括:更新模块,用于根据所述低层协议处理后的所述数据包的个数,更新所述亲和性图谱中所记载的所述目标socket与所述第一协议栈实例之间的亲和性。
- 根据权利要求19所述的装置,其特征在于,所述装置,还包括:判断模块,用于判断n×A是否大于B,其中,A为所述目标socket与所述第一协议栈实例之间的亲和性,B为所述亲和性图谱中记载的所述目标socket与关联的协议栈实例之间的亲和性,n为预设系数;则所述第二确定模块,包括:第一确定单元,用于若n×A不大于B,则确定将所述亲和性图谱中记 载的所述目标socket关联的协议栈实例作为与所述目标socket关联的所述第二协议栈实例。
- 根据权利要求20所述的装置,其特征在于,所述第二确定模块,还包括:第二确定单元,用于若n×A大于B,则将所述第一协议栈实例确定为与所述目标socket关联的所述第二协议栈实例,并将所述亲和性图谱中记载的所述目标socket关联的协议栈实例更新为所述第一协议栈实例。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述第一确定模块,具体用于在socket表中进行检索,获得对所述低层协议处理后的数据包进行上层协议处理所需的所述目标socket。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述上层处理模块,包括:队列单元,用于将所述低层协议处理后的所述数据包加入到所述目标socket的底层数据接收队列中;上层处理单元,用于当根据所述第二协议栈实例对应的协议栈实例关联链表,轮询到所述目标socket时,利用所述第二协议栈实例对所述底层数据接收队列中的所述数据包进行所述上层协议处理;所述第二协议栈实例对应的协议栈实例关联链表用于指示与所述第二协议栈实例存在关联关系的socket。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述装置,还包括:创建模块,用于利用所述并行协议栈实例包括的各协议栈实例中的一个父协议栈实例,创建与所述各协议栈实例均不存在关联关系的所述目标socket;所述父协议栈实例是应用APP采用随机方式或者参数指定方式或者负载均衡方式选定的。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述装置,还包括:接收模块,用于接收所述应用APP发送的第一数据包;所述第一确定模块,还用于确定对所述第一数据包进行协议处理所需要的所述目标套接字socket;所述第二确定模块,还用于确定对所述第一数据包进行协议处理所需要 的所述目标套接字socket之后,确定与所述目标socket关联的所述第二协议栈实例;协议处理模块,用于利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理。
- 一种基于并行协议栈实例的数据包处理装置,其特征在于,所述并行协议栈实例中至少包括第一协议栈实例和第二协议栈实例,所述装置包括:接收模块,用于接收应用APP发送的第一数据包;第一确定模块,用于确定对所述第一数据包进行协议处理所需要的目标套接字socket;第二确定模块,用于根据所述目标socket与第二协议栈实例的关联关系,确定与所述目标socket关联的所述第二协议栈实例;第一处理模块,用于利用所述目标socket和所述第二协议栈实例,对所述第一数据包进行协议处理;其中,所述目标socket与所述第二协议栈实例的关联关系,是所述第一协议栈实例和所述第二协议栈实例对第二数据包进行协议处理时确定的,所述第一协议栈实例对所述第二数据包进行低层协议处理,所述第二协议栈实例对所述第二数据包进行上层协议处理,所述低层协议处理和所述上层协议处理共同完成对所述第二数据包的完整协议处理。
- 根据权利要求26所述的装置,其特征在于,所述第一处理模块,包括:队列单元,用于将所述第一数据包加入到所述目标socket的APP数据发送队列中;处理单元,用于当根据所述第二协议栈实例对应的协议栈实例关联链表,轮询到所述目标socket的APP数据发送队列时,利用所述目标socket和所述第二协议栈实例对所述APP数据发送队列中的所述第一数据包分别进行低层协议处理和上层协议处理;所述第二协议栈实例对应的协议栈实例关联链表用于指示与所述第二协议栈实例存在关联关系的socket。
- 根据权利要求26所述的装置,其特征在于,所述第二确定模块,包括:判断单元,用于根据亲和性图谱,判断所述目标socket是否存在关联的 协议栈实例;所述亲和性图谱用于记载与所述目标socket关联的协议栈实例;确定单元,用于若所述目标socket存在关联的协议栈实例,则确定所述与所述目标socket关联的协议栈实例为所述第二协议栈实例。
- 根据权利要求28所述的装置,其特征在于,所述装置,还包括:队列模块,用于若所述目标socket不存在关联的协议栈实例,则将控制消息加入到所述目标socket的父协议栈实例的接收队列中;所述目标socket的父协议栈实例是用于创建所述目标socket的协议栈实例;所述控制消息用于指示对所述第一数据包进行协议处理;解析模块,用于当轮询到所述父协议栈实例的接收队列中的所述控制消息时,对所述控制消息进行解析,获得所述第一数据包;第二处理模块,用于利用所述父协议栈实例对所述第一数据包进行协议处理;更新模块,用于将所述亲和性图谱中记载的所述目标socket关联的协议栈实例更新为所述父协议栈实例。
- 根据权利要求26-29任一项所述的装置,其特征在于,所述第一确定模块,具体用于在socket表中进行检索,确定对所述第一数据包进行协议处理所需的所述目标socket。
- 根据权利要求29所述的装置,其特征在于,所述装置,还包括:创建模块,用于利用所述父协议栈实例,创建与所述并行协议栈实例包括的各协议栈实例均不存在关联关系的所述目标socket,所述父协议栈实例是所述APP采用随机方式或者参数指定方式或者负载均衡方式在所述各协议栈实例中选定的。
- 根据权利要求26-29任一项所述的装置,其特征在于,所述装置,还包括:发送模块,用于将所述协议处理后的第一数据包加入到网卡的发送队列中,以使所述网卡发送所述协议处理后的第一数据包。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016549111A JP6359111B2 (ja) | 2014-01-29 | 2014-11-19 | 並列プロトコル・スタック・インスタンスに基づいてデータパケットを処理する方法および装置 |
EP14880468.5A EP3091706B1 (en) | 2014-01-29 | 2014-11-19 | Data packet processing method and apparatus based on parallel protocol stack instances |
US15/222,753 US10069947B2 (en) | 2014-01-29 | 2016-07-28 | Method and apparatus for processing data packet based on parallel protocol stack instances |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410043721.0A CN104811431B (zh) | 2014-01-29 | 2014-01-29 | 基于并行协议栈实例的数据包处理方法和装置 |
CN201410043721.0 | 2014-01-29 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/222,753 Continuation US10069947B2 (en) | 2014-01-29 | 2016-07-28 | Method and apparatus for processing data packet based on parallel protocol stack instances |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015113435A1 true WO2015113435A1 (zh) | 2015-08-06 |
Family
ID=53695928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/091614 WO2015113435A1 (zh) | 2014-01-29 | 2014-11-19 | 基于并行协议栈实例的数据包处理方法和装置 |
Country Status (5)
Country | Link |
---|---|
US (1) | US10069947B2 (zh) |
EP (1) | EP3091706B1 (zh) |
JP (1) | JP6359111B2 (zh) |
CN (1) | CN104811431B (zh) |
WO (1) | WO2015113435A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020224300A1 (zh) * | 2019-05-06 | 2020-11-12 | 创新先进技术有限公司 | 基于用户态协议栈的报文分流方法、装置及系统 |
US10904719B2 (en) | 2019-05-06 | 2021-01-26 | Advanced New Technologies Co., Ltd. | Message shunting method, device and system based on user mode protocol stack |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108270813B (zh) * | 2016-12-30 | 2021-02-12 | 华为技术有限公司 | 一种异构多协议栈方法、装置及系统 |
CN108667864B (zh) * | 2017-03-29 | 2020-07-28 | 华为技术有限公司 | 一种进行资源调度的方法和装置 |
WO2019019023A1 (zh) | 2017-07-25 | 2019-01-31 | Oppo广东移动通信有限公司 | 切换方法、接入网设备和终端设备 |
AU2018446009A1 (en) | 2018-10-15 | 2021-05-06 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Wireless communication method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217464A (zh) * | 2007-12-28 | 2008-07-09 | 北京大学 | 一种udp数据包的传输方法 |
CN101227504A (zh) * | 2008-02-18 | 2008-07-23 | 华为技术有限公司 | 一种实现协议栈之间切换的方法及装置 |
CN101399692A (zh) * | 2007-09-27 | 2009-04-01 | 华为技术有限公司 | 业务迁移的方法和系统 |
Family Cites Families (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002502189A (ja) * | 1998-01-29 | 2002-01-22 | ブリティッシュ・テレコミュニケーションズ・パブリック・リミテッド・カンパニー | 移動データ転送用通信システム |
US7647414B2 (en) | 2002-07-26 | 2010-01-12 | Broadcom Corporation | System and method for managing multiple stack environments |
CA2408474A1 (en) * | 2002-10-17 | 2004-04-17 | Ibm Canada Limited-Ibm Canada Limitee | Apparatus and method for enabling efficient multi-protocol database transaction processing |
US7802001B1 (en) * | 2002-10-18 | 2010-09-21 | Astute Networks, Inc. | System and method for flow control within a stateful protocol processing system |
US7562145B2 (en) * | 2003-08-28 | 2009-07-14 | International Business Machines Corporation | Application instance level workload distribution affinities |
US7734829B2 (en) | 2004-06-09 | 2010-06-08 | Emc Corporation | Methods, systems, and computer program products for transparently controlling communications between network applications and a plurality of network communications protocol stacks using deferred protocol stack association |
US7808983B2 (en) * | 2004-07-08 | 2010-10-05 | Cisco Technology, Inc. | Network device architecture for centralized packet processing |
US20070242671A1 (en) | 2006-04-13 | 2007-10-18 | Christenson David A | Method and Apparatus for Routing Data Packets Between Different Internet Communications Stack Instances |
CN1870654A (zh) | 2006-06-21 | 2006-11-29 | 中国科学院计算技术研究所 | 一种支持ipv4和ipv6双协议栈网络通信模块的实现方法 |
DE602007013652D1 (de) * | 2006-08-04 | 2011-05-19 | Canon Kk | Kommunikationsvorrichtung und Kommunikationssteuerungsverfahren |
CN101132456B (zh) | 2006-08-22 | 2011-08-10 | 中兴通讯股份有限公司 | 蓝牙多功能遥控器装置及其实现语音通信的方法 |
US7715428B2 (en) | 2007-01-31 | 2010-05-11 | International Business Machines Corporation | Multicore communication processing |
PT103744A (pt) | 2007-05-16 | 2008-11-17 | Coreworks S A | Arquitectura de acesso ao núcleo de rede. |
CN101415025B (zh) | 2008-09-28 | 2011-09-07 | 中控科技集团有限公司 | 网络数据处理的方法、装置和系统 |
CN101426027B (zh) | 2008-10-28 | 2012-06-06 | 华为技术有限公司 | 面向分布式虚拟机监控器的底层通信方法 |
US8849972B2 (en) | 2008-11-25 | 2014-09-30 | Polycom, Inc. | Method and system for dispatching received sessions between a plurality of instances of an application using the same IP port |
CN101541098A (zh) | 2008-12-19 | 2009-09-23 | 中国移动通信集团浙江有限公司 | 移动通信中的协议栈仿真方法 |
CN101867558B (zh) | 2009-04-17 | 2012-11-14 | 深圳市永达电子股份有限公司 | 用户态网络协议栈系统及处理报文的方法 |
CN101931584A (zh) | 2009-06-22 | 2010-12-29 | 中兴通讯股份有限公司 | 支持同一系统中多种协议栈之间数据转发的方法和系统 |
CN101656677B (zh) | 2009-09-18 | 2011-11-16 | 杭州迪普科技有限公司 | 一种报文分流处理方法及装置 |
WO2012105677A1 (ja) * | 2011-02-04 | 2012-08-09 | 日本電気株式会社 | パケット処理装置、パケット処理方法およびプログラム |
CN102523208A (zh) | 2011-12-06 | 2012-06-27 | 无锡聚云科技有限公司 | 多核架构下的应用层协议并行处理方法 |
CN104811432A (zh) | 2014-01-29 | 2015-07-29 | 华为技术有限公司 | 基于并行协议栈实例的数据包处理方法和装置 |
-
2014
- 2014-01-29 CN CN201410043721.0A patent/CN104811431B/zh active Active
- 2014-11-19 JP JP2016549111A patent/JP6359111B2/ja active Active
- 2014-11-19 WO PCT/CN2014/091614 patent/WO2015113435A1/zh active Application Filing
- 2014-11-19 EP EP14880468.5A patent/EP3091706B1/en active Active
-
2016
- 2016-07-28 US US15/222,753 patent/US10069947B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101399692A (zh) * | 2007-09-27 | 2009-04-01 | 华为技术有限公司 | 业务迁移的方法和系统 |
CN101217464A (zh) * | 2007-12-28 | 2008-07-09 | 北京大学 | 一种udp数据包的传输方法 |
CN101227504A (zh) * | 2008-02-18 | 2008-07-23 | 华为技术有限公司 | 一种实现协议栈之间切换的方法及装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020224300A1 (zh) * | 2019-05-06 | 2020-11-12 | 创新先进技术有限公司 | 基于用户态协议栈的报文分流方法、装置及系统 |
US10904719B2 (en) | 2019-05-06 | 2021-01-26 | Advanced New Technologies Co., Ltd. | Message shunting method, device and system based on user mode protocol stack |
Also Published As
Publication number | Publication date |
---|---|
EP3091706B1 (en) | 2020-01-08 |
US20160337483A1 (en) | 2016-11-17 |
US10069947B2 (en) | 2018-09-04 |
JP2017509055A (ja) | 2017-03-30 |
EP3091706A4 (en) | 2016-12-28 |
CN104811431A (zh) | 2015-07-29 |
CN104811431B (zh) | 2018-01-16 |
EP3091706A1 (en) | 2016-11-09 |
JP6359111B2 (ja) | 2018-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11451476B2 (en) | Multi-path transport design | |
WO2015113435A1 (zh) | 基于并行协议栈实例的数据包处理方法和装置 | |
US10044616B2 (en) | Co-existence of routable and non-routable RDMA solutions on the same network interface | |
CN110050448B (zh) | 管理多播业务的系统和方法 | |
US8634415B2 (en) | Method and system for routing network traffic for a blade server | |
CN103477588B (zh) | 刀片服务器中刀片间网络业务的分类和管理方法和系统 | |
US9602428B2 (en) | Method and apparatus for locality sensitive hash-based load balancing | |
US20130148546A1 (en) | Support for converged traffic over ethernet link aggregation (lag) | |
US11496599B1 (en) | Efficient flow management utilizing control packets | |
JP2017517220A (ja) | OpenFlow通信方法及びシステム、制御部、並びにサービスゲートウェイ | |
CN114915587B (zh) | 流表老化管理方法及相关设备 | |
WO2015165270A1 (zh) | 一种数据包处理方法及设备 | |
CN109361749B (zh) | 报文处理方法、相关设备及计算机存储介质 | |
WO2019084805A1 (zh) | 一种分发报文的方法及装置 | |
KR101984846B1 (ko) | 객체 이동성을 제공하는 통신 방법 및 장치 | |
WO2014067055A1 (zh) | 流表刷新的方法及装置 | |
JP6279970B2 (ja) | プロセッサ、通信装置、通信システム、通信方法およびコンピュータプログラム | |
US12010195B2 (en) | Efficient flow management utilizing control packets |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14880468 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2016549111 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
REEP | Request for entry into the european phase |
Ref document number: 2014880468 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2014880468 Country of ref document: EP |