Method for dynamic matching of message through prejudging
A dynamic matching and pre-judgment technology, applied in the field of computer networks, can solve problems such as packet loss and high CPU usage
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2013-07-03
- Estimated Expiration
- Not applicable · inactive patent
Smart Images
Figure 1
Abstract
Description
technical field
[0001] The invention relates to the field of computer networks, in particular to a method for dynamically matching messages through pre-judgment. Background technique
[0002] Current network devices, especially multi-core architecture network devices, mostly use connection tables to forward packets. Compared with packet-by-packet processing, packet-by-flow processing can greatly improve the processing and forwarding speed of packets. An IP quintuple forms a table entry. The IP quintuple is the original IP address, destination IP address, protocol number, original port number, and destination port number. Packets with the same IP quintuple will be matched to the same table. item, and perform the same processing on the message.
[0003] When performing a stability test and a maximum number of connections test on a network device, the tester usually creates at least 1 million connections, and then keeps alive each connection, and continuously creates connectio...
Examples
Embodiment Construction
[0015] A method for dynamically matching messages through pre-judgment proposed by the present invention will be described in detail below with reference to the drawings and embodiments.
[0016] Such as figure 1 As shown, this embodiment provides a method for dynamically matching packets through pre-judgment, including the following steps:
[0017] S1. The CPU receives the message, and judges whether the message matches the first entry in the connection table, if it matches, then executes step S2, and if not, then executes step S3;
[0018] S2. The message is a keep-alive connection message, and the entry is placed at the end of the link table;
[0019] S3. The message is a new connection message, and a new entry is created in the connection table, and the entry is placed at the end of the link table.
[0020] Preferably, before the CPU receives the message, a step S0 is further included: the tester keeps alive the existing connection and creates a new connection.
[0021]...