CN102123082A - Packet forwarding method and equipment - Google Patents

Packet forwarding method and equipment Download PDF

Info

Publication number
CN102123082A
CN102123082A CN2011100085059A CN201110008505A CN102123082A CN 102123082 A CN102123082 A CN 102123082A CN 2011100085059 A CN2011100085059 A CN 2011100085059A CN 201110008505 A CN201110008505 A CN 201110008505A CN 102123082 A CN102123082 A CN 102123082A
Authority
CN
China
Prior art keywords
packet
field value
protocol stack
stack result
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011100085059A
Other languages
Chinese (zh)
Inventor
王云华
李金虎
刘金成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2011100085059A priority Critical patent/CN102123082A/en
Publication of CN102123082A publication Critical patent/CN102123082A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a packet forwarding method and equipment which relate to the field of network communication and are used for improving the packet forwarding efficiency of communication equipment. In the invention, when the packet to be forwarded is received, the communication equipment searches for the recorded protocol stack processing result of a historical packet belonging to the same data stream as the packet to be forwarded, processes the packet to be forwarded according to the searched protocol stack processing result, and forwards the processed packet. According to the invention, as the protocol stack processing is not needed for each received packet to be forwarded, and the packet to be forwarded can be processed according to the protocol stack processing result of the recorded historical packet, the processing time of the packet to be forwarded is shortened, and the packet forwarding efficiency of the communication equipment is greatly improved.

Description

Data packet forwarding method and equipment
Technical field
The present invention relates to network communication field, relate in particular to a kind of data packet forwarding method and equipment.
Background technology
In network communication field, some communication equipment is to come the transmission network packet by software as modulator-demodulator (modem), and whether promptly all network packet are all handled the back decision by CPU and transmitted and how to transmit.
Modem has two kinds of application models usually: bridge and route.Through the packet that modem transmits, such as the packet that receives from the LAN mouth, or walk two layers of bridge and transmit, or walk the wan interface of three layers of route by PPPoE or IPoE and send, handle through numerous protocol stacks in the middle of this.For example walk the packet of two layers of bridge, need to handle, search with update content addressable memory (CAM) and show, determine processes such as forwarding interface through various filtering rules; And when walking three layers of route, then to search numerous flow processs such as coupling, route querying coupling, NAT conversion one by one through the various tables (NAT table, MANGLE table, FILTER table) of IPTABLES, cause the processing time of a packet very long.Under the lower situation of cpu performance, during big flow ground transceive data bag, CPU can't in time handle packet, thereby can cause packet loss, has influenced the throughput of equipment.
At present, mainly by using high performance processor to solve this class performance issue, still, often price is also high owing to high-performance processor, and the increase that this just causes product cost has weakened product competitiveness.
In realizing process of the present invention, the inventor finds to exist in the prior art following technical problem:
Communication equipment is before the packet that forwarding receives, need carry out complicated protocol stack to this packet handles, make longer to the processing time of packet, cause communication equipment comparatively low to the forward efficiency of packet, when big flow ground transceive data bag, can't in time handle, can cause packet loss, influence the throughput of equipment packet.
Summary of the invention
The embodiment of the invention provides a kind of data packet forwarding method and equipment, is used to improve the forward efficiency of communication equipment to packet.
A kind of data packet forwarding method, this method comprises:
Receive when waiting to transmit packet, search the protocol stack result of the historical data bag of record, described historical data bag is the packet that belongs to same data flow with packet described to be transmitted;
When finding the protocol stack result of historical data bag, according to this protocol stack result packet described to be transmitted is handled, and the packet after will handling forwards.
A kind of packet forwarding unit, this equipment comprises:
Receiving element is used for receiving packet to be transmitted;
Search the unit, be used to search the protocol stack result of the historical data bag of record, described historical data bag is the packet that belongs to same data flow with packet described to be transmitted;
Processing unit is used for, according to this protocol stack result packet described to be transmitted being handled when searching the unit and finding the protocol stack result of historical data bag described;
Retransmission unit is used for the packet after the described processing unit processes is forwarded.
Among the present invention, communication equipment is receiving when waiting to transmit packet, that searches record belongs to the protocol stack result of the historical data bag of same data flow with this packet to be transmitted, and according to the protocol stack result that finds packet described to be transmitted is handled, the packet after will handling then forwards.As seen, among the present invention, do not need to wait that to what each received transmitting packet all carries out the protocol stack processing, handle but can treat the forwarding packet according to the protocol stack result of the historical data bag that writes down, treat the processing time of transmitting packet thereby shortened, improved the forward efficiency of communication equipment greatly packet.
Description of drawings
The method flow schematic diagram that Fig. 1 provides for the embodiment of the invention;
Fig. 2 is the schematic flow sheet of the embodiment of the invention one;
Fig. 3 is the apparatus structure schematic diagram of the embodiment of the invention two;
The device structure schematic diagram that Fig. 4 provides for the embodiment of the invention.
Embodiment
In order to improve the forward efficiency of communication equipment to packet, the embodiment of the invention provides a kind of data packet forwarding method, in this method, communication equipment is receiving when waiting to transmit packet, that searches record belongs to the protocol stack result of the packet of same data flow with this packet to be transmitted, and forwards after according to the protocol stack result that finds packet described to be transmitted being handled.
Referring to Fig. 1, a kind of data packet forwarding method that the embodiment of the invention provides specifically may further comprise the steps:
Step 10: receive when waiting to transmit packet, search the protocol stack result of the historical data bag of record, this historical data bag is the packet that belongs to same data flow with packet to be transmitted;
Step 11: determine whether to find the protocol stack result of historical data bag, if, then arrive step 12, otherwise, arrive step 13:
Step 12: treat the forwarding packet according to the protocol stack result that finds and handle, and the packet after will handling forwards;
Step 13: packet to be transmitted is carried out protocol stack handle, and record protocol stack result and the essential information of waiting to transmit packet, this essential information is the information that expression waits to transmit the data flow under the packet; Packet after then protocol stack being handled forwards.
In the step 10, search the protocol stack result of the historical data bag of record, its specific implementation can be as follows:
At first, read the essential information of waiting to transmit in the packet;
Then, from the one or more acceleration clauses and subclauses that comprise packet essential information and protocol stack result that write down, search the acceleration clauses and subclauses that comprise the essential information that reads;
At last, with the protocol stack result of the protocol stack result in the acceleration clauses and subclauses that find as described historical data bag.
As a kind of execution mode, be that described essential information comprises but is not limited to: address, source medium access control (MAC), target MAC (Media Access Control) address and VLAN field value in the time of need passing through the packet of two layers of bridges forwarding at packet to be transmitted;
Accordingly, the protocol stack result in the described acceleration clauses and subclauses comprises: one or combination in any in the VLAN field value after protocol stack is handled in the packet, qos field value, COS field value, TOS field value, the forwarding port information.
In the step 12, treat the forwarding packet according to the protocol stack result that finds and handle, its specific implementation can be as follows:
According to the protocol stack result that finds, revise one or the field value of combination in any field in the following field of waiting to transmit in the packet:
VLAN field, COS field, TOS field, qos field.
During concrete modification, the field value of the field that needs are revised, be revised as with the protocol stack result in the identical numerical value of field value of respective field.
Preferable, treat according to the protocol stack result that finds transmit packet handle after and will handle after packet forward before, can also revise the MAC address aging timer that is used to upgrade mac address forwarding table, so that the time-out time of this MAC address aging timer is delayed.
As another kind of execution mode, be that described essential information comprises but is not limited to following five-tuple information in the time of need passing through the packet of three layers of routing forwarding at packet to be transmitted:
Source IP address, purpose IP address, source port PORT sign, purpose PORT sign and transport protocol message;
Accordingly, the protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in field value in two layers of head behind the protocol stack place in the packet, source IP address, purpose IP address, source port PORT sign, purpose PORT sign, transport protocol message, qos field value, COS field value, the TOS field value.
In the step 12, treat the forwarding packet according to the protocol stack result that finds and handle, its specific implementation can be as follows:
According to the protocol stack result that finds, revise one or the field value of combination in any field in the following field of waiting to transmit in the packet:
Field, source IP address field, purpose IP address field, source port PORT field, purpose PORT field, host-host protocol field, COS field, TOS field, qos field, length field, UDP checksum field in two layers of head.
During concrete modification, the field value of the field that needs are revised, be revised as with the protocol stack result in the identical numerical value of field value of respective field.
Preferable, treat according to the protocol stack result that finds transmit packet handle after and will handle after packet forward before, can also revise and be used to upgrade the connection tracking timer of having built link information, so that the time-out time of this connection tracking timer is delayed.
Preferable, in step 10, search before the protocol stack result of historical data bag of record, can determine at first whether described to wait to transmit packet be multicast packets or broadcast packet; If determine that described to wait to transmit packet be not multicast packets or broadcast packet, then search the protocol stack result of the historical data bag of record, and carry out subsequent step, otherwise, packet described to be transmitted is carried out protocol stack handle, and the packet after the protocol stack processing is forwarded.
Below the present invention is specifically described:
Main purpose of the present invention is to simplify the intermediate link of modem handle packet, shortens the processing time of packet, does not increase equipment cost thereby reach, and can improve the purpose of throughput again.
According to one embodiment of present invention, provide a kind of data packet forwarding method, be used for the disposal ability of raising equipment packet.
This method comprises: when equipment is received pending packet, at first, analyze the essential information of this bag, be judged as the bag that can quicken after, write down these information again.Secondly, allow this wrap away normal protocol stack handling process.Once more, before packet is handled by protocol stack and be to be sent, the result of bag is noted, formed one together with essential information before and quicken clauses and subclauses, a plurality of such clauses and subclauses will form one and quicken chained list.When having packet to come again, the essential information of extracting them equally is with the comparison of the acceleration clauses and subclauses in the chained list when follow-up, and the bag that hits is then represented and can be quickened.After only the result that writes down in these clauses and subclauses need being applied to this bag, just bag can have been sent, and the protocol stack of needn't going further is handled.And the bag that does not hit then repeats step before, promptly writes down essential information and walk normal protocol stack handling process to get final product.At last, all acceleration clauses and subclauses must have an aging mechanism, are not hit or the content-addressable memory content all must be aging with the acceleration clauses and subclauses of correspondence when changing at certain hour.
Wherein, can the judgment data bag quicken to comprise: judge whether to be multicast packets or broadcast packet that by target MAC (Media Access Control) address or purpose IP address these bags can not be accelerated.
Wherein, need the essential information and the result of the packet of record to comprise: under bridge mode, the trend of a data flow is by source MAC and target MAC (Media Access Control) address decision.Therefore, this essential information comprises the source and destination MAC Address of packet, and whether is with VLAN.Result then comprises the modification that increases or remove VLAN, QoS result or COS.Simultaneously, result also comprises the influence of this packet to the protocol stack state, specifically comprises the modification of the MAC address aging timer that equipment is acquired.In addition, result also comprises the modification to the management sk_buff of packet.Under route pattern, a stream is to be determined by five-tuple (source IP, purpose IP, source PORT, purpose PORT, agreement).Concerning the packet that belongs to same stream, no matter pass through the intermediate link of how many protocol stacks, the result after the processing is the same.Such as NAT conversion (revise source, purpose MAC during transmission, revise source IP, port numbers etc.); Such as which port to send (all bags of same stream of route decision all are to send out from same port) from.Can see a stream, after allowing first bag handle through numerous and diverse protocol stack intermediate link, its result is write down, thereafter packet if belong to same stream just do not needed again by those complicated intermediate links, directly, send just passable from the designated port that writes down with the results modification message that writes down before.
Wherein, the process of searching coupling comprises: under the bridge mode, mate with the HASH value of source MAC and target MAC (Media Access Control) address.And the next HASH value with five-tuple of route pattern is mated.Different bag coupling has gone up then that proof belongs to same stream, and they have same protocol stack result.Because in the actual use, most application programs all realize by TCP or UDP, and TCP and UDP are by { IP, PORT} set up socket communication.In addition, we also are based on IP when IPTABLES is connection tracking, FILTER, MANGLE and NAT in protocol stack, and these are worth PORT and mate.Therefore, quicken, can satisfy demands of applications according to five-tuple.Certainly, under the application model of bridge, also can quicken, but consider that what use is two layers of bag when testing throughput, therefore, use the source and destination MAC Address to mate according to five-tuple.
Wherein, the modification of packet to coupling comprises:
The modification of the own content of bag: add and deletion VLAN the heavy label of COS value etc.;
To assuring the modification of reason structure sk_buff, need record: the priority that bag adopts when which port sends and sends;
Some renewals to the protocol stack internal state: packet is through protocol stack when inner, except to oneself
Having also can be influential to the state of protocol stack inside beyond revising.Two layers of forwarding have mac address forwarding table, each clauses and subclauses in the table can be regularly aging, the packet of each access arrangement is used target MAC (Media Access Control) address and is inquired about this table, search and hit, then the timer of these clauses and subclauses can upgrade, ageing time postpones, and therefore, also will upgrade this ageing timer when packet is walked to quicken; To three layers of forwarding mainly is connection tracking, and each connects all ageing timer, and after packet was walked to quicken, this timer also will upgrade;
According to another embodiment of the present invention, provide a kind of packet transfer device, packet, be used to improve the throughput of equipment.
This device comprises: data packet matched module, be used for when receiving packet, and extract the essential information of packet, and search and quicken chained list and mate; Revise sending module, the result that is used for writing down according to hit entries is revised packet, and finds the corresponding sending terminal mouth that bag is sent.Logging modle is used to write down the essential information and the result of bag after protocol stack is handled of bag.Aging module is used for the acceleration clauses and subclauses that are not hit in a period of time are deleted from chained list.
Wherein, data packet matched module comprises HASH value computing module and searches two modules of coupling.
In order to improve the chained list search efficiency, should use simply, HASH value calculating method fast, and the HASH value hash that calculates is distributed.Adopted among the present invention add up and mode calculate the HASH value.For three layers are transmitted, get low byte after only five-tuple need being added up by double byte.For two layers of forwarding, consider if only use and add up and can cause the HASH value of bidirectional flow overlapping, so adopted and multiply by 2 modes of adding purpose MAC after source MAC added up, make the HASH value of bidirectional flow to separate.When coupling, at first find that corresponding HASH chain according to the HASH value, the value with MAC Address or five-tuple compares respectively again, has only on all four same the stream that just can be judged as.
Wherein, revise sending module and further comprise and revise the content of packet own, promptly add to packet or remove VLAN, inherit and send priority, revise the length field in the PPPoE bag, revise the checksum field among the UDP according to result.Revise sending module and also comprise modification protocol stack state, promptly upgrade two layers of content-addressable memory ageing timer and three layers of connection tracking timer.
In addition, logging modle also comprises record data bag initial information, promptly transmits bag record MAC Address for two layers, and three layers of bag then write down five-tuple.Also need the result of record data bag after protocol stack is handled, comprise two layers of head, the VLAN value sends priority.
In addition, the aging module of this device comprises the aging of wearing out of two layers of accelerometer and three layers of accelerometer.Enable timer, the acceleration clauses and subclauses that are not hit in the certain hour are deleted from chained list.
In sum,, can effectively simplify the handling process of network packet, significantly improve the throughput of equipment by means of technical scheme of the present invention.
Embodiment one:
As shown in Figure 2, the method flow of present embodiment is specific as follows:
Step S101: at first analyze the information of packet after equipment is received packet, whether the judgment data bag can quicken, if, then arrive step S102, otherwise, to step S105;
Step S102: according to the essential information of packet, to quickening to inquire about the record that whether has same stream in the clauses and subclauses;
Step S103: judge to search whether hit, if, then arrive step S104, otherwise, to step S105;
Step S104: the result that writes down in the acceleration clauses and subclauses that will hit is applied to packet, promptly revises management sk_buff of packet and its correspondence and the state in the protocol stack according to this result, and to step S107;
Step S105: packet is carried out normal protocol stack handle;
Step S106: the essential information of record data bag and protocol stack result form and quicken clauses and subclauses;
Step S107: packet is sent.
That is to say, but first bag of every expedited flow all must handle through protocol stack, and before to be sent, must its result of record.Problem is, not all packet of going to here can quicken, and this all needs to judge in the entire process process of bag.Has only the bag that can quicken, just opening entry.When packet was walked two layers of forwarding, it can find destination interface according to mac address forwarding table through protocol stack the time.Therefore can judge that the VLAN value, TOS value and the COS priority that only need record to send bag of walking two layers of forwarding get final product according to this sign.If two layers of purpose transmit port that bag is corresponding be empty, what illustrate then that packet walks is three layers of forwarding, and then Ji Lu information is many: comprise two layers of head, five-tuple, TTL, the UDP checksum value of current bag, because these values of process protocol stack all can be modified.
When the acceleration clauses and subclauses are searched among the step S102 in this method, and do not know that this bag is walked two layers of forwarding or three layers are transmitted,, look for three layers of accelerometer again so look for two layers of accelerometer earlier.Herein because on the HASH chained list, search, so search rapidly.Walk normal protocol stack handling process at two all miss Bao Ze of table, and finish learning process.Search hit after, upgrade timer.Two layers need to upgrade MAC address aging timer corresponding in the two-layer retransmitting table, and three layers will be upgraded corresponding connection tracking timer.
Among the step S104, from quicken clauses and subclauses, read result, part according to this results modification packet: at first, whether add or remove VLAN, write down these stream input and output at the learning phase of first bag of this stream and whether contained VLAN, when needs remove VLAN, MAC Address can have been moved 4 bytes, backward when needs increase VLAN, MAC is moved 4 bytes forward, right or insert the 802.1Q protocol fields and the VLAN value of preservation before.Secondly, whether revise TOS, COS field and corresponding QoS priority, when the output state of first bag of record, these values are recorded, and only need to replace to get final product equally.In addition, under the route pattern, revise two layers of head, only need copy two layers of head integral body of record to packet header to be sent and get final product.In addition, also comprise the five-tuple of revising bag, ttl field and the verification and the information that recomputate the UDP bag.In order to save time, check information can not all recomputate.The method that the present invention adopts is: at first, with pressing the double byte addition after the source in the former packet, purpose IP address and source, the negate of destination slogan, obtain sum1; Secondly, get low 16 after the UDP check value negate in will bag, the sum1 addition that obtains with the first step obtains sum2 again; The 3rd, amended source, purpose IP address and source, destination slogan by the double byte addition, are obtained sum3; At last, with sum2 and sum3 with the value negate, promptly obtain new UDP verification and.Calculating will it is enough soon like this.
In addition, be noted that ICP/IP protocol regulation, the UDP bag not tape verifying and.The UDP bag that some testing equipment is sent is exactly what be not with, and just check and this field have been zero.Such bag quickens not change when sending out its check and field, otherwise has just made mistakes based on new check and the value of this zero calculating.
Also comprise the burin-in process of quickening clauses and subclauses among the step S104:
These quicken clauses and subclauses will an aging mechanism, realizes by an ageing timer and aging sign.Be hit when quickening clauses and subclauses, then upgrade aging sign, behind the timer expiry, judge that aging sign is updated, then remove this sign, wait for the arrival of next ageing time.If aging sign is eliminated, represent that then this acceleration clauses and subclauses ageing time arrives, and deletes it from chained list.
Record in the step 106 comprises: the forwarding port of record data bag correspondence, the VLAN situation after packet is modified, the priority after protocol stack is handled, amended two layers of head; And revise back COS value, ttl value, IP address, the port numbers among UDP and the TCP in three layers of head.
According to above method step, just can handle quickly and accurately and transmitted packet.
Embodiment two:
In the present embodiment, provide a kind of packet transfer device, packet, be used for the reduced data handling process, improved device throughput.As shown in Figure 3, this device comprises:
Data packet analysis matching module 201 is used for when receiving packet, extracts the essential information of packet, and searches and quicken chained list and mate; Packet is revised sending module 202, and the result that is used for writing down according to the acceleration clauses and subclauses of hitting is revised packet, and finds the corresponding sending terminal mouth that bag is sent.Packet information logging modle 203 is used to write down the essential information and the result of bag after protocol stack is handled of bag.Quicken the aging module 204 of clauses and subclauses, be used for the acceleration clauses and subclauses that are not hit in a period of time are deleted from chained list.
Wherein, data packet analysis matching module 201 comprises the calculating of HASH value and searches coupling two parts.In order to improve the chained list search efficiency, the HASH value hash that calculates is distributed.During coupling, at first find that corresponding chain of HASH value, compare respectively, have only on all four same the stream that just can be judged as in value with MAC Address or five-tuple.
Wherein, packet is revised sending module 202 and is further comprised and revise the content of packet own, promptly adds to packet according to result or removes VLAN, inherits and sends priority, revises the length field in the PPPoE bag, revise in UDP or the TCP bag verification and.Revise sending module and also comprise modification protocol stack state, promptly upgrade two layers of content-addressable memory ageing timer and three layers of connection tracking timer.
In addition, packet information logging modle 203 also comprises record data bag initial information, promptly transmits bag record MAC Address for two layers, and three layers of bag then write down five-tuple.Also need the result of record data bag after protocol stack is handled, comprise two layers of head, VLAN value, transmission priority and UDP verification with.
In addition, the aging module 204 of the acceleration clauses and subclauses of this device comprises the aging of wearing out of two layers of accelerometer and three layers of accelerometer.Enable the software timer of a 2s, odd number time aging two layers of table, even number time aging three layers of table.Be each to quicken chained list average digestion period be 4s.In the timeout treatment function, in a digestion period, the acceleration clauses and subclauses that never are hit are deleted from chained list.
In sum, the present invention can provide a kind of data packet forwarding method and device, simplify the network packet forwarding process, thereby shortening equipment is to the processing time of packet.After tested, use technical scheme of the present invention can significantly improve the throughput of equipment.
Referring to Fig. 4, the embodiment of the invention also provides a kind of packet forwarding unit, and this equipment comprises:
Packet receiver module 40 is used for receiving packet to be transmitted;
Data packet analysis matching module 41 is used to search the protocol stack result of the historical data bag of record, and described historical data bag is the packet that belongs to same data flow with packet described to be transmitted;
Packet is revised sending module 42, is used for according to this protocol stack result packet described to be transmitted being handled when finding the protocol stack result of historical data bag; Packet after handling is forwarded.
Further, described data packet analysis matching module 41 is used for:
Read the described essential information of waiting to transmit in the packet, this essential information comprises the described information of waiting to transmit the affiliated data flow of packet of expression;
From the one or more acceleration clauses and subclauses that comprise packet essential information and protocol stack result that write down, search the acceleration clauses and subclauses that comprise the essential information that reads, and the protocol stack result in the acceleration clauses and subclauses that will find is as the protocol stack result of described historical data bag.
Further, be in the time of need passing through the packet of two layers of bridges forwarding at packet described to be transmitted, the described information of transmitting the affiliated data flow of packet of waiting of described expression comprises:
Media access control MAC address, source, target MAC (Media Access Control) address and VLAN field value;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in VLAN field value after protocol stack is handled in the packet, qos field value, COS field value, TOS field value, the forwarding port information.
Further, described packet modification sending module 42 is used for:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
VLAN field value, COS field value, TOS field value, qos field value.
Further, described packet modification sending module 42 also is used for:
Modification is used to upgrade the MAC address aging timer of mac address forwarding table, so that the time-out time of this MAC address aging timer is delayed.
Further, be in the time of need passing through the packet of three layers of routing forwarding at packet described to be transmitted, the described information of transmitting the affiliated data flow of packet of waiting of described expression comprises:
Source IP address, purpose IP address, source port PORT sign, purpose PORT sign and transport protocol message;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in field value in two layers of head behind the protocol stack place in the packet, source IP address, purpose IP address, source port PORT sign, purpose PORT sign, transport protocol message, qos field value, COS field value, the TOS field value.
Further, described packet modification sending module 42 is used for:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
Field value, source IP address field value, purpose IP address field value, source port PORT field value, purpose PORT field value, host-host protocol field value, COS field value, TOS field value, qos field value, length field value, UDP checksum field value in two layers of head.
Further, described packet modification sending module 42 also is used for:
Modification is used to upgrade the connection tracking timer of having built link information, so that the time-out time of this connection tracking timer is delayed.
Further, this equipment also comprises:
Protocol stack processing module 43 is used for when not finding the protocol stack result of historical data bag, packet described to be transmitted is carried out protocol stack handle;
Packet information logging modle 44 is used for record protocol stack result and the described essential information of waiting to transmit packet, and this essential information is the described information of waiting to transmit the affiliated data flow of packet of expression; Packet after the protocol stack processing is forwarded.
Further, this equipment also comprises:
Judge module 45 is used for determining whether described to wait to transmit packet be multicast packets or broadcast packet;
Described data packet analysis matching module is used for:
Determine described when waiting to transmit packet and not being multicast packets or broadcast packet, the protocol stack result of searching the historical data bag of record.
Further, described protocol stack processing module 43 also is used for, and when definite packet described to be transmitted is multicast packets or broadcast packet, packet described to be transmitted is carried out protocol stack handle, and the packet after the protocol stack processing is forwarded.
Further, this equipment also comprises:
Quicken the aging module 46 of clauses and subclauses, be used for acceleration clauses and subclauses, carry out following burin-in process for each record:
Find at described data packet analysis matching module and promptly to hit when quickening clauses and subclauses, for this aging sign that quickens the clauses and subclauses setting is set to 1; When arrived predefined digestion period (for example 2 minutes), what be judged as this acceleration clauses and subclauses setting agingly was masked as 0 or be 1, if 0, then should quicken the clauses and subclauses deletion, if 1, then will be for this aging sign that quickens the clauses and subclauses setting reset to 0, and the arrival of waiting for next digestion period.
To sum up, beneficial effect of the present invention comprises:
In the scheme that the embodiment of the invention provides, communication equipment is receiving when waiting to transmit packet, that searches record belongs to the protocol stack result of the historical data bag of same data flow with this packet to be transmitted, and according to the protocol stack result that finds packet described to be transmitted is handled, the packet after will handling then forwards.As seen, among the present invention, do not need to wait that to what each received transmitting packet all carries out the protocol stack processing, handle but can treat the forwarding packet according to the protocol stack result of the historical data bag that writes down, treat the processing time of transmitting packet thereby shortened, improved the forward efficiency of communication equipment greatly packet.
The present invention is that reference is described according to the flow chart and/or the block diagram of method, equipment (system) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block diagram and/or square frame and flow chart and/or the block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computer or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device, make on computer or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of carrying out on computer or other programmable devices is provided for being implemented in the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic creative notion of cicada, then can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (15)

1. a data packet forwarding method is characterized in that, this method comprises:
Receive when waiting to transmit packet, search the protocol stack result of the historical data bag of record, described historical data bag is the packet that belongs to same data flow with packet described to be transmitted;
When finding the protocol stack result of historical data bag, according to this protocol stack result packet described to be transmitted is handled, and the packet after will handling forwards.
2. the method for claim 1 is characterized in that, described protocol stack result of searching the historical data bag of record comprises:
Read the described essential information of waiting to transmit in the packet, this essential information is the described information of waiting to transmit the affiliated data flow of packet of expression;
From the one or more acceleration clauses and subclauses that comprise packet essential information and protocol stack result that write down, search the acceleration clauses and subclauses that comprise the essential information that reads, and the protocol stack result in the acceleration clauses and subclauses that will find is as the protocol stack result of described historical data bag.
3. method as claimed in claim 2 is characterized in that, is that described essential information comprises in the time of need passing through the packet of two layers of bridges forwarding at packet described to be transmitted:
Media access control MAC address, source, target MAC (Media Access Control) address and VLAN field value;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in virtual LAN VLAN field value after protocol stack is handled in the packet, service quality QoS field value, COS field value, TOS field value, the forwarding port information.
4. method as claimed in claim 2 is characterized in that, is that described essential information comprises in the time of need passing through the packet of three layers of routing forwarding at packet described to be transmitted:
Source IP address, purpose IP address, source port PORT sign, purpose PORT sign and transport protocol message;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in field value behind the protocol stack place in two of packet layers of head, source IP address, purpose IP address, source port PORT sign, purpose PORT sign, transport protocol message, qos field value, COS field value, the TOS field value.
5. method as claimed in claim 3 is characterized in that, described packet described to be transmitted the processing according to this protocol stack result comprises:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
VLAN field value, COS field value, TOS field value, qos field value.
6. method as claimed in claim 4 is characterized in that, it is characterized in that, described packet described to be transmitted the processing according to this protocol stack result comprises:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
Field value, source IP address field value, purpose IP address field value, source PORT field value, purpose PORT field value, host-host protocol field value, ttl field value, COS field value, TOS field value, qos field value, length field value, User Datagram Protoco (UDP) UDP checksum field value in two layers of head.
7. the method for claim 1 is characterized in that, when not finding the protocol stack result of historical data bag, this method further comprises:
Packet described to be transmitted is carried out protocol stack handle, and record protocol stack result and the described essential information of waiting to transmit packet, this essential information is the described information of waiting to transmit the affiliated data flow of packet of expression;
Packet after the protocol stack processing is forwarded.
8. the method for claim 1 is characterized in that, before the protocol stack result of the historical data bag of searching record, this method further comprises:
Determine whether described to wait to transmit packet be multicast packets or broadcast packet;
Described protocol stack result of searching the historical data bag of record comprises:
Determine described when waiting to transmit packet and not being multicast packets or broadcast packet, the protocol stack result of searching the historical data bag of record.
9. a packet forwarding unit is characterized in that, this equipment comprises:
The packet receiver module is used for receiving packet to be transmitted;
The data packet analysis matching module is used to search the protocol stack result of the historical data bag of record, and described historical data bag is the packet that belongs to same data flow with packet described to be transmitted;
Packet is revised sending module, is used for according to this protocol stack result packet described to be transmitted being handled when finding the protocol stack result of historical data bag; Packet after handling is forwarded.
10. equipment as claimed in claim 9 is characterized in that, described data packet analysis matching module is used for:
Read the described essential information of waiting to transmit in the packet, this essential information is the described information of waiting to transmit the affiliated data flow of packet of expression;
From the one or more acceleration clauses and subclauses that comprise packet essential information and protocol stack result that write down, search the acceleration clauses and subclauses that comprise the essential information that reads, and the protocol stack result in the acceleration clauses and subclauses that will find is as the protocol stack result of described historical data bag.
11. equipment as claimed in claim 10 is characterized in that, is that described essential information comprises in the time of need passing through the packet of two layers of bridges forwarding at packet described to be transmitted:
Media access control MAC address, source, target MAC (Media Access Control) address and VLAN field value;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in VLAN field value after protocol stack is handled in the packet, qos field value, COS field value, TOS field value, the forwarding port information.
12. equipment as claimed in claim 10 is characterized in that, is that described essential information comprises in the time of need passing through the packet of three layers of routing forwarding at packet described to be transmitted:
Source IP address, purpose IP address, source port PORT sign, purpose PORT sign and transport protocol message;
Protocol stack result in the described acceleration clauses and subclauses comprises:
One or combination in any in field value in two layers of head behind the protocol stack place in the packet, source IP address, purpose IP address, source port PORT sign, purpose PORT sign, transport protocol message, qos field value, COS field value, the TOS field value.
13. equipment as claimed in claim 11 is characterized in that, described packet is revised sending module and is used for:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
VLAN field value, COS field value, TOS field value, qos field value.
14. equipment as claimed in claim 12 is characterized in that, it is characterized in that, described packet is revised sending module and is used for:
According to the protocol stack result that finds, revise one or combination in any in the described following field value of waiting to transmit in the packet:
Field value, source IP address field value, purpose IP address field value, source port PORT field value, purpose PORT field value, host-host protocol field value, COS field value, TOS field value, qos field value, length field value, UDP checksum field value in two layers of head.
15. equipment as claimed in claim 9 is characterized in that, this equipment also comprises:
The protocol stack processing module is used for when not finding the protocol stack result of historical data bag, packet described to be transmitted is carried out protocol stack handle;
The packet information logging modle is used for record protocol stack result and the described essential information of waiting to transmit packet, and this essential information is the described information of waiting to transmit the affiliated data flow of packet of expression; Packet after the protocol stack processing is forwarded.
CN2011100085059A 2011-01-14 2011-01-14 Packet forwarding method and equipment Pending CN102123082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100085059A CN102123082A (en) 2011-01-14 2011-01-14 Packet forwarding method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100085059A CN102123082A (en) 2011-01-14 2011-01-14 Packet forwarding method and equipment

Publications (1)

Publication Number Publication Date
CN102123082A true CN102123082A (en) 2011-07-13

Family

ID=44251538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100085059A Pending CN102123082A (en) 2011-01-14 2011-01-14 Packet forwarding method and equipment

Country Status (1)

Country Link
CN (1) CN102123082A (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546405A (en) * 2011-12-27 2012-07-04 华为技术有限公司 Business processing method and device of protocol stack
CN102684971A (en) * 2012-05-28 2012-09-19 太仓市同维电子有限公司 VLAN (Virtual Local Area Network) function realizing method and Linux system LAN gateway
CN102694727A (en) * 2012-05-21 2012-09-26 太仓市同维电子有限公司 Method and device for realizing transmission acceleration of network data packets
CN102769576A (en) * 2012-08-17 2012-11-07 北京傲天动联技术有限公司 Flow table self learning method, message transferring method and switch board
WO2012151904A1 (en) * 2011-08-19 2012-11-15 中兴通讯股份有限公司 Data packet forwarding method and device
CN102938733A (en) * 2012-11-22 2013-02-20 华为技术有限公司 Message forwarding method as well as routing equipment and recognition equipment thereof
CN103516692A (en) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 Method and system for achieving accelerating processing of DS-Lite data message
CN103647716A (en) * 2013-11-22 2014-03-19 上海斐讯数据通信技术有限公司 A data packet rapid forwarding method and an apparatus
CN103748842A (en) * 2013-06-26 2014-04-23 华为技术有限公司 Method, device and route device for forwarding data packages
WO2014166190A1 (en) * 2013-07-08 2014-10-16 中兴通讯股份有限公司 Method and apparatus for forwarding data of network device
CN104243300A (en) * 2013-06-20 2014-12-24 联发科技股份有限公司 Packet processing method and apparatus
CN104486196A (en) * 2014-12-23 2015-04-01 上海市共进通信技术有限公司 Method for realizing PPPOE packaged multicast protocol message handling
CN105681194A (en) * 2016-03-14 2016-06-15 上海市共进通信技术有限公司 Method for realizing fast forwarding of two-layer data packet of gateway equipment
CN106063202A (en) * 2014-03-04 2016-10-26 华为技术有限公司 State-dependent data forwarding
CN106464705A (en) * 2014-05-21 2017-02-22 华为技术有限公司 Method And Device For Network Protocol Stack Data Processing
CN106533980A (en) * 2016-11-30 2017-03-22 浙江宇视科技有限公司 Network data packet processing method and apparatus
CN107547523A (en) * 2017-08-08 2018-01-05 新华三信息安全技术有限公司 Message processing method, device, the network equipment and machinable medium
CN107872545A (en) * 2017-09-26 2018-04-03 中兴通讯股份有限公司 A kind of message transmitting method and device, computer-readable recording medium
CN110572330A (en) * 2019-09-17 2019-12-13 普联技术有限公司 method, device and medium for realizing compatibility of forwarding acceleration function and protocol stack function
CN110708250A (en) * 2019-08-26 2020-01-17 广州市高科通信技术股份有限公司 Method for improving data forwarding performance, electronic equipment and storage medium
CN111355662A (en) * 2018-12-24 2020-06-30 中移(杭州)信息技术有限公司 Data acceleration method and device, gateway equipment and readable storage medium
CN111404817A (en) * 2020-03-24 2020-07-10 深圳市吉祥腾达科技有限公司 Method and system for improving fragment data packet forwarding performance of network communication equipment
CN114710529A (en) * 2022-03-25 2022-07-05 广州小鹏汽车科技有限公司 Data transmission method, device, system, vehicle and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996948A (en) * 2006-12-28 2007-07-11 杭州华为三康技术有限公司 Message forwarding method and device based on the media access control layer
CN101030947A (en) * 2007-04-29 2007-09-05 华为技术有限公司 Method and apparatus for transmitting message

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996948A (en) * 2006-12-28 2007-07-11 杭州华为三康技术有限公司 Message forwarding method and device based on the media access control layer
CN101030947A (en) * 2007-04-29 2007-09-05 华为技术有限公司 Method and apparatus for transmitting message

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012151904A1 (en) * 2011-08-19 2012-11-15 中兴通讯股份有限公司 Data packet forwarding method and device
CN102957600B (en) * 2011-08-19 2017-11-10 中兴通讯股份有限公司 A kind of data message forwarding method and device
CN102957600A (en) * 2011-08-19 2013-03-06 中兴通讯股份有限公司 Method and device for data message forwarding
CN102546405B (en) * 2011-12-27 2015-05-13 华为技术有限公司 Business processing method and device of protocol stack
CN102546405A (en) * 2011-12-27 2012-07-04 华为技术有限公司 Business processing method and device of protocol stack
CN102694727A (en) * 2012-05-21 2012-09-26 太仓市同维电子有限公司 Method and device for realizing transmission acceleration of network data packets
CN102684971A (en) * 2012-05-28 2012-09-19 太仓市同维电子有限公司 VLAN (Virtual Local Area Network) function realizing method and Linux system LAN gateway
CN103516692A (en) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 Method and system for achieving accelerating processing of DS-Lite data message
CN102769576A (en) * 2012-08-17 2012-11-07 北京傲天动联技术有限公司 Flow table self learning method, message transferring method and switch board
CN102769576B (en) * 2012-08-17 2015-06-10 北京傲天动联技术股份有限公司 Flow table self learning method, message transferring method and switch board
CN102938733B (en) * 2012-11-22 2016-01-13 华为技术有限公司 The retransmission method of message and routing device, identification equipment
CN102938733A (en) * 2012-11-22 2013-02-20 华为技术有限公司 Message forwarding method as well as routing equipment and recognition equipment thereof
CN104243300A (en) * 2013-06-20 2014-12-24 联发科技股份有限公司 Packet processing method and apparatus
CN104243300B (en) * 2013-06-20 2018-01-05 联发科技股份有限公司 Packet processing method and bag processing unit
CN103748842A (en) * 2013-06-26 2014-04-23 华为技术有限公司 Method, device and route device for forwarding data packages
CN103748842B (en) * 2013-06-26 2017-04-12 华为技术有限公司 Method, device and route device for forwarding data packages
WO2014166190A1 (en) * 2013-07-08 2014-10-16 中兴通讯股份有限公司 Method and apparatus for forwarding data of network device
CN103647716A (en) * 2013-11-22 2014-03-19 上海斐讯数据通信技术有限公司 A data packet rapid forwarding method and an apparatus
CN106063202A (en) * 2014-03-04 2016-10-26 华为技术有限公司 State-dependent data forwarding
US10389627B2 (en) 2014-03-04 2019-08-20 Huawei Technologies Co., Ltd. State-dependent data forwarding
CN106464705A (en) * 2014-05-21 2017-02-22 华为技术有限公司 Method And Device For Network Protocol Stack Data Processing
CN106464705B (en) * 2014-05-21 2019-11-01 华为技术有限公司 A kind of data processing method and device of network protocol stack
CN104486196A (en) * 2014-12-23 2015-04-01 上海市共进通信技术有限公司 Method for realizing PPPOE packaged multicast protocol message handling
CN105681194A (en) * 2016-03-14 2016-06-15 上海市共进通信技术有限公司 Method for realizing fast forwarding of two-layer data packet of gateway equipment
CN106533980B (en) * 2016-11-30 2019-07-12 浙江宇视科技有限公司 A kind of processing method of network data packets and device
CN106533980A (en) * 2016-11-30 2017-03-22 浙江宇视科技有限公司 Network data packet processing method and apparatus
CN107547523A (en) * 2017-08-08 2018-01-05 新华三信息安全技术有限公司 Message processing method, device, the network equipment and machinable medium
CN107872545A (en) * 2017-09-26 2018-04-03 中兴通讯股份有限公司 A kind of message transmitting method and device, computer-readable recording medium
CN111355662A (en) * 2018-12-24 2020-06-30 中移(杭州)信息技术有限公司 Data acceleration method and device, gateway equipment and readable storage medium
CN110708250A (en) * 2019-08-26 2020-01-17 广州市高科通信技术股份有限公司 Method for improving data forwarding performance, electronic equipment and storage medium
CN110572330A (en) * 2019-09-17 2019-12-13 普联技术有限公司 method, device and medium for realizing compatibility of forwarding acceleration function and protocol stack function
CN111404817A (en) * 2020-03-24 2020-07-10 深圳市吉祥腾达科技有限公司 Method and system for improving fragment data packet forwarding performance of network communication equipment
CN111404817B (en) * 2020-03-24 2022-06-03 深圳市吉祥腾达科技有限公司 Method and system for improving fragment data packet forwarding performance of network communication equipment
CN114710529A (en) * 2022-03-25 2022-07-05 广州小鹏汽车科技有限公司 Data transmission method, device, system, vehicle and storage medium
CN114710529B (en) * 2022-03-25 2024-03-12 广州小鹏汽车科技有限公司 Data transmission method, device, system, vehicle and storage medium

Similar Documents

Publication Publication Date Title
CN102123082A (en) Packet forwarding method and equipment
JP6500304B2 (en) Method for acquiring accurate flow entry by SDN switch, and SDN switch, controller and system
US7684344B2 (en) Method and system for transparent TCP offload
US7411959B2 (en) System and method for handling out-of-order frames
US7050437B2 (en) Wire speed reassembly of data frames
US8867395B2 (en) Accelerating data packet parsing
CN102946347B (en) Method and device for accelerating to process local data packet by using Linux system
US20070022212A1 (en) Method and system for TCP large receive offload
US20120281714A1 (en) Packet processing accelerator and method thereof
CN102075421B (en) Service quality processing method and device
CN102334112A (en) Method and system for virtual machine networking
CN1625159A (en) Switch capable of controlling data packet transmission and related method
US11818022B2 (en) Methods and systems for classifying traffic flows based on packet processing metadata
US20200028785A1 (en) Virtual machine packet processing offload
CN105591989B (en) Chip implementation method for uploading protocol message to CPU
US20110142050A1 (en) Hashing packet contents to determine a processor
CN104135548B (en) Static NAT realization method and device based on FPGA
US7969977B2 (en) Processing apparatus and method for processing IP packets
JP5900352B2 (en) Packet processing apparatus, packet processing method and program
EP1460804B1 (en) System and method for handling out-of-order frames (fka reception of out-of-order tcp data with zero copy service)
WO2015075862A1 (en) Network control device, network control method, and program
CN103200084A (en) Message preprocessing method and device based on network processing unit and network processing unit
CN102647347A (en) Connection-based traffic processing method and system
CN103999435A (en) Apparatus and methods for efficient network address translation and application level gateway processing
JP6160101B2 (en) Communication device, control device, communication system, and control message transmission method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20110713

RJ01 Rejection of invention patent application after publication