Network packet processing method and apparatus and network server
AssigneeHuawei Technologies Co., Ltd.
InventorsRujie Chen, Kai Zheng, Maoqing Huang
Life of this patent
Estimating the term…
Abstract
The application discloses a network packet processing method and a network server. The method discloses that a network apparatus receives a first TCP packet sent by a client, where the first TCP packet includes a first quintuple and then the network apparatus determines a first thread that processes the first TCP packet according to the first quintuple and processes the first TCP packet by using the first thread.
Claims20
A network packet processing method, comprising:
- receiving a first Transmission Control Protocol (TCP) packet sent by a client, wherein the first TCP packet comprises a first quintuple;
- determining, according to the first quintuple, a first thread that processes the first TCP packet, wherein the first quintuple is used to identify a TCP connection corresponding to the first TCP packet, a TCP connection status of the TCP connection is an unsteady TCP connection or a steady TCP connection, the unsteady TCP connection represents a TCP connection in an establishment process or a disconnection process, the steady TCP connection represents a TCP connection in a data transmission process, the first thread is a control thread or a data processing thread, the control thread is used to process the unsteady TCP connection, and the data processing thread is used to process the steady TCP connection;
- and
- processing the first TCP packet by using the first thread.
A network server, comprising:
- a processor, a receiver, and a memory, wherein the processor, the receiver, and the memory are connected to a communications bus, the memory stores a set of program code, and the processor is configured to call the program code stored in the memory to perform the following steps:
- receiving, by the receiver, a first Transmission Control Protocol (TCP) packet sent by a client, wherein the first TCP packet comprises a first quintuple;
- determining, by the processor, according to the first quintuple, a first thread that processes the first TCP packet, wherein the first quintuple is used to identify a TCP connection corresponding to the first TCP packet, a TCP connection status of the TCP connection is an unsteady TCP connection or a steady TCP connection, the unsteady TCP connection represents a TCP connection in an establishment process or a disconnection process, the steady TCP connection represents a TCP connection in a data transmission process, the first thread is a control thread or a data processing thread, the control thread is used to process the unsteady TCP connection, and the data processing thread is used to process the steady TCP connection;
- and
- processing, by the processor, the first TCP packet by using the first thread.
A non-transitory computer-readable medium storing computer instructions of a method for network packet processing, that when executed by one or more processors, cause the one or more processors to perform the method, which comprises:
- receiving a first Transmission Control Protocol (TCP) packet sent by a client, wherein the first TCP packet comprises a first quintuple;
- determining, according to the first quintuple, a first thread that processes the first TCP packet, wherein the first quintuple is used to identify a TCP connection corresponding to the first TCP packet, a TCP connection status of the TCP connection is an unsteady TCP connection or a steady TCP connection, the unsteady TCP connection represents a TCP connection in an establishment process or a disconnection process, the steady TCP connection represents a TCP connection in a data transmission process, the first thread is a control thread or a data processing thread, the control thread is used to process the unsteady TCP connection, and the data processing thread is used to process the steady TCP connection;
- and
- processing the first TCP packet by using the first thread.
Dependencies are inferred from the claim text.