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, wherein:
- a TCP connection status of the TCP connection is an unsteady TCP connection or a steady TCP connection, wherein the unsteady TCP connection represents a TCP connection in an establishment process or a disconnection process, and 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, wherein 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
- determining the first thread comprises:
- in response to determining that the TCP connection is the unsteady TCP connection, determining the control thread as the first thread;
- or
- in response to determining that the TCP connection is the steady TCP connection, determining the data processing thread as the first thread;
- and
- processing the first TCP packet by using the first thread.
A network server, comprising:
- at least one processor, at least one receiver, and one or more memories, wherein the at least one processor, the at least one receiver, and the one or more memories are connected to a communications bus, wherein the one or more memories store programming instructions for execution by the at least one processor to:
- receive, by the receiver, a first Transmission Control Protocol (TCP) packet sent by a client, wherein the first TCP packet comprises a first quintuple;
- determine, by the at least one 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, wherein:
- 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, and 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
- determining the first thread comprises:
- in response to determining that the TCP connection is the unsteady TCP connection, determining the control thread as the first thread;
- or
- in response to determining that the TCP connection is the steady TCP connection, determining the data processing thread as the first thread;
- and
- process, by the at least one processor, the first TCP packet by using the first thread.
A non-transitory computer-readable medium storing computer instructions for network packet processing, that when executed by one or more processors, cause the one or more processors to:
- receive a first Transmission Control Protocol (TCP) packet sent by a client, wherein the first TCP packet comprises a first quintuple;
- determine, 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, wherein:
- a TCP connection status of the TCP connection is an unsteady TCP connection or a steady TCP connection, wherein 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, wherein 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
- determining the first thread comprises:
- in response to determining that the TCP connection is the unsteady TCP connection, determining the control thread as the first thread;
- or
- in response to determining that the TCP connection is the steady TCP connection, determining the data processing thread as the first thread;
- and
- process the first TCP packet by using the first thread.
Dependencies are inferred from the claim text.