CN104009924A - Message processing method and device based on TCAM and FPGA - Google Patents
Message processing method and device based on TCAM and FPGA Download PDFInfo
- Publication number
- CN104009924A CN104009924A CN201410211306.1A CN201410211306A CN104009924A CN 104009924 A CN104009924 A CN 104009924A CN 201410211306 A CN201410211306 A CN 201410211306A CN 104009924 A CN104009924 A CN 104009924A
- Authority
- CN
- China
- Prior art keywords
- information
- tuple
- message
- many
- time
- 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.)
- Granted
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a message processing method and device based on the TCAM and FPGA. According to the method, an interchanger extracts data packet header information of a message according to the type of the message received, wherein the data packet header information comprises at least one piece of unitary information and at least one piece of multi-component system information; flow tables corresponding to each piece of information in each data packet header are looked up concurrently, output results are integrated, whether a multi-component system flow table corresponding to the multi-component system information is idle is judged when the data packet header information is the multi-component system information, and the multi-component system flow table is sent to a multi-component system flow table processing queue when the multi-component system flow table is not idle. According to the scheme, deep analysis of the message can be achieved effectively, results obtained through lookup before can be effectively correlated through combination of parallel connection and serial connection, and message processing efficiency can be effectively improved.
Description
Technical field
The present invention relates to Industrial Ethernet communication technical field, relate in particular to a kind of message processing method and device based on TCAM and FPGA.
Background technology
Industrial Ethernet development is at present very fast, has had application widely, thereby ethernet communication is raise rapidly in the status of industrial automation at industry-by-industry.But there is following problem in Industrial Ethernet communication:
In the time carrying out message processing, comprise: information extraction from message after switch receives message, the information of extracting comprises: (Virtual Local Area Network, VLAN) information, mac address information, port numbers etc., according to table corresponding to information searching extracting, and process according to concrete searching accordingly.Concrete, search vlan table according to vlan information and the port numbers extracted, after inquiry is passed through, then transmit according to the MAC Address inquiry L2 address extracting, forward this message according to the result of inquiry.
The processing procedure of above-mentioned whole message is serial classification processing, between flow process, process successively according to order, and each flow process is processed separately, in each flow process, needing the inquiry work of carrying out is also that serial is carried out, therefore the whole message handling process flexibility ratio of getting off is not high, time delay is higher, has affected the forwarding performance of message.
In industrial communication due to safety factor, more and more in the urgent need to message is carried out to profound dissection process, send to lower one deck after by switch processes and carry out deeper processing and current processing mode is message, and follow-up processing procedure is also serial, therefore above-mentioned processing procedure can not be carried out forwarded strategy configuration targetedly for concrete industrial communication agreement, thereby causes data retransmission time delay to increase.
It is by ACL that existing switch realizes safe mode, and in use, ACL is the mode that adopts Series poll and coupling, and coupling is next again after having mated a stream table, and the general TCAM of employing of stream table realizes.In a FPGA, can not use in a large number independently TCAM, be generally that the form that a TCAM is divided into multiple logical tables is carried out work.At this moment can run into a problem, because the stream table difference that the message receiving need to be searched, if adopt serial process mode, will seriously hinder the efficiency to message processing, thereby affect the data throughput of product, cause message repeating to postpone to increase.
Summary of the invention
In view of the above problems, the present invention has been proposed to a kind of a kind of message processing method and device based on TCAM and FPGA that overcomes the problems referred to above or address the above problem is at least in part provided.
The embodiment of the present invention provides a kind of message processing method based on TCAM and FPGA, and the method comprises:
Switch is identified the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extract the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information;
According to the corresponding relation of the each information in the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding, and output after lookup result is integrated, wherein,
In the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result;
In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result.
In order further to realize the profound level processing to message, described according to after many tuple streams table described in described polynary group of information searching definite lookup result, described method also comprises:
Described many tuple information are carried out to secondary parsing;
Obtain each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding, and output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
In order to ensure the accuracy of result, in embodiments of the present invention, described by lookup result integrate after output comprise:
In each information of the data packet head obtaining in extraction, add bag descriptor, and obtain the each lookup result that comprises this bag descriptor;
According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding;
In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
In order further to improve the treatment effeciency of message, in the time that described stream table is many tuple streams table, described many tuple streams table, for comprising the highest multiple tuple stream tables, determines that lookup result comprises:
Judge the priority of described message;
In the time that the priority of described message meets default priority conditions, judge that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority,
In the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle; In the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
In order further to improve the treatment effeciency of message, in the time that described stream table is many tuple streams table, described many tuple streams table comprises the highest tuple stream table and multiple conventional tuple stream table, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set;
Wherein, determine that lookup result comprises:
According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table;
In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
The embodiment of the present invention provides a kind of message process device based on TCAM and FPGA, and described device comprises:
Resolve extraction module, for identifying the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extracts the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information;
Module is searched in storage, for according to the corresponding relation of each information of the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding, wherein, in the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result; In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result;
Arbitration modules, for output after lookup result is integrated.
In order further to realize the profound level processing to message, described device also comprises:
Secondary parsing module, for carrying out secondary parsing to described many tuple information;
Module is searched in storage, also for obtaining each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding;
Arbitration modules, also for output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
In order to ensure the accuracy of message processing, described arbitration modules, specifically for adding bag descriptor in each information of the data packet head that obtains in extraction, and obtains the each lookup result that comprises this bag descriptor; According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding; In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
In order further to improve the treatment effeciency of message, module is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table is for comprising the highest multiple tuple stream tables, in the time that the priority of described message meets default priority conditions, judge that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority, in the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
In order further to improve the treatment effeciency of message, module is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table comprises the highest tuple stream table and multiple conventional tuple stream table, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set; According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table; In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
The embodiment of the present invention provides a kind of message processing method and device based on TCAM and FPGA, in the method, switch is according to the type of message of the message receiving, extract the data packet head information of message, wherein this data packet head information comprises at least one metamessage and at least one many tuple information, parallel search stream table corresponding to each information in each data packet head and integrate Output rusults, and in the time that this data packet head information is many tuple information, judge that whether many tuple streams table corresponding to many tuple information be idle, when busy, this many tuple streams table is sent in the processing queue of described many tuple streams table.Owing to comprising a metamessage and many tuple information in the data packet head information of extracting in the embodiment of the present invention, one metamessage is directly searched one-dimensional flow table, and during according to polynary group of many tuple streams of information searching table, need to judge that whether current stream table is idle, judge whether current stream table is taken by other messages, when this stream is shown when occupied to wait in line, therefore the scheme that the embodiment of the present invention provides can effectively realize resolves the profound level of message, and the result that adopts the mode of this parallel connection and series combination effectively to obtain tabling look-up is before carried out association, and effectively improve the treatment effeciency of message.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of specification, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Brief description of the drawings
By reading below detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skill in the art.Accompanying drawing is only for the object of preferred implementation is shown, and do not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
A kind of message process chart based on TCAM and FPGA that Fig. 1 provides for the embodiment of the present invention;
A kind of message process chart based on TCAM and FPGA that Fig. 2 provides for the embodiment of the present invention one;
A kind of message processing procedure figure based on TCAM and FPGA that Fig. 3 provides for the embodiment of the present invention two;
A kind of message processing procedure figure based on TCAM and FPGA that Fig. 4 provides for the embodiment of the present invention three;
A kind of processing of the message based on TCAM and FPGA schematic diagram that Fig. 5 provides for the embodiment of the present invention four;
A kind of message process device structural representation based on TCAM and FPGA that Fig. 6 provides for the embodiment of the present invention.
Embodiment
In order effectively to realize the profound level of message to be resolved, and improve the treatment effeciency of message, a kind of message processing method and device based on TCAM and FPGA is provided.
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, but should be appreciated that and can realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order more thoroughly to understand the disclosure that these embodiment are provided, and can be by the those skilled in the art that conveys to complete the scope of the present disclosure.
Below in conjunction with explanation accompanying drawing, the embodiment of the present invention is described.
A kind of message process chart based on TCAM and FPGA that Fig. 1 provides for the embodiment of the present invention, this process comprises the following steps:
S101: switch is identified the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extract the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information.
Wherein type of message comprises IP message, and TCP message etc. can identify the type of message of message according to the information of carrying in message.
The data packet head information of extracting in the data packet head of message in embodiments of the present invention comprises: at least one metamessage and at least one many tuple information, wherein a metamessage can be for example vlan information, mac address information, port number information etc., the information that many tuple information are made up of multiple metamessages, can be for example 4 tuple information, 7 tuple information, 9 tuple information, 12 tuple information, 14 tuple information, 15 tuple information etc., can determine the type of message by these many tuple information, and can determine source and the place to go of this message, search many tuple streams table uses so that follow-up.
For example common EtherCAT industrial protocol message in industrial communication, can from the data packet head of this message, parse 4 tuple information, this 4 tuple information comprises: inbound port number, source MAC, target MAC (Media Access Control) address, Ethernet protocol type, by this 4 tuple information, which message switch can judge accurately from data flow is EtherCAT message, and obtain source and the place to go of this message simultaneously, use for follow-up many tuple streams of coupling table.
And for ModBus TCP message, can from the data packet head of this message, resolve 12 tuple information, this 12 tuple information comprises: inbound port number, source MAC, target MAC (Media Access Control) address, VLANID, priority, ethernet type, source IP address, object IP address, IP protocol type, tcp source port, TCP destination interface, ToS, by this 12 tuple information, which message switch can judge accurately from data flow is ModBus TCP message, and obtain source and the place to go of this message simultaneously, use for follow-up many tuple streams of coupling table.
In the time extracting, be provided with corresponding data packet head extracting rule for every kind of type of message, for every kind of type of message, in order to realize the profound level analysis to this message, can preset the data packet head information of extracting in the message that needs the type, form corresponding data packet head extracting rule according to this data packet head information, to carry out the extraction of the data packet head information of follow-up respective type message.
S102: according to the corresponding relation of the each information in the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding.
In embodiments of the present invention in order effectively to improve the treatment effeciency of message, reduce the time delay of message processing, when having extracted after the data packet head information of message, when according to each data packet head information searching stream table, the carrying out that the search procedure of this stream table can walk abreast, parallel each stream table that calls is searched.
Concrete in the time searching, in the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result;
In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result.
This many tuple streams table generally comprises: multiple, general according to the corresponding contents of the polynary group of information configuration stream table extracting in inbound port number, source MAC, target MAC (Media Access Control) address, VLANID, priority, ethernet type, source IP address, object IP address, IP protocol type, tcp source port, TCP destination interface, these information of ToS.For example, if 4 tuple information, this 4 tuple information comprises: inbound port number, source MAC, target MAC (Media Access Control) address, include port numbers, source MAC, target MAC (Media Access Control) address information in many tuple streams of this correspondence table; If 12 metamessages, this 12 tuple information comprises: inbound port number, source MAC, target MAC (Media Access Control) address, VLAN ID, priority, MAC protocol type, source IP address, object IP address, IP protocol type, tcp source port, TCP destination interface, ToS, many tuple streams of this correspondence table comprises: inbound port number, source MAC, target MAC (Media Access Control) address, VLAN ID, priority, ethernet type, source IP address, object IP address, IP protocol type, tcp source port, TCP destination interface, ToS information.
Because switch in the embodiment of the present invention adopts parallel mode to search the stream table of each correspondence for the each information in data packet head information, but owing to having a metamessage and many tuple information in this data packet head information, the ratio carrying out according to monobasic information searching stream table is very fast, and carry out comparatively speaking according to polynary group of information searching stream table slow, therefore the required stream table of this message may just be used by other messages, this stream table is current busy, effectively searching of guarantee information, need to send to this information in the processing queue of this stream table.In addition, in order to realize, the profound level of message is resolved, in the data packet head information of extracting, comprise many tuple information, many tuple information are in the time carrying out the searching of stream table, relation interdepends between many tuple information, need first to search according to certain monobasic or a few metamessage the result of obtaining, be combined with other metamessages again and carry out next and search, search as required successively, therefore many tuple information are in the time carrying out the searching of stream table, be again to carry out in the mode of serial, thereby realized, the profound level of message resolved.
S103: output after lookup result is integrated.
Owing to comprising a metamessage and many tuple information in the data packet head information of extracting in the embodiment of the present invention, one metamessage is directly searched one-dimensional flow table, and during according to polynary group of many tuple streams of information searching table, need to judge that whether current stream table is idle, judge whether current stream table is taken by other messages, when this stream is shown when occupied to wait in line, therefore the scheme that the embodiment of the present invention provides can effectively realize resolves the profound level of message, and the result that adopts the mode of this parallel connection and series combination effectively to obtain tabling look-up is before carried out association, and effectively improve the treatment effeciency of message.
In addition, in embodiments of the present invention, in order further to realize the profound level of message to be resolved, described according to after many tuple streams table described in described polynary group of information searching definite lookup result, described method also comprises:
Described many tuple information are carried out to secondary parsing;
Obtain each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding, and output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
In embodiments of the present invention in order to realize further profound parsing the to message, when according to polynary group of acquisition of information after corresponding lookup result, these many tuple information are carried out to secondary parsing, obtain each information, in switch, be provided with Secondary Flow table for each information, according to corresponding each Secondary Flow table, each information is searched, obtain corresponding lookup result.
For example, the message receiving is Modbus TCP message, first (12 tuple information comprise: inbound port number to parse 12 tuple information of this message, source MAC, target MAC (Media Access Control) address, VLAN ID, priority, MAC protocol type, source IP address, object IP address, IP protocol type, tcp source port, TCP destination interface, ToS), according to MAC protocol type, IP protocol type, these four information of TCP destination interface and tcp source port can determine that this message is a Modbus TCP message, in this message, comprise MBAP heading, therefore need this message to carry out secondary parsing, parse again the MBAP heading of this message to analyze.
If the message receiving is Ethernet PowerLink message, first parse 4 tuple information (4 tuple information comprise: inbound port, source MAC, target MAC (Media Access Control) address, MAC protocol type) of this message, according to the MAC protocol type in this 4 tuple information, can determine that this message is an Ethernet PowerLink message, but also need packet information to carry out secondary parsing, then the Powerlink type of message, object NODE ID and the source NODE id information that parse this message are to analyze.
A kind of message process chart based on TCAM and FPGA that Fig. 2 provides for the embodiment of the present invention one, this process comprises the following steps:
S201: switch is identified the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extract the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information.
S202: according to the corresponding relation of the each information in the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding.Judge whether current information is a metamessage, in the time that current information is a metamessage, carries out step S203, otherwise, carry out step S204.
S203: the one-dimensional flow table corresponding according to a described metamessage, determine lookup result, carry out afterwards step S207.
S204: judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result.And lookup result is sent to S207 simultaneously.
S205: each many tuple information are carried out to secondary parsing.
S206: obtain each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding.
S207: and output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
The embodiment of the present invention is carrying out in flow stream searching process, search owing to having adopted the parallel mode that adds serial, in addition, also may use secondary streams table, therefore lookup result has multiple, in order to ensure the accuracy of last output, in embodiments of the present invention described lookup result is integrated after output comprise:
In each information of the data packet head obtaining in extraction, add bag descriptor, and obtain the each lookup result that comprises this bag descriptor;
According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding;
In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
By add bag descriptor in data packet head information, identify the message of each result ownership, in addition, due to the message of every type, there is its corresponding packet extracting rule, therefore it is also known obtaining how many lookup results, therefore in the time receiving the lookup result that includes identical bag knowledge descriptor, according to the type of message of its corresponding message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding, when meet lookup result quantity corresponding to this type of message when the current lookup result quantity obtaining, output after each lookup result is integrated, thereby in ensureing message treatment effeciency, improve the accuracy of message processing.
A kind of message processing procedure figure based on TCAM and FPGA that Fig. 3 provides for the embodiment of the present invention two, in this process, switch receives after message, according to the type of message of message, for example specifically can resolve message according to MAC type, according to data packet head extracting rule corresponding to type of message after resolving, extract the data packet head information of this message, what specifically extract can be monobasic information vlan information and MAC information, and many tuple information-12 tuple information.And in each information of extracting, add and wrap descriptor (bag 1 descriptor).
Switch is according to the corresponding relation of each information in save data packet header and stream table, parallel stream table corresponding to each information of searching.Concrete, search vlan table according to the vlan information extracting, according to the MAC information searching MAC table extracting, search 12 tuple tables according to 12 tuple information of extracting.Wherein, in the time searching one-dimensional flow table, while searching vlan table in Fig. 3 and MAC table, directly search corresponding vlan table and MAC table according to vlan information and MAC information, in the time searching 12 tuple table according to 12 tuples, judge that whether this 12 tuple table is idle, in the time that this 12 tuple table is busy, when this 12 tuple table is used by other messages, this 12 tuple information is sent to the processing queue of this 12 tuple table, otherwise this 12 tuple table is searched in a serial according to this 12 tuple, until determine lookup result.
After searching each stream table, obtain each lookup result, in Fig. 3, be designated action 1, action 2 and action 3, wherein move 1~all carry identical bag descriptor (bag 1 descriptor) in action 3.
12 tuples of extracting are carried out to secondary parsing, extract each custom field, according to the corresponding relation between each custom field and the secondary streams table preserved, search each secondary streams table according to each custom field.As shown in Figure 3, search respectively self-defined table 1~self-defined table 3 according to each custom field, after tabling look-up, obtain each checking result, in Fig. 3, be designated action 4, action 5 and action 6, wherein, in action 4~action 6, also carry identical bag descriptor (bag 1 descriptor).
According to the each lookup result that carries identical bag descriptor obtaining, according to the type of message of this message, whether the quantity that judges the current lookup result obtaining meets the lookup result quantity that this type of message is corresponding, in the time meeting, and output after each lookup result is integrated.
In embodiments of the present invention, in order further to improve the treatment effeciency of message, multiple many tuple streams tables can be set, concrete can arrange the highest multiple tuple stream tables.The type of message of the various messages that receive according to switch, and many tuple information of comprising in data packet head information in the message of every type extracting, the highest tuple in can specified data header packet information is how many tuples, according to this highest tuple, the highest multiple tuple stream tables are set, be convenient to follow-up searching, for example, in the data packet head information that switch extracts, include 4 tuple information, 7 tuple information, 12 tuple information and 15 tuple information, the highest tuple stream table is 15 tuple stream tables.
In the time comprising the highest multiple tuple stream table, determine that lookup result comprises:
Judge the priority of described message;
In the time that the priority of described message meets default priority conditions, judge that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority,
In the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle; In the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
In embodiments of the present invention the highest multiple tuple stream tables are divided into two groups, wherein one group is many tuple streams table of the first priority, and another group is many tuple streams table of the second priority, and for type of message, default priority conditions, is also divided into different priority by message.
In the time judging that message meets default priority conditions, when this message belongs to high priority message, adopt many tuple streams table of the first priority to search, if each many tuple streams table of the first priority is busy, and while there is idle many tuple streams table in the second priority, also can adopt many tuple streams table of the second priority to search, if the first priority and the second priority do not exist idle many tuple streams table, these many tuple information are sent in the processing queue of many tuple streams table of the first priority.
In the time judging that this message does not meet default priority conditions, when this message belongs to low priority message, adopt many tuple streams table of the second priority to search, in the time that each many tuple streams table of the second priority is busy, these many tuple information are sent in the processing queue of many tuple streams table of the second priority.
A kind of message processing procedure figure based on TCAM and FPGA that Fig. 4 provides for the embodiment of the present invention three, this process comprises the following steps:
S401: switch is identified the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extract the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information.
S402: according to the corresponding relation of the each information in the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding.Judge whether current information is a metamessage, in the time that current information is a metamessage, carries out step S403, otherwise, carry out step S404.
S403: the one-dimensional flow table corresponding according to a described metamessage, determine lookup result, carry out afterwards step S407.
S404: whether the priority that judges described message meets default priority conditions, when judged result is carried out step S405 when being, otherwise, carry out step S406.
S405: whether the each many tuple streams table that judges the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority.And determining after lookup result, lookup result is sent to step S409.
S406: whether the each many tuple streams table that judges the second priority is idle; In the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.And determining after lookup result, lookup result is sent to step S409.
S407: each many tuple information are carried out to secondary parsing.
S408: obtain each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding.
S409: and output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
Or, in embodiments of the present invention, in order further to improve the treatment effeciency of message, one one or several the highest tuple stream table and multiple conventional tuple stream table can be set, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set.
Wherein, determine that lookup result comprises:
According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table;
In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
In the above embodiment of the present invention, the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length according to switch, conventional many tuple streams table is set, for example switch is in half a year or year, in the message receiving, have 4 a large amount of tuple information, 5 tuple information, 3 tuple information etc., conventional tuple stream table can be 5 tuple stream tables.And conventional tuple stream table can arrange multiple, is convenient to follow-up searching.
In addition, the type of message of the various messages that receive according to switch, and many tuple information of comprising in data packet head information in the message of every type extracting, the highest tuple in can specified data header packet information is how many tuples, according to this highest tuple, the highest multiple tuple stream tables are set, be convenient to follow-up searching, for example, in the data packet head information that switch extracts, include 4 tuple information, 7 tuple information, 12 tuple information and 15 tuple information, the highest tuple stream table is 15 tuple stream tables.
When receiving after each message, according to the type of message identifying, judge whether this type of message meets conventional type of message corresponding to tuple stream table, this is because every kind of its corresponding packet extracting rule of type of message is determined, and many tuple information that every kind of type of message extracts are also known, therefore can judge according to the type of message of message whether the many tuple information in the data packet head information of this message adopt conventional tuple stream table to search.
In the time determining that this type of message meets type of message corresponding to conventional tuple stream table, adopt conventional tuple stream table to search, otherwise, adopt the highest tuple stream table to search.In addition, in order to ensure the treatment effeciency of message, can also further multiple conventional tuple stream tables be classified, be divided into different priority groups, and for type of message, message is carried out the division of priority simultaneously, the message of high priority can adopt the conventional tuple stream table of high priority and the idle conventional tuple flow stream searching of low priority, and the message of low priority can only adopt the conventional tuple stream table of low priority to search.
Fig. 5 processes schematic diagram for a kind of message based on TCAM and FPGA that the embodiment of the present invention four provides, and is convenient to further illustrate the technique effect of the embodiment of the present invention.In Fig. 5, in the time that switch receives message 1, the input time of this message 1, the time that receives this message 1 is 00.According to the type of message of this message, adopt corresponding packet extracting rule, extract the data packet head information of message, also can be expressed as the time that this packet resolves is 01, parallel stream table corresponding to each data packet head information of searching.
The coupling deadline of wherein searching stream table 1 is 02, determine that time of lookup result is 02 (action1 the time of advent 02) in Fig. 5, the coupling deadline of searching stream table 2 is 03, determine that time of lookup result is 03 (action2 the time of advent 03) in Fig. 5, now, stream table 2 is many tuple streams table, and polynary group of informational needs in data packet head information searched this many tuple streams table successively according to the mode of serial, so consuming time longer comparatively speaking.
Many tuple information in data header packet information are carried out to secondary parsing, the time completing is 04, parsing obtains 4 information, the corresponding corresponding Secondary Flow table of each information is respectively stream table 3~stream table 6, parallel search each stream table, searching the time of having mated is all 05, determines that time of lookup result is 05 (action3~action6 the time of advent 05) in Fig. 5.
According to bag 1 descriptor information of carrying in the type of message of this message and each lookup result, to determine when the quantity of this lookup result data packet number corresponding with this type of message is identical, result is integrated to output, and the output time of final action is 06.Known according to foregoing description, in the time that message 1 is processed, the output time of final final action is 06, has taken altogether 7 timeslices.
In the time that switch receives message 2, report the input time of this message 2, the time that receives this message 2 is 01.According to the type of message of this message, adopt corresponding packet extracting rule, extract the data packet head information of message, also can be expressed as the time that this packet resolves is 02, parallel stream table corresponding to each data packet head information of searching.
In the data packet head information of message 2 of extracting, only comprise an information, therefore only need search stream table 1, it is 03 that stream table 1 is searched the coupling deadline, and the time of definite lookup result is 03 (action1 the time of advent 04) in Fig. 5.According to bag 2 descriptor information of carrying in the type of message of this message and each lookup result, to determine when the quantity of this lookup result data packet number corresponding with this type of message is identical, result is integrated to output, and the output time of final action is 05.Because message 2, as long as therefore coupling stream table 1 is exportable lookup result in the time 05, without it being processed after the complete message 1 of switch processes, has therefore improved the treatment effeciency of message again.
In the time that switch receives message 3, report the input time of this message 3, the time that receives this message 3 is 02.According to the type of message of this message, adopt corresponding packet extracting rule, extract the data packet head information of message, also can be expressed as the time that this packet resolves is 03, parallel stream table corresponding to each data packet head information of searching.
In the data packet head information of the message 2 extracting, only comprise an information, therefore only need search stream table 2, now flow table 2 idle, it is 05 that stream table 2 is searched the coupling deadline, and the time of determining lookup result is 05 (action1 the time of advent 05) in Fig. 5.According to bag 3 descriptor information of carrying in the type of message of this message and each lookup result, to determine when the quantity of this lookup result data packet number corresponding with this type of message is identical, result is integrated to output, and the output time of final action is 06.Because message 3, as long as therefore coupling stream table 2 is exportable lookup result in the time 06, without it being processed after the complete message 1 of switch processes, has therefore improved the treatment effeciency of message again.
Known according to upper figure, if the mode that adopts serial to search each stream table, handling above-mentioned three messages needs 14 timeslices, and the serial that the employing embodiment of the present invention provides and the flow stream searching mode of parallel combination only need 7 timeslices.Therefore the message processing mode of the embodiment of the present invention effectively raises the efficiency of message processing, and has realized the profound level processing to message.
A kind of message process device structural representation based on TCAM and FPGA that Fig. 6 provides for the embodiment of the present invention, described device comprises:
Resolve extraction module 61, for identifying the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extracts the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information;
Module 62 is searched in storage, for according to the corresponding relation of each information of the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding, wherein, in the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result; In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result;
Arbitration modules 63, for output after lookup result is integrated.
Described device also comprises:
Secondary parsing module 64, for carrying out secondary parsing to described many tuple information;
Module 62 is searched in described storage, also for obtaining each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding;
Described arbitration modules 63, also for output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
Described arbitration modules 63, specifically for adding bag descriptor in each information of the data packet head that obtains in extraction, and obtains the each lookup result that comprises this bag descriptor; According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding; In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
Module 62 is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table, for comprising the highest multiple tuple stream tables, in the time that the priority of described message meets default priority conditions, judges that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority, in the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
Module 62 is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table comprises the highest tuple stream table and multiple conventional tuple stream table, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set; According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table; In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
This concrete device can be arranged in switch.
The embodiment of the present invention provides a kind of message processing method and device based on TCAM and FPGA, in the method, switch is according to the type of message of the message receiving, extract the data packet head information of message, wherein this data packet head information comprises at least one metamessage and at least one many tuple information, parallel search stream table corresponding to each information in each data packet head and integrate Output rusults, and in the time that this data packet head information is many tuple information, judge that whether many tuple streams table corresponding to many tuple information be idle, when busy, this many tuple streams table is sent in the processing queue of described many tuple streams table.Owing to comprising a metamessage and many tuple information in the data packet head information of extracting in the embodiment of the present invention, one metamessage is directly searched one-dimensional flow table, and during according to polynary group of many tuple streams of information searching table, need to judge that whether current stream table is idle, judge whether current stream table is taken by other messages, when this stream is shown when occupied to wait in line, therefore the scheme that the embodiment of the present invention provides can effectively realize resolves the profound level of message, and the result that adopts the mode of this parallel connection and series combination effectively to obtain tabling look-up is before carried out association, and effectively improve the treatment effeciency of message.
The algorithm providing at this is intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration.Various general-purpose systems also can with based on using together with this teaching.According to description above, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.It should be understood that and can utilize various programming languages to realize content of the present invention described here, and the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the specification that provided herein, a large amount of details are described.But, can understand, embodiments of the invention can be put into practice in the situation that there is no these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is grouped together into single embodiment, figure or sometimes in its description.But, the method for the disclosure should be construed to the following intention of reflection: the present invention for required protection requires than the more feature of feature of clearly recording in each claim.Or rather, as reflected in claims below, inventive aspect is to be less than all features of disclosed single embodiment above.Therefore, claims of following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can the module in the equipment in embodiment are adaptively changed and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and can put them in addition multiple submodules or subelement or sub-component.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to combine all processes or the unit of disclosed all features in this specification (comprising claim, summary and the accompanying drawing followed) and disclosed any method like this or equipment.Unless clearly statement in addition, in this specification (comprising claim, summary and the accompanying drawing followed) disclosed each feature can be by providing identical, be equal to or the alternative features of similar object replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature instead of further feature included in other embodiment, the combination of the feature of different embodiment means within scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with compound mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, or realizes with the software module of moving on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and can use in practice microprocessor or digital signal processor (DSP) to realize the some or all functions of passing through the some or all parts in message process device and switch according to the embodiment of the present invention.The present invention can also be embodied as part or all equipment or the device program (for example, computer program and computer program) for carrying out method as described herein.Realizing program of the present invention and can be stored on computer-readable medium like this, or can there is the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or provides with any other form.
It should be noted above-described embodiment the present invention will be described instead of limit the invention, and those skilled in the art can design alternative embodiment in the case of not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed as element or step in the claims.Being positioned at word " " before element or " one " does not get rid of and has multiple such elements.The present invention can be by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim of having enumerated some devices, several in these devices can be to carry out imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title by these word explanations.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if these amendments of the present invention and within modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.
Claims (10)
1. the message processing method based on TCAM and FPGA, is characterized in that, the method comprises:
Switch is identified the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extract the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information;
According to the corresponding relation of the each information in the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding, and output after lookup result is integrated, wherein,
In the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result;
In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result.
2. message processing method as claimed in claim 1, is characterized in that, described according to after many tuple streams table described in described polynary group of information searching definite lookup result, described method also comprises:
Described many tuple information are carried out to secondary parsing;
Obtain each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding, and output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
3. message processing method as claimed in claim 1 or 2, is characterized in that, described by lookup result integrate after output comprise:
In each information of the data packet head obtaining in extraction, add bag descriptor, and obtain the each lookup result that comprises this bag descriptor;
According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding;
In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
4. the message processing method as described in claim 1~3 any one, is characterized in that, in the time that described stream table is many tuple streams table, described many tuple streams table, for comprising the highest multiple tuple stream tables, determines that lookup result comprises:
Judge the priority of described message;
In the time that the priority of described message meets default priority conditions, judge that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority,
In the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle; In the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
5. the message processing method as described in claim 1~3 any one, it is characterized in that, in the time that described stream table is many tuple streams table, described many tuple streams table comprises the highest tuple stream table and multiple conventional tuple stream table, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set;
Wherein, determine that lookup result comprises:
According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table;
In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
6. the message process device based on TCAM and FPGA, is characterized in that, described device comprises:
Resolve extraction module, for identifying the type of message of the message receiving, the data packet head extracting rule corresponding according to the type of message recognizing, extracts the data packet head information of this message, wherein said data packet head information comprises at least one metamessage, and at least one many tuple information;
Module is searched in storage, for according to the corresponding relation of each information of the data packet head of preserving and stream table, each stream table that the each information of parallel search is corresponding, wherein, in the time that this information is a metamessage, the one-dimensional flow table corresponding according to a described metamessage, determines lookup result; In the time that this information is many tuple information, judge whether many tuple streams table corresponding to described many tuple information be current idle, in the time that described many tuple streams table is busy, described many tuple information are sent in the processing queue of described many tuple streams table, otherwise, according to many tuple streams table described in described polynary group of information searching definite lookup result;
Arbitration modules, for output after lookup result is integrated.
7. message process device as claimed in claim 6, is characterized in that, described device also comprises:
Secondary parsing module, for carrying out secondary parsing to described many tuple information;
Module is searched in storage, also for obtaining each information according to after resolving, and Secondary Flow table corresponding to each information, the Secondary Flow table that the each information of parallel search is corresponding;
Arbitration modules, also for output after the lookup result of lookup result and a metamessage and many tuple information is integrated.
8. the message process device as described in claim 6 or 7, is characterized in that, described arbitration modules specifically for adding bag descriptor in each information of the data packet head that obtains in extraction, and obtains the each lookup result that comprises this bag descriptor; According to the type of message of described message, judge whether the current quantity that obtains lookup result meets the lookup result quantity that this type of message is corresponding; In the time that the current lookup result quantity obtaining meets lookup result quantity corresponding to this type of message, output after each lookup result is integrated.
9. the message process device as described in claim 6~8 any one, it is characterized in that, module is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table is for comprising the highest multiple tuple stream tables, in the time that the priority of described message meets default priority conditions, judge that whether each many tuple streams table of the first priority is idle, in the time there is idle many tuple streams table in the first priority, according to the many tuple streams table of the first priority free time described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the first priority is busy, whether the each many tuple streams table that judges the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to many tuple streams table of the second priority idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of many tuple streams table of described the first priority, in the time that the priority of described message does not meet default priority conditions, judge that whether each many tuple streams table of the second priority is idle, in the time there is idle many tuple streams table in the second priority, according to idle many tuple streams table described in described polynary group of information searching definite lookup result, in the time that each many tuple streams table of described the second priority is busy, described many tuple information are sent in the processing queue of many tuple streams table of described the second priority.
10. the message process device as described in claim 6~8 any one, it is characterized in that, module is searched in described storage, specifically in the time that described stream table is many tuple streams table, described many tuple streams table comprises the highest tuple stream table and multiple conventional tuple stream table, wherein, according to the many tuple information that comprise in each data packet head in the type of message receiving in setting-up time length, conventional tuple stream table is set; According to the type of message of the message receiving, in the time that described type of message meets type of message corresponding to conventional tuple stream table, judge whether to exist idle conventional tuple stream table, in the time there is idle conventional tuple stream table, according to conventional tuple stream table idle described in described polynary group of information searching definite lookup result, otherwise, described many tuple information are sent in the processing queue of described conventional tuple stream table; In the time that described type of message does not meet type of message corresponding to conventional tuple stream table, judge that whether the highest tuple stream table is idle, in the time that the highest tuple stream table is idle, according to the highest tuple stream table described in described polynary group of information searching definite lookup result, otherwise, described in described many tuple information are sent in the processing queue of the highest tuple stream table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410211306.1A CN104009924B (en) | 2014-05-19 | 2014-05-19 | Message processing method and device based on TCAM and FPGA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410211306.1A CN104009924B (en) | 2014-05-19 | 2014-05-19 | Message processing method and device based on TCAM and FPGA |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104009924A true CN104009924A (en) | 2014-08-27 |
CN104009924B CN104009924B (en) | 2017-04-12 |
Family
ID=51370419
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410211306.1A Active CN104009924B (en) | 2014-05-19 | 2014-05-19 | Message processing method and device based on TCAM and FPGA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104009924B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106330722A (en) * | 2016-10-26 | 2017-01-11 | 杭州迪普科技有限公司 | Method for establishing routing cache entry and packet forwarding method and device |
CN110113265A (en) * | 2019-05-16 | 2019-08-09 | 济南浪潮高新科技投资发展有限公司 | More I2C interface interconnected methods and module based on FPGA |
CN112468413A (en) * | 2020-11-26 | 2021-03-09 | 迈普通信技术股份有限公司 | Message processing method and device, electronic equipment and storage medium |
CN112565090A (en) * | 2020-11-09 | 2021-03-26 | 烽火通信科技股份有限公司 | High-speed forwarding method and device |
CN114221849A (en) * | 2020-09-18 | 2022-03-22 | 芯启源(南京)半导体科技有限公司 | Method for realizing intelligent network card by combining FPGA with TCAM |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030214948A1 (en) * | 2002-05-18 | 2003-11-20 | Jin Seung-Eui | Router providing differentiated quality of service (QoS) and fast internet protocol packet classifying method for the router |
CN1466340A (en) * | 2002-06-24 | 2004-01-07 | �人��������������ι�˾ | Method for forwarding data by strategic stream mode and data forwarding equipment |
CN1937574A (en) * | 2005-09-19 | 2007-03-28 | 北京大学 | Network flow classifying, state tracking and message processing device and method |
CN101247337A (en) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | Packet forwarding method and equipment |
CN103023800A (en) * | 2012-11-29 | 2013-04-03 | 北京航空航天大学 | Method for scheduling traffic under multi-core network processor by traffic chart mapping scheduling strategy |
CN103095583A (en) * | 2012-11-09 | 2013-05-08 | 盛科网络(苏州)有限公司 | Method achieving Open flow two-stage flow table through chip loopback and system thereof |
CN103401777A (en) * | 2013-08-21 | 2013-11-20 | 中国人民解放军国防科学技术大学 | Parallel search method and system of Openflow |
CN103685041A (en) * | 2012-09-04 | 2014-03-26 | 清华大学 | Programmable router and routing method based on bit granularity |
-
2014
- 2014-05-19 CN CN201410211306.1A patent/CN104009924B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030214948A1 (en) * | 2002-05-18 | 2003-11-20 | Jin Seung-Eui | Router providing differentiated quality of service (QoS) and fast internet protocol packet classifying method for the router |
CN1466340A (en) * | 2002-06-24 | 2004-01-07 | �人��������������ι�˾ | Method for forwarding data by strategic stream mode and data forwarding equipment |
CN1937574A (en) * | 2005-09-19 | 2007-03-28 | 北京大学 | Network flow classifying, state tracking and message processing device and method |
CN101247337A (en) * | 2008-02-18 | 2008-08-20 | 华为技术有限公司 | Packet forwarding method and equipment |
CN103685041A (en) * | 2012-09-04 | 2014-03-26 | 清华大学 | Programmable router and routing method based on bit granularity |
CN103095583A (en) * | 2012-11-09 | 2013-05-08 | 盛科网络(苏州)有限公司 | Method achieving Open flow two-stage flow table through chip loopback and system thereof |
CN103023800A (en) * | 2012-11-29 | 2013-04-03 | 北京航空航天大学 | Method for scheduling traffic under multi-core network processor by traffic chart mapping scheduling strategy |
CN103401777A (en) * | 2013-08-21 | 2013-11-20 | 中国人民解放军国防科学技术大学 | Parallel search method and system of Openflow |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106330722A (en) * | 2016-10-26 | 2017-01-11 | 杭州迪普科技有限公司 | Method for establishing routing cache entry and packet forwarding method and device |
CN106330722B (en) * | 2016-10-26 | 2019-11-12 | 杭州迪普科技股份有限公司 | A kind of method creating route-caching item, the method and device that E-Packets |
CN110113265A (en) * | 2019-05-16 | 2019-08-09 | 济南浪潮高新科技投资发展有限公司 | More I2C interface interconnected methods and module based on FPGA |
CN114221849A (en) * | 2020-09-18 | 2022-03-22 | 芯启源(南京)半导体科技有限公司 | Method for realizing intelligent network card by combining FPGA with TCAM |
CN114221849B (en) * | 2020-09-18 | 2024-03-19 | 芯启源(南京)半导体科技有限公司 | Method for realizing intelligent network card by combining FPGA with TCAM |
CN112565090A (en) * | 2020-11-09 | 2021-03-26 | 烽火通信科技股份有限公司 | High-speed forwarding method and device |
CN112468413A (en) * | 2020-11-26 | 2021-03-09 | 迈普通信技术股份有限公司 | Message processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104009924B (en) | 2017-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220321404A1 (en) | Programmable Protocol Parser For NIC Classification And Queue Assignments | |
US10212133B2 (en) | Accelerated pattern matching using pattern functions | |
CN104009924A (en) | Message processing method and device based on TCAM and FPGA | |
US9774707B2 (en) | Efficient packet classification for dynamic containers | |
US20230216940A1 (en) | Efficient packet classification for dynamic containers | |
US10608991B2 (en) | Systems and methods for accelerated pattern matching | |
US11609556B2 (en) | Control method and device based on industrial ethernet | |
CN1311607A (en) | Selected priority mode for digital communiation exchanger | |
CN105429879B (en) | Flow entry querying method, equipment and system | |
CN105376159A (en) | Packet processing and forwarding device and method | |
US11281648B2 (en) | Technologies for flexible tree-based lookups for network devices | |
CN104468365A (en) | Method, system and device for obtaining topology connection relationship between devices | |
CN108200092A (en) | Accelerate the method and system of message ACL matching treatments based on NFV technologies | |
CN111246406A (en) | Short message sending method, system, storage medium and terminal equipment | |
CN102915344B (en) | SQL (structured query language) statement processing method and device | |
EP3253030B1 (en) | Method and device for reporting openflow switch capability | |
WO2015176212A1 (en) | Tcam and fpga-based packet processing method and device | |
US9590897B1 (en) | Methods and systems for network devices and associated network transmissions | |
US9294399B2 (en) | Method for learning media access control address, network device, and system | |
WO2015187200A1 (en) | Efficient packet classification for dynamic containers | |
CN105634999A (en) | Aging method and device for medium access control address | |
CN105323164A (en) | Method of reducing latency in a flexible parser and an apparatus thereof | |
US10462017B2 (en) | Network property verification in hybrid networks | |
CN112019459A (en) | Message processing method and system based on dynamic online and offline of equipment in stacking system | |
CN100568851C (en) | A kind of method of fire compartment wall packet filtering |
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 |