Data forwarding method and data forwarding system
By introducing multi-level forwarding modules and schedulers in the data forwarding system, the problems of resource dense and limited application range when traditional protocol pipelines are added to the protocol specifications are solved, and flexible processing and wide application of protocol messages are realized.
Patent Information
- Application Number
- CN202411570112.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-06
AI Technical Summary
When adding supported protocol specifications, traditional protocol pipelines need to undergo resource-intensive modifications and increments, resulting in limited application scope and inability to flexibly process custom protocol messages.
By introducing multi-level forwarding modules and multi-level schedulers in the data forwarding system, including module behavior schedulers and table item behavior schedulers, flexible processing of protocol messages is achieved.
It greatly increases the flexible processing process of protocol messages, avoids solidified logic, expands the application scope, and can flexibly process custom protocol messages.
Smart Images

Figure CN119071367B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a data forwarding method and a data forwarding system. Background Art
[0002] Traditional protocol pipelines can only parse and process protocol messages within the chip specifications, and perform table lookup, forwarding and message editing according to established processes. Location protocols need to be sent to the CPU or discarded.
[0003] When the chip needs to increase the supported protocol specifications, it is necessary to make incremental additions in the traditional protocol pipeline, and sometimes even need to modify the protocol processing flow and architecture, which consumes a lot of resources. Modifying and adding a large number of resources and logic can often only add one or two specific protocols, and the application scope is limited. Summary of the invention
[0004] The present application provides a data forwarding method and a data forwarding system, which have the advantages of being able to flexibly process custom protocol messages, greatly increasing the flexible processing flow of protocol messages, no longer solidifying logic, and having a wide range of applications.
[0005] To achieve the purpose of this application, this application provides the following technical solutions:
[0006] In a first aspect, the present application provides a data forwarding system, the data forwarding system comprising:
[0007] Multi-stage forwarding modules are connected in series;
[0008] A multi-level scheduler is respectively connected between adjacent forwarding modules; each level of the scheduler sequentially schedules the protocol messages forwarded by the forwarding module connected to its input end; each scheduler includes a module behavior scheduler and a table behavior scheduler; the module behavior scheduler includes a first input end, a second input end and an output end; the first input end of the module behavior scheduler is connected to the current level forwarding module; the table behavior scheduler includes an input end and an output end; the input end of the table behavior scheduler is connected to the output end of the module behavior scheduler, and the output end of the table behavior scheduler is connected to the input end of the next level forwarding module and the second input end of the module behavior scheduler connected to it; the module behavior scheduler is used to perform module behavior operation scheduling on the internal behavior of the forwarding module connected to its input end; the table behavior scheduler is used to perform label table behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it.
[0009] In the data forwarding system of the present application, a scheduler is added, which includes a module behavior scheduler and a table item behavior scheduler. By combining module behavior scheduling with label table item behavior scheduling, all protocol messages can be processed, which greatly increases the flexible processing flow of protocol messages, eliminates solidified logic, and has a wide range of applications.
[0010] In one of the embodiments, each level of the forwarding module includes multiple internal behaviors, and the module behavior scheduler performs module behavior operation scheduling on the internal behaviors of the forwarding modules connected to its input end in turn; each module behavior operation scheduling needs to execute multiple label table item behavior scheduling, and each table item behavior scheduler executes each label table item behavior scheduling in turn.
[0011] In one of the embodiments, each of the forwarding modules includes a register therein, and the register is used to send a behavior label of the first internal behavior to the module behavior scheduler.
[0012] In one of the embodiments, it further includes a plurality of IP forwarding cores, wherein the IP forwarding core is connected between the forwarding module and the scheduler, and is connected to the forwarding module and the scheduler via a bus.
[0013] In one of the embodiments, the module behavior operation scheduling includes shifting, copying or deleting.
[0014] In a second aspect, the present application further provides a data forwarding method, which is executed based on the data forwarding system described in the first aspect; the data forwarding method comprises: the schedulers at each level sequentially schedule the protocol messages forwarded by the forwarding modules connected to the input ends thereof, and the schedulers at each level schedule the protocol messages forwarded by the forwarding modules connected to the input ends thereof, including:
[0015] The module behavior scheduler performs module behavior operation scheduling on the internal behavior of the forwarding module connected to its input end;
[0016] The table item behavior scheduler performs label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected thereto.
[0017] In the data forwarding method of the present application, a scheduler is added, and the scheduler includes a module behavior scheduler and a table item behavior scheduler. By combining module behavior scheduling and label table item behavior scheduling, the processing of all protocol messages can be completed, which greatly increases the flexible processing flow of protocol messages, no longer solidifies the logic, and has a wide range of applications.
[0018] In one embodiment, each level of the forwarding module includes multiple internal behaviors, and each module behavior operation scheduling needs to execute multiple label table item behavior scheduling;
[0019] The table item behavior scheduler sequentially schedules the module behavior operation currently executed by the module behavior scheduler connected to it;
[0020] The module behavior scheduler sequentially schedules the internal behavior of the forwarding module connected to its input end; during each module behavior operation scheduling process, after all the label table item behavior scheduling is completed, the next module behavior operation scheduling is executed.
[0021] In one embodiment, the module behavior scheduler performs module behavior operation scheduling on each internal behavior of the forwarding module connected to its input end, including:
[0022] Find the configuration of the current module behavior scheduler to confirm whether the current internal behavior needs to execute module behavior operation scheduling;
[0023] If so, the message information of the protocol message that needs to be modified is scheduled;
[0024] If not, the module behavior scheduler performs module behavior operation scheduling on the next internal behavior of the forwarding module connected to its input end.
[0025] In one embodiment, the table item behavior scheduler performs various tag table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected thereto, including:
[0026] Read the configuration of the current table entry behavior scheduler;
[0027] The message information obtained from the module behavior scheduler connected thereto is sequentially scheduled for each label table item behavior.
[0028] In one embodiment, each forwarding module includes a register; before the module behavior scheduler sequentially schedules module behavior operations on the internal behaviors of the forwarding modules connected to its input end, the register sends a behavior label of the first internal behavior to the module behavior scheduler. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 is a structural block diagram of a data forwarding system provided in an embodiment of the present application;
[0031] Figure 2 It is a flow chart of scheduling protocol messages forwarded by forwarding modules connected to their input ends in a data forwarding method provided in another embodiment of the present application;
[0032] Figure 3 It is a flow chart of a module behavior scheduler performing module behavior operation scheduling on each internal behavior of a forwarding module connected to its input end in a data forwarding method provided in another embodiment of the present application;
[0033] Figure 4 It is a flow chart of a data forwarding method provided in another embodiment of the present application, in which an X-th level module behavior scheduler performs module behavior operation scheduling on each internal behavior of a forwarding module connected to its input end;
[0034] Figure 5 It is a flow chart of a data forwarding method provided in another embodiment of the present application, in which a table item behavior scheduler performs label table item behavior scheduling on a module behavior operation scheduling currently executed by a module behavior scheduler connected to it;
[0035] Figure 6 It is a flow chart of a data forwarding method provided in another embodiment of the present application, in which the X-th level item behavior scheduler performs label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it.
[0036] Description of Reference Numerals
[0037] 10: first-level forwarding module, 11: second-level forwarding module, 12: third-level forwarding module, 13: fourth-level forwarding module; 20: first-level scheduler, 21: second-level scheduler, 22: third-level scheduler; 201: first-level module behavior scheduler, 211: second-level module behavior scheduler, 221: third-level module behavior scheduler; 202: first-level table item behavior scheduler, 212: second-level table item behavior scheduler, 222: third-level table item behavior scheduler. DETAILED DESCRIPTION
[0038] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0040] In one embodiment, the present application provides a data forwarding system, which may include: a multi-stage forwarding module (module) and a multi-stage dispatcher (Dispatch); the multi-stage forwarding modules are connected in series in sequence; the multi-stage dispatchers are respectively connected between adjacent forwarding modules; the dispatchers at each stage sequentially dispatch the protocol messages forwarded by the forwarding modules connected to their input ends; each dispatcher includes a module action dispatcher (dispatch moduleaction) and a table action dispatcher (dispatch table action dispatcher); action); the module behavior scheduler includes a first input terminal, a second input terminal and an output terminal; the first input terminal of the module behavior scheduler is connected to the current level forwarding module; the table item behavior scheduler includes an input terminal and an output terminal; the input terminal of the table item behavior scheduler is connected to the output terminal of the module behavior scheduler, and the output terminal of the table item behavior scheduler is connected to the input terminal of the next level forwarding module and the second input terminal of the module behavior scheduler connected thereto; the module behavior scheduler is used to perform module behavior operation scheduling on the internal behavior of the forwarding module connected to its input terminal; the table item behavior scheduler is used to perform label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected thereto.
[0041] In the data forwarding system of the present application, a scheduler is added, which includes a module behavior scheduler and a table item behavior scheduler. By combining module behavior scheduling with label table item behavior scheduling, all protocol messages can be processed, which greatly increases the flexible processing flow of protocol messages, eliminates solidified logic, and has a wide range of applications.
[0042] As an example, the number of levels of the forwarding module can be set according to actual needs, and the number of levels of the scheduler can also be set according to actual needs; for example, the number of levels of the forwarding module and the number of levels of the scheduler can both be N levels, and N can be an integer greater than or equal to 1.
[0043] For details, please refer to Figure 1 , Figure 1 In the example, the number of levels of the forwarding module is 4 and the number of levels of the scheduler is 3. Figure 1In the embodiment, the forwarding modules at the four levels can be respectively the first-level forwarding module 10, the second-level forwarding module 11, the third-level forwarding module 12 and the fourth-level forwarding module 13; the schedulers at the three levels can be respectively the first-level scheduler 20, the second-level scheduler 21 and the third-level scheduler 22. The first-level scheduler 20 can include the first-level module behavior scheduler 201 and the first-level table item behavior scheduler 202, the second-level scheduler 21 can include the second-level module behavior scheduler 211 and the second-level table item behavior scheduler 212, and the third-level scheduler 22 can include the third-level module behavior scheduler 221 and the third-level table item behavior scheduler 222. The input end of the first-level forwarding module 10 can receive input protocol messages. The first input end of the first-level module behavior scheduler 201 is connected to the output end of the first-level forwarding module 10. The input end of the first-level table item behavior scheduler 202 is connected to the output end of the first-level module behavior scheduler 201, and the input end of the first-level table item behavior scheduler 202 is connected to the input end of the second-level forwarding module 11 and the second input end of the first-level module behavior scheduler 201. The first input end of the second-level module behavior scheduler 211 is connected to the output end of the second-level forwarding module 11. The input end of the second-level table item behavior scheduler 212 is connected to the output end of the second-level module behavior scheduler 211; the output end of the second-level table item behavior scheduler 212 is connected to the input end of the third-level forwarding module 12 and the second input end of the second-level module behavior scheduler 211. The first input end of the third-level module behavior scheduler 221 is connected to the output end of the third-level forwarding module 12. The input end of the third-level table item behavior scheduler 222 is connected to the output end of the third-level module behavior scheduler 221; the output end of the third-level table item behavior scheduler 222 is connected to the input end of the fourth-level forwarding module 13 and the second input end of the third-level module behavior scheduler 221. The fourth-level forwarding module 13 is used as the last-level forwarding module, and the output end of the fourth-level forwarding module 13 is used to output the processed protocol message.
[0044] It should be noted that, in other examples, the number of levels of the forwarding module and the number of levels of the scheduler are not based on Figure 1 Limits shown.
[0045] As an example, the forwarding modules at each level adopt a pipeline mode with a fixed process. In some examples, a certain forwarding module can be skipped based on the actual configuration, that is, some forwarding modules may not process the protocol message forwarded by the forwarding module at the previous level, but directly jump to the next forwarding module.
[0046] As an example, each level of the forwarding module includes multiple internal behaviors, and the module behavior scheduler performs module behavior operation scheduling on the internal behaviors of the forwarding modules connected to its input end in turn; each module behavior operation scheduling needs to execute multiple label table item behavior scheduling, and each table item behavior scheduler executes each label table item behavior scheduling in turn.
[0047] As an example, each forwarding module includes a register (not shown) therein, and the register is used to send a behavior label of the first internal behavior to the module behavior scheduler, that is, the first label of each forwarding module is configured by the register in the forwarding module.
[0048] As an example, the module behavior scheduler at each level is used to perform module behavior operation scheduling between the internal behaviors in the forwarding module connected to its input end. When all the internal behaviors of the current forwarding module are executed, the scheduling at this level will end and jump to the next level of forwarding module. The module behavior scheduler connected to the output end of the next level of forwarding module will continue to perform label processing on its internal behavior (i.e., module behavior operation scheduling).
[0049] As an example, each of the module behavior operation scheduling needs to execute multiple label item behavior scheduling, and each of the item behavior schedulers executes each label item behavior scheduling in sequence; that is, when all the item scheduling behaviors in the current module behavior operation scheduling of the current internal behavior are executed, it will jump to the next module behavior operation scheduling of the current internal behavior, and continue to execute all the item scheduling behaviors of the next module behavior operation scheduling in sequence.
[0050] As an example, the internal behaviors of the forwarding modules at each level may adopt a label mode, which is configured by a label table entry (Label_table), and the labels may be cascaded in a linked list form.
[0051] As an example, the schedulers at all levels are forwarding schedulers, including module behavior schedulers and table item behavior schedulers. The module behavior schedulers and the table item behavior schedulers can both perform scheduling based on labels.
[0052] As an example, the module action label (module_action) and the table action label (table_action) of the module action scheduler may be stored in the form of table entries. The data structure of the module action label may be as shown in Table 1 below.
[0053] Table 1: Data structure of module behavior labels
[0054]
[0055] In Table 1, Action_Opcode (behavior operation type) indicates the operation type of the current behavior. The behavior operation type supports shift, copy and delete, that is, the module behavior operation scheduling may include shift, copy or delete; with bit as the granularity, data is moved / copied / deleted from the message content (SOP) / message descriptor / table / queue (FIFO) / temporary immediate register (imm_reg[n]) and the like to the SOP / message descriptor / table / queue / temporary immediate register and the like.
[0056] As an example, when the behavior operation type Action_Opcode=0xFF, it means that all internal behaviors in the current forwarding module have been processed and it is possible to jump to the next-level forwarding module.
[0057] As an example, regarding the data length of the module behavior label shown in Table 1, the following operation can be used: dst_len (the length of the destination data) and src_len (the length of the source data) are in bit granularity. In principle, the values of the two should be equal. If the two are not equal, the following processing can be used to handle them:
[0058] If src_len>dst_len: take src_data[dst_len-1:0] and perform operation / calculation with dst_data;
[0059] If src_len<dst_len: fill the high bits of src_data with 0 and then perform operation / calculation with dst_data.
[0060] As an example, the data forwarding system may further include a plurality of IP forwarding cores (IP_cores), wherein the IP forwarding cores are connected between the forwarding module and the scheduler, and are connected to the forwarding module and the scheduler via a bus.
[0061] As an example, the IP forwarding core can be a data channel of hardware logic, which is forwarded based on the label by the scheduler. In order to realize the business functions, in the hardware logic, it is standardized as much as possible to cut into multiple IP forwarding cores; for example, register query core (CSR_CORE), table query core (TABLE_CORE), TCAM query core (TCAM_CORE), HASH query core (HASH_CORE), state machine (STAT_CORE), speed limit (METER_CORE) and various function cores (FUNCTION_CORE); the function core may include: checksum check function (Checksum), IPV6 forwarding function (IPv6 next_header), L2 table query function (L2 searching), L2 learning function (L2 Learning), TAG function (TAG_action), IP packet check function (IP_check) and other functions.
[0062] As an example, during the service processing, the data forwarding system uses a data structure of a message descriptor of a protocol message to be designed in a preset + user-defined manner, and the hardware logic operates on the custom field according to the user's instructions.
[0063] As an example, in the table entry data structure, Action_Opcode=0xFF, indicating that all label table entry behavior scheduling in the current table entry has been processed, and the label table entry behavior scheduling returns data to modify the content of the protocol message, and at the same time modifies the characteristic information carried by the protocol message.
[0064] As an example, the data forwarding system may further include a packet buffer container (Packet buffer), which stores complete protocol packets and, at the same time, copies a copy of the packet data (SOP) in parallel with the protocol packet descriptor.
[0065] As an example, the data forwarding system of the present application can perform on-the-fly editing of message data based on label behavior (Label_action) (label behavior can include the above-mentioned module behavior scheduling and label table item behavior scheduling), and modify the message editing related parameters in the message descriptor for use by the message editing module. The parameters can be as follows: dirty data length (dirty_len): the length of the original message to be modified, in bytes; new data length (renew_len): the length of the new message to be replaced, in bytes; check bit modification flag bit (renew_checksum): whether the checksum needs to be recalculated.
[0066] In the data forwarding system of the present application, a scheduler is added, which includes a module behavior scheduler and a table item behavior scheduler. By combining module behavior scheduling with label table item behavior scheduling, all protocol messages can be processed, which greatly increases the flexible processing flow of protocol messages, eliminates solidified logic, and has a wide range of applications.
[0067] The data forwarding system of the present application also has the beneficial effect of being able to flexibly handle the network forwarding process. For example, the original IPv4 protocol message does not carry a VLAN-TAG (tag), one layer of tag is added to the ingress VLAN module, another layer of tag is added to the egress encapsulation (egressENCAP) module, and the DSCP is modified. The specific process can be as follows:
[0068] 1) Parsing protocol message TAG mark (tag_st) = 0, the protocol message does not have a tag;
[0069] 2) In the ingress VLAN module, the Label_action action is to add a layer of tag, edit the associated SOP, and refresh the dirty_len=12 (dmac+smac) and renew_len=16 (dmac+smac+tag) in the message descriptor;
[0070] 3) In the egress encapsulation (Egress ENCAP) module, the Label_action action is to add a layer of tag, modify the DSCP, edit the associated SOP, and refresh the dirty_len=26 (dmac+smac+et+IP headerchecksum) and renew_len=34 (dmac+smac+tag+tag+et+IP headerchecksum) in the packet descriptor.
[0071] 4) In the editing module (PE module), Label_action pop dirty_len, push renew_len, the data source is the SOP.
[0072] In another embodiment, see Figure 2 The present application also provides a data forwarding method, the data forwarding method is based on Figure 1 and the data forwarding system described in its corresponding embodiments; the data forwarding method includes: the schedulers at each level sequentially schedule the protocol messages forwarded by the forwarding modules connected to their input ends, and the schedulers at each level scheduling the protocol messages forwarded by the forwarding modules connected to their input ends can include the following steps: S11~S12.
[0073] S11: The module behavior scheduler performs module behavior operation scheduling on the internal behavior of the forwarding module connected to its input end.
[0074] S12: The table item behavior scheduler performs label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected thereto.
[0075] In the data forwarding method of the present application, a scheduler is added, and the scheduler includes a module behavior scheduler and a table item behavior scheduler. By combining module behavior scheduling and label table item behavior scheduling, the processing of all protocol messages can be completed, which greatly increases the flexible processing flow of protocol messages, no longer solidifies the logic, and has a wide range of applications.
[0076] As an example, each level of the forwarding module may include multiple internal behaviors, and each module behavior operation scheduling needs to execute multiple label table item behavior scheduling; the table item behavior scheduler performs each label table item behavior scheduling in sequence on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it; the module behavior scheduler performs each module behavior operation scheduling in sequence on the internal behavior of the forwarding module connected to its input end; during each module behavior operation scheduling process, after all the label table item behavior scheduling are completed, the next module behavior operation scheduling is executed.
[0077] As an example, each forwarding module includes a register; before the module behavior scheduler sequentially schedules module behavior operations on the internal behaviors of the forwarding modules connected to its input end, the register sends a behavior label of the first internal behavior to the module behavior scheduler.
[0078] As an example, combine Figure 2 See also Figure 3 The module behavior scheduler performs module behavior operation scheduling on each internal behavior of the forwarding module connected to its input end, including: S111~S113.
[0079] S111: Find the configuration of the current module behavior scheduler to confirm whether the current internal behavior needs to execute module behavior operation scheduling.
[0080] S112: If yes, the message information of the protocol message that needs to be modified is scheduled.
[0081] S113: If not, the module behavior scheduler performs module behavior operation scheduling on the next internal behavior of the forwarding module connected to its input end.
[0082] As an example, see Figure 4, taking the X-th level forwarding module (ModuleX) and the X-th level module behavior scheduler (ModuleX_action scheduler) as an example, X is greater than or equal to 1 and less than or equal to N; the module behavior scheduler performs module behavior operation scheduling on each internal behavior of the forwarding module connected to its input end, which may include the following steps: after receiving the action label (moduleX_first_action_label) of the first internal behavior, the X-th level module behavior scheduler (ModuleX_action scheduler) connected to the X-th level forwarding module (ModuleX) searches the configuration moduleX_action_PTR for the received Next_action_label_ptr, and the ACTION_OPCODE corresponding to is 0xFF, then enters the next moudle, if the ACTION_OPCODE is not 0xFF, then continue to execute the subsequent steps; search the configuration to check whether the module_action (module behavior label) needs to be executed, that is, whether moduleX_actionX_Valid=1; if moduleX_actionX_Valid =1, the table entry behavior scheduler obtains the message information to be modified (UDF, etc.), enters the table entry scheduler, completes the label table entry behavior scheduling of the current action, and then returns to the step of "finding the ACTION_OPCODE corresponding to the Next_action_label_ptr received by moduleX_action_PTR in the configuration is 0xFF, then entering the next moudle, if ACTION_OPCODE is not 0xFF, then continue to execute the subsequent steps" based on the Next_action_Label_ptr signal, and executes its subsequent steps in sequence; if moduleX_actionX_Valid≠1, then based on the Next_action_Label_ptr signal, it returns to the step of "finding the ACTION_OPCODE corresponding to the Next_action_label_ptr received by moduleX_action_PTR in the configuration is 0xFF, then entering the next moudle, if ACTION_OPCODE is not 0xFF, then continue to execute the subsequent steps", and executes its subsequent steps in sequence.
[0083] As an example, see Figure 5 The table item behavior scheduler performs various label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it, including: S121~S122.
[0084] S121: Read the configuration of the current table entry behavior scheduler.
[0085] S122: performing behavior scheduling of each label table item in sequence on the message information obtained from the module behavior scheduler connected thereto.
[0086] As an example, combine Figure 4 See also Figure 6 The table behavior scheduler may include the following steps for scheduling the module behavior operation currently executed by the module behavior scheduler connected to it to schedule various label table behavior items: after the message information to be modified reaches the table behavior scheduler, read the table behavior scheduler configuration; process the acquired message information at the current level with the table behavior label (TABLE_ACTION); after the table behavior label processing at the current level is completed, the table behavior label processing at each level is performed in turn until the table behavior label processing at the last level is completed, and the operation is returned to the X-th level module behavior table item scheduler (ModuleX_action scheduler) to execute the next module behavior label (MODULE_ACTION) processing.
[0087] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features of the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0088] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. A data forwarding system, characterized in that: The data forwarding system comprises: Multi-stage forwarding modules are connected in series; A multi-level scheduler is respectively connected between adjacent forwarding modules; each level of the scheduler sequentially schedules the protocol messages forwarded by the forwarding module connected to its input end; each scheduler includes a module behavior scheduler and a table behavior scheduler; the module behavior scheduler includes a first input end, a second input end and an output end; the first input end of the module behavior scheduler is connected to the current level forwarding module; the table behavior scheduler includes an input end and an output end; the input end of the table behavior scheduler is connected to the output end of the module behavior scheduler, and the output end of the table behavior scheduler is connected to the input end of the next level forwarding module and the second input end of the module behavior scheduler connected to it; the module behavior scheduler is used to perform module behavior operation scheduling on the internal behavior of the forwarding module connected to its input end; the table behavior scheduler is used to perform label table behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it.
2. The data forwarding system according to claim 1, characterized in that: The forwarding modules at each level include multiple internal behaviors, and the module behavior scheduler performs module behavior operation scheduling on the internal behaviors of the forwarding modules connected to their input ends in turn; each module behavior operation scheduling requires the execution of multiple label table item behavior scheduling, and each table item behavior scheduler executes each label table item behavior scheduling in turn.
3. The data forwarding system according to claim 2, characterized in that: Each of the forwarding modules includes a register therein, and the register is used to send a behavior label of the first internal behavior to the module behavior scheduler.
4. The data forwarding system according to claim 1, characterized in that: It also includes a plurality of IP forwarding cores, wherein the IP forwarding core is connected between the forwarding module and the scheduler, and is connected to the forwarding module and the scheduler through a bus.
5. The data forwarding system according to claim 1, characterized in that: The module behavior operation scheduling includes shifting, copying or deleting.
6. A data forwarding method, characterized in that: The data forwarding method is executed based on the data forwarding system according to any one of claims 1 to 5; the data forwarding method comprises: the schedulers at each level sequentially schedule the protocol messages forwarded by the forwarding modules connected to the input ends thereof, and the schedulers at each level schedule the protocol messages forwarded by the forwarding modules connected to the input ends thereof, including: The module behavior scheduler performs module behavior operation scheduling on the internal behavior of the forwarding module connected to its input end; The table item behavior scheduler performs label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected thereto.
7. The data forwarding method according to claim 6, characterized in that: Each level of the forwarding module includes multiple internal behaviors, and each module behavior operation scheduling needs to execute multiple label table item behavior scheduling; The table item behavior scheduler sequentially schedules the module behavior operation currently executed by the module behavior scheduler connected to it; The module behavior scheduler sequentially schedules the internal behavior of the forwarding module connected to its input end; during each module behavior operation scheduling process, after all the label table item behavior scheduling is completed, the next module behavior operation scheduling is executed.
8. The data forwarding method according to claim 7, characterized in that: The module behavior scheduler performs module behavior operation scheduling on each internal behavior of the forwarding module connected to its input end, including: Find the configuration of the current module behavior scheduler to confirm whether the current internal behavior needs to execute module behavior operation scheduling; If so, the message information of the protocol message that needs to be modified is scheduled; If not, the module behavior scheduler performs module behavior operation scheduling on the next internal behavior of the forwarding module connected to its input end.
9. The data forwarding method according to claim 8, characterized in that: The table item behavior scheduler performs various label table item behavior scheduling on the module behavior operation scheduling currently executed by the module behavior scheduler connected to it, including: Read the configuration of the current table entry behavior scheduler; The message information obtained from the module behavior scheduler connected thereto is sequentially scheduled for each label table item behavior.
10. The data forwarding method according to claim 6, characterized in that: Each of the forwarding modules includes a register; before the module behavior scheduler sequentially schedules the module behavior operations of the internal behaviors of the forwarding modules connected to its input end, the register sends a behavior label of the first internal behavior to the module behavior scheduler.
Citation Information
Patent Citations
Realization method for OpenFlow multi-level flow tables based on ordinary switch chip
CN104821890A
Data packet processing system
CN114710571A