CN105791173B - A kind of method and device to E-Packet - Google Patents

A kind of method and device to E-Packet Download PDF

Info

Publication number
CN105791173B
CN105791173B CN201511020708.4A CN201511020708A CN105791173B CN 105791173 B CN105791173 B CN 105791173B CN 201511020708 A CN201511020708 A CN 201511020708A CN 105791173 B CN105791173 B CN 105791173B
Authority
CN
China
Prior art keywords
network data
data message
port
destination slogan
fpga
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.)
Active
Application number
CN201511020708.4A
Other languages
Chinese (zh)
Other versions
CN105791173A (en
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201511020708.4A priority Critical patent/CN105791173B/en
Publication of CN105791173A publication Critical patent/CN105791173A/en
Application granted granted Critical
Publication of CN105791173B publication Critical patent/CN105791173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags

Abstract

The embodiment of the invention discloses a kind of method and devices to E-Packet, wherein this method comprises: the access interface by on-site programmable gate array FPGA obtains network data message, and adds identification information in the network data message;The network data message is parsed by the processing module of the FPGA, obtains the identification information, and corresponding destination slogan is obtained according to preset algorithm;It determines whether the destination slogan belongs to allocated port numbers by the output port of the FPGA, if the destination slogan belongs to allocated port numbers, the network data message is forwarded by the corresponding port of the destination slogan.The embodiment of the present invention discloses a kind of method and device to E-Packet, the source input of each message is identified using port numbers and purpose exports, by calculating the hash value of message and tabling look-up to obtain the destination slogan of message, only output end oral thermometer, which need to be updated, can flexibly change the destination slogan of message, to realize the purpose flexibly forwarded.

Description

A kind of method and device to E-Packet
Technical field
The present embodiments relate to the technical field of FPGA more particularly to a kind of method and devices to E-Packet.
Background technique
Usually field programmable gate array (Field-Programmable Gate Array, FPGA) is used in access net Realize the processing of network data.Network data message carries out from data after the access of 100GE interface, 40GE interface or 10GE interface Reason exports after completing packet parsing, filtering, lookup, forwarding from 10G interface.
The mode of register configuration is generallyd use based on the FPGA network data message forwarding method realized.If register value It is configured to 0x13, then it represents that the message that access 1 inputs is exported from access 3;Register value is configured to 0x23, then it represents that from access 2 The message of input is exported from access 3.The defect of this method is once input channel extension or output channel extension, output selection are posted The meaning of storage is also required to change accordingly, inflexible, and selection path is easy error by way of register configuration. Meanwhile being also unable to satisfy the homologous chummage demand of network data message, i.e., the message of identical IP is exported from the same port.
Summary of the invention
The embodiment of the present invention proposes a kind of method and device to E-Packet, it is intended to solve how to realize flexible forwarding report The problem of text.
In a first aspect, a kind of method to E-Packet, which comprises
Network data message is obtained by the access interface of on-site programmable gate array FPGA, and in the network data report Identification information is added in text, the identification information includes source port number or IP address information;
The network data message is parsed by the processing module of the FPGA, obtains the identification information, and according to pre- Imputation method obtains corresponding destination slogan;
Determine whether the destination slogan belongs to allocated port numbers by the output port of the FPGA, if described Destination slogan belongs to allocated port numbers, then the network data message is passed through the corresponding port of the destination slogan It is forwarded, wherein each output port of the on-site programmable gate array FPGA is assigned a port number.
It is preferably, described to carry identification information in network data message, comprising:
Default N in the network data message, which is clapped, carries the identification information.
Preferably, the output port by the FPGA determines whether the destination slogan belongs to allocated end The network data message is passed through the destination slogan if the destination slogan belongs to allocated port numbers by slogan Corresponding port is forwarded, comprising:
The destination slogan of the network data message is obtained by the data forwarding module of the FPGA;
The destination slogan is matched with the port numbers of allocated output port;
If the destination slogan can match the port numbers of the allocated output port, by the network data report Text is sent to the corresponding output port of the destination slogan;
The identification information is deleted by the corresponding output port, and forwards the network data message after deleting.
Preferably, the preset algorithm includes hash algorithm.
Preferably, the method also includes:
If the destination slogan is not belonging to allocated port numbers, the network data message is abandoned.
Second aspect, a kind of device to E-Packet, described device include:
Adding module, for the access interface acquisition network data message by on-site programmable gate array FPGA, and Identification information is added in the network data message, the identification information includes source port number or IP address information;
Module is obtained, for parsing the network data message by the processing module of the FPGA, obtains the mark Information, and corresponding destination slogan is obtained according to preset algorithm;
Forwarding module, it is allocated for determining whether the destination slogan belongs to by the output port of the FPGA The network data message is passed through the destination if the destination slogan belongs to allocated port numbers by port numbers The corresponding port of slogan is forwarded, wherein each output port of the on-site programmable gate array FPGA is assigned one Port numbers.
Preferably, the adding module, is used for:
Default N in the network data message, which is clapped, carries the identification information.
Preferably, the forwarding module, comprising:
Acquiring unit, for obtaining the destination port of the network data message by the data forwarding module of the FPGA Number;
Matching unit, for matching the destination slogan with the port numbers of allocated output port;
Transmission unit will if can match the port numbers of the allocated output port for the destination slogan The network data message is sent to the corresponding output port of the destination slogan;
Retransmission unit for deleting the identification information by the corresponding output port, and forwards the net after deleting Network data message.
Preferably, the preset algorithm includes hash algorithm.
Preferably, described device further include:
Discard module abandons the network data if being not belonging to allocated port numbers for the destination slogan Message.
A kind of method and device to E-Packet provided in an embodiment of the present invention, by the access interface of FPGA in network number The network data message is parsed according to adding identification information in message, then by the processing module of the FPGA, obtains the mark Know information, and calculate the destination slogan of the network data message output according to preset algorithm and identification information, by the net Network data message is exported from the destination slogan, thus by the destination slogan of flexibly change network data message to realize The purpose that network data message flexibly forwards.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for method to E-Packet that the embodiment of the present invention one provides;
Fig. 2 is a kind of method schematic diagram for carrying identification information provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram for the method that another kind provided by Embodiment 2 of the present invention E-Packets;
Fig. 4 is the schematic diagram for the method that the another kind that the embodiment of the present invention three provides E-Packets;
Fig. 5 is a kind of functional schematic for device to E-Packet that the embodiment of the present invention four provides.
Specific embodiment
To further illustrate the technical scheme of the present invention below with reference to the accompanying drawings and specific embodiments.It is understood that It is that specific embodiment described herein is used only for explaining the present invention rather than limiting the invention.It further needs exist for illustrating , only the parts related to the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although every step is described as the processing of sequence by flow chart, therein to be permitted Multi-step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of every step can be rearranged.When it The processing can be terminated when step completion, it is also possible to have the additional step being not included in attached drawing.The processing It can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is a kind of flow diagram for method to E-Packet that the embodiment of the present invention one provides.This method can be by The device to E-Packet executes, which can be field programmable gate array (Field-Programmable Gate Array, FPGA), the FPGA includes access interface, processing module, output port, wherein the device can by software and/ Or hardware realization.As shown in Figure 1, this method comprises:
Step 101, network data message is obtained by the access interface of FPGA, and is added in the network data message Identification information, the identification information include source port number or IP address information;
Specifically, the mode of addition identification information can add in a certain bat in messages, it is preferable that described in network Identification information is carried in data message, comprising:
Default N in the network data message, which is clapped, carries the identification information.N can be 1.
Specifically, Fig. 2 is a kind of method schematic diagram for carrying identification information provided in an embodiment of the present invention with reference to Fig. 2.It is logical The access interface for crossing field programmable gate array (Field-Programmable Gate Array, FPGA) obtains network data After message, upper port information is carried on the first count of the network data message by the access interface.Channel number DCH table Show destination slogan, SCH indicates that source port number, each message carry source port information and destination port after interface input Information, the destination port information include the IP address or other preset message identification information of message.
Step 102, the network data message is parsed by the processing module of the FPGA, obtains the identification information, And corresponding destination slogan is obtained according to preset algorithm;
Specifically, network data message is parsed and filtered, to obtain target ip address, target ip address is carried out Hash is calculated, and obtains a hash value, is searched output end oral thermometer using the hash value and is obtained a destination slogan.Pass through Hash Calculation in the correspondence to limited output port of a large amount of target ip address equilibrium, can will avoid generating port bottleneck. The identical available hash value of IP be it is the same, table look-up to obtain identical destination slogan, realize identical IP packet from same The function of a port output.
Step 103, determine whether the destination slogan belongs to allocated port by the output port of the FPGA Number, if the destination slogan belongs to allocated port numbers, the network data message is passed through into the destination slogan Corresponding port is forwarded, wherein each output port of the FPGA is assigned a port number.
Specifically, FPGA, which is the mode that each output port distributes a port number, to be that the present invention is implemented with table 1, table 1 A kind of assignment of port numbers table that example provides.
Port name Port numbers
The channel 100G 0 0
The channel 100G 1 1
The channel 40G 0 2
The channel 40G 1 3
The channel 10G 0 0x10
The channel 10G 1 0x11
The channel 10G 2 0x12
The channel 10G 3 0x13
The channel 10G 4 0x14
The channel 10G 5 0x15
The channel 10G 6 0x16
The channel 10G 7 0x17
Preferably, the output port by the FPGA determines whether the destination slogan belongs to and has distributed table 1 Port numbers, if the destination slogan belongs to allocated port numbers, by the network data message pass through the destination The corresponding port of slogan is forwarded, comprising:
The destination slogan of the network data message is obtained by the data forwarding module of the FPGA;
The destination slogan is matched with the port numbers of allocated output port;
If the destination slogan can match the port numbers of the allocated output port, by the network data report Text is sent to the corresponding output port of the destination slogan;
The identification information is deleted from network data message by the corresponding output port, and forward deletion after Network data message.
Specifically, if updating the network data message first when network data message is exported from the processing module of FPGA The destination port information of bat is the destination slogan being calculated by Hash, judges the network number in the output port of FPGA According to the destination slogan of message, if the channel number with output port matches, exported from corresponding output port, it will before output The destination slogan is deleted from the network data message, the output of raw network data message is reverted to, to guarantee original Beginning network data message enters the access interface of FPGA, and raw network data message is exported from the output port of FPGA.If with defeated The channel number of exit port mismatches, then abandons.
Further, the method also includes:
If the destination slogan is not belonging to allocated port numbers, the network data message is abandoned.
A kind of method to E-Packet provided in an embodiment of the present invention, by the access interface of FPGA in network data message Middle addition identification information, then the network data message is parsed by the processing module of the FPGA, the identification information is obtained, And the destination slogan of the network data message output is calculated according to preset algorithm and identification information, by the network data report Text is exported from the destination slogan, thus by the destination slogan of flexibly change network data message to realize network data The purpose that message flexibly forwards.
Embodiment two
It is the schematic diagram for the method that another kind provided by Embodiment 2 of the present invention E-Packets with reference to Fig. 3, Fig. 3.Such as Fig. 3 institute Show, raw network data message carries upper end number information in message first count after access interface access, and SCH indicates source port Number, DCH indicates destination slogan, and message can obtain a destination slogan after data processing module is handled, and updates message the One destination slogan clapped, into data combiners block, merging module is merged into multichannel input and is exported all the way, in data forwarding Module judges the destination slogan of message, destination slogan is forwarded to the matched message of the channel number of output interface corresponding Output interface module reverts to the output of raw network data message in the port information that output module strips carrying.
Embodiment three
With reference to the schematic diagram for the method that the another kind that Fig. 4, Fig. 4 are the offers of the embodiment of the present invention three E-Packets.
Network data message is sent to forwarding module after processing module is handled inside FPGA, the radical in forwarding module No. DCH of message is first judged, if the DCH value of message is matched with 1 mouthful of output of channel number (ch=0x10), which is deposited Enter First Input First Output (First-In First-Out, FIFO) 1, if the channel number (ch=of 2 mouthfuls of the dch value of message and output It 0x11) matches, then the message is stored in FIFO2, if the dch value of message is matched with 3 mouthfuls of output of channel number (ch=0x12), The message is stored in FIFO3, if the dch value of message is matched with 4 mouthfuls of output of channel number (ch=0x13), which is stored in FIFO4.There is message just to can read inside FIFO, exports to the output interface module in downstream.
Example IV
It is a kind of functional schematic for device to E-Packet that the embodiment of the present invention four provides with reference to Fig. 5, Fig. 5.The dress Setting can be implemented by software and/or hardware, and can be realized by executing the method to E-Packet.As shown in figure 5, the device includes:
Adding module 501 obtains network data message for the access interface by on-site programmable gate array FPGA, and Identification information is added in the network data message, the identification information includes source port number or IP address information;
Preferably, the adding module 501, is used for:
Default N in the network data message, which is clapped, carries the identification information.
Module 502 is obtained, for parsing the network data message by the processing module of the FPGA, obtains the mark Know information, and corresponding destination slogan is obtained according to preset algorithm;
Forwarding module 503 has divided for determining whether the destination slogan belongs to by the output port of the FPGA The network data message is passed through the mesh if the destination slogan belongs to allocated port numbers by the port numbers matched The corresponding port of port numbers be forwarded, wherein each output port of the on-site programmable gate array FPGA is assigned A port number.
Preferably, the forwarding module 503, comprising:
Acquiring unit, for obtaining the destination port of the network data message by the data forwarding module of the FPGA Number;
Matching unit, for matching the destination slogan with the port numbers of allocated output port;
Transmission unit will if can match the port numbers of the allocated output port for the destination slogan The network data message is sent to the corresponding output port of the destination slogan;
Retransmission unit for deleting the identification information by the corresponding output port, and forwards the net after deleting Network data message.
Preferably, the preset algorithm includes hash algorithm.
Preferably, described device further include:
Discard module abandons the network data if being not belonging to allocated port numbers for the destination slogan Message.
A kind of device to E-Packet provided in an embodiment of the present invention, by the access interface of FPGA in network data message Middle addition identification information, then the network data message is parsed by the processing module of the FPGA, the identification information is obtained, And the destination slogan of the network data message output is calculated according to preset algorithm and identification information, by the network data report Text is exported from the destination slogan, thus by the destination slogan of flexibly change network data message to realize network data The purpose that message flexibly forwards.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of method to E-Packet, which is characterized in that the described method includes:
Network data message is obtained by the access interface of on-site programmable gate array FPGA, and in the network data message Identification information is added, the identification information includes source port number and destination port information;
The network data message is parsed by the processing module of the FPGA, obtains the identification information, and according to pre- imputation Method obtains corresponding destination slogan;
Determine whether the destination slogan belongs to allocated port numbers by the output port of the FPGA, if the purpose Port numbers belong to allocated port numbers, then carry out the network data message by the corresponding port of the destination slogan Forwarding, wherein each output port of the on-site programmable gate array FPGA is assigned a port number.
2. the method according to claim 1, wherein described carry identification information, packet in network data message It includes:
Default N in the network data message, which is clapped, carries the identification information.
3. the method according to claim 1, wherein the output port by the FPGA determines the mesh Port numbers whether belong to allocated port numbers, if the destination slogan belongs to allocated port numbers, by the network Data message is forwarded by the corresponding port of the destination slogan, comprising:
The destination slogan of the network data message is obtained by the data forwarding module of the FPGA;
The destination slogan is matched with the port numbers of allocated output port;
If the destination slogan can match the port numbers of the allocated output port, the network data message is sent out It is sent to the corresponding output port of the destination slogan;
The identification information is deleted by the corresponding output port, and forwards the network data message after deleting.
4. the method according to claim 1, wherein the preset algorithm includes hash algorithm.
5. the method according to claim 1, which is characterized in that the method also includes:
If the destination slogan is not belonging to allocated port numbers, the network data message is abandoned.
6. a kind of device to E-Packet, which is characterized in that described device includes:
Adding module, for obtaining network data message by the access interface of on-site programmable gate array FPGA, and described Identification information is added in network data message, the identification information includes source port number and destination port information;
Module is obtained, for the processing module parsing network data message by the FPGA, obtains the identification information, And corresponding destination slogan is obtained according to preset algorithm;
Forwarding module, for determining whether the destination slogan belongs to allocated port by the output port of the FPGA Number, if the destination slogan belongs to allocated port numbers, the network data message is passed through into the destination slogan Corresponding port is forwarded, wherein each output port of the on-site programmable gate array FPGA is assigned a port Number.
7. device according to claim 6, which is characterized in that the adding module is used for:
Default N in the network data message, which is clapped, carries the identification information.
8. device according to claim 6, which is characterized in that the forwarding module, comprising:
Acquiring unit, for obtaining the destination slogan of the network data message by the data forwarding module of the FPGA;
Matching unit, for matching the destination slogan with the port numbers of allocated output port;
Transmission unit will be described if can match the port numbers of the allocated output port for the destination slogan Network data message is sent to the corresponding output port of the destination slogan;
Retransmission unit for deleting the identification information by the corresponding output port, and forwards the network number after deleting According to message.
9. device according to claim 6, which is characterized in that the preset algorithm includes hash algorithm.
10. according to device described in claim 6 to 9 any one, which is characterized in that described device further include:
Discard module abandons the network data message if being not belonging to allocated port numbers for the destination slogan.
CN201511020708.4A 2015-12-30 2015-12-30 A kind of method and device to E-Packet Active CN105791173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511020708.4A CN105791173B (en) 2015-12-30 2015-12-30 A kind of method and device to E-Packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511020708.4A CN105791173B (en) 2015-12-30 2015-12-30 A kind of method and device to E-Packet

Publications (2)

Publication Number Publication Date
CN105791173A CN105791173A (en) 2016-07-20
CN105791173B true CN105791173B (en) 2019-03-08

Family

ID=56390381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511020708.4A Active CN105791173B (en) 2015-12-30 2015-12-30 A kind of method and device to E-Packet

Country Status (1)

Country Link
CN (1) CN105791173B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905387A (en) 2019-02-20 2019-06-18 网宿科技股份有限公司 A kind of data processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067294A (en) * 2012-12-30 2013-04-24 大连环宇移动科技有限公司 Method for order-maintaining data flow equilibrium processing in multi-next-hop transmitting router based on flow
CN103117948A (en) * 2013-02-22 2013-05-22 桂林电子科技大学 Hierarchical parallel high-speed network transmission control protocol (TCP) flow recombination method based on field programmable gate array (FPGA)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8442045B2 (en) * 2010-03-16 2013-05-14 Force10 Networks, Inc. Multicast packet forwarding using multiple stacked chassis
EP3092832A4 (en) * 2014-01-06 2017-08-23 Dali Systems Co. Ltd. Network switch for a distributed antenna network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067294A (en) * 2012-12-30 2013-04-24 大连环宇移动科技有限公司 Method for order-maintaining data flow equilibrium processing in multi-next-hop transmitting router based on flow
CN103117948A (en) * 2013-02-22 2013-05-22 桂林电子科技大学 Hierarchical parallel high-speed network transmission control protocol (TCP) flow recombination method based on field programmable gate array (FPGA)

Also Published As

Publication number Publication date
CN105791173A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
EP3035613B1 (en) Ccn routing using hardware-assisted hash tables
US8522111B2 (en) Optimization of packet buffer memory utilization
US10652024B2 (en) Digital signature systems and methods for network path trace
US9893987B2 (en) Virtual stacking of switches
CN103929353B (en) The treating method and apparatus of instant message
US9647925B2 (en) System and method for data path validation and verification
WO2016091029A1 (en) Method and apparatus for forwarding traffic of stacking system
CN108347477B (en) Data transmission method, device and server
US10887132B2 (en) Forwarding path link table packet in software defined network
CN105791173B (en) A kind of method and device to E-Packet
JP2020505853A (en) Establish equal cost path entry
CN107786447B (en) Message forwarding method and device based on FPGA
US20150326477A1 (en) Packet processing apparatus, flow entry configuration method and program
CN106487683A (en) A kind of processing method and processing device of message
US20180287941A1 (en) Single lookup entry for symmetric flows
US9513926B2 (en) Floating mask generation for network packet flow
US20190245710A1 (en) System and method to control latency of serially-replicated multi-destination flows
JP5405265B2 (en) Topology estimation device and topology estimation method
US8732358B2 (en) Circuit systems and methods using prime number interleave optimization for byte lane to time slice conversion
US11121946B2 (en) Capturing packets in a virtual switch
JPWO2018163229A1 (en) Transfer apparatus, transfer method and transfer system
TW201807983A (en) Communication apparatus and band control method
US10476798B1 (en) Network switch with deterministic longest prefix match lookup
TWI779798B (en) Network apparatus and media access control address learning method thereof
US9886273B1 (en) Maintaining packet order in a parallel processing network device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant