Packet processing method supporting heterogeneous multi-protocol routing

By designing business metadata extraction instructions, forwarding rule instructions and forwarding policy instructions, the packets of heterogeneous protocols are processed, and the problem of insufficient functional expansion and generalization capabilities in the existing technology is solved, and flexible expansion of high-performance forwarding and multi-protocol processing is achieved.

CN119922112APending Publication Date: 2025-05-02XIAN INSTITUE OF SPACE RADIO TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411936018.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When the prior art realizes network service switching and routing, the functional expansion and generalization capabilities are insufficient, making it difficult to take into account the flexible expansion of high-performance forwarding and multi-protocol processing.

Method used

By designing business metadata extraction instructions, forwarding rule instructions and forwarding policy instructions, packet processing methods for heterogeneous protocols are processed to realize the packet processing method of heterogeneous multi-protocol routing.

Benefits of technology

It realizes the packet processing of heterogeneous protocols, takes into account the high performance of service forwarding and the flexible expansion of multi-protocols, and supports the software development model that is developed and used multiple times at one time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922112A_ABST
    Figure CN119922112A_ABST
Patent Text Reader

Abstract

The invention relates to a packet processing method supporting heterogeneous multi-protocol routing, which divides the switching and routing functions of heterogeneous multi-protocol packets into a data forwarding function and a process control function, realizes a heterogeneous protocol service sharing data forwarding function, and reflects the difference between different protocols on different forwarding rule sets. And corresponding forwarding rule configuration parameters are generated according to switching routing requirements of different protocols, so that switching and routing functions of protocol services can be realized. A software development mode of one-time development and repeated use is integrally realized, and high performance of service forwarding and flexible expansion of multiple protocols are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to a packet processing method supporting heterogeneous multi-protocol routing. Background Art

[0002] Traditional network service switching and routing are mainly implemented by hard-wired logic devices or dedicated embedded software. The developed software only performs specific functions for specific application scenarios. Although the forwarding performance is strong, the function expansion and generalization capabilities are insufficient. Facing the needs of heterogeneous protocol packet forwarding processing, a packet service processing method with high-performance forwarding capabilities and multi-protocol processing expansion capabilities is required. Summary of the invention

[0003] In view of the above problems, the purpose of the present invention is to provide a packet processing method supporting heterogeneous multi-protocol routing, so as to solve the problem of achieving both high performance of service forwarding and flexible expansion of multiple protocols.

[0004] To achieve the above object, the technical solution adopted by the present invention includes:

[0005] A packet processing method supporting heterogeneous multi-protocol routing, characterized in that the method comprises the following steps:

[0006] S1: Design a set of business metadata extraction instructions based on the processing requirements of heterogeneous protocol packets;

[0007] S2: Design a forwarding rule instruction set based on the processing requirements of the heterogeneous protocol packets;

[0008] S3: Design a forwarding strategy instruction set based on the processing requirements of the packets of the heterogeneous protocols;

[0009] S4: Execute the service metadata extraction instruction, forwarding rule instruction and forwarding strategy instruction respectively for the packets of the heterogeneous protocols to complete the packet processing of the heterogeneous protocols.

[0010] Preferably, the business metadata extraction instruction set in S1 includes multiple business metadata extraction instructions, and any business metadata extraction instruction is set according to a metadata extraction rule, and the metadata extraction rule includes a metadata number, a protocol type, a field offset, and a field length.

[0011] Preferably, the business metadata extraction instruction includes a protocol jump instruction (PMP) and a metadata extraction instruction (MDG).

[0012] Preferably, the forwarding rule instruction set in S2 includes all rules for implementing protocol packet routing processing, and each rule includes a number of jump instructions, arithmetic instructions and output instructions.

[0013] Preferably, the jump instructions include unconditional jump instructions (JMP), equal parameter jump instructions (EMP), unequal parameter jump instructions (UMP), greater than parameter jump instructions (LMP), less than parameter jump instructions (SMP), greater than or equal to parameter jump instructions (LEMP) and less than or equal to parameter jump instructions (SEMP); the output instructions include packet forwarding output instructions (POUT).

[0014] Preferably, the forwarding policy instruction set in S3 includes multiple forwarding policy instructions, and the forwarding policy instruction is a forwarding strategy for packets of heterogeneous protocols. Any forwarding policy instruction includes a packet content replacement instruction (PLST), a packet check instruction (PART) and a packet write instruction (PWRT).

[0015] Preferably, S4 specifically includes the following steps:

[0016] S41: traversing and executing the business metadata extraction instruction set for all input business groups to obtain multiple business metadata sets; wherein any input business group executes all the business metadata extraction instructions in the business metadata extraction instruction set, and the result obtained is the business metadata set corresponding to the input business group;

[0017] S42: traverse and execute the forwarding rule instruction set on the multiple business metadata sets obtained in S41 to obtain a set of forwarding strategies to be executed; wherein any business metadata set executes all the forwarding rule instructions in the forwarding rule instruction set to obtain a set of forwarding strategies to be executed;

[0018] S43: traverse and execute all instructions in the forwarding strategy set obtained in S42 to complete the forwarding process of the service group.

[0019] Preferably, the service metadata is part of the continuous content in the input service grouping, and the length and position of the service metadata in the service grouping can be variable, serving as the smallest unit participating in the service forwarding decision.

[0020] Compared with the prior art, the advantages of the present invention are:

[0021] The present invention is a packet processing method supporting heterogeneous multi-protocol routing, which divides the switching and routing functions of heterogeneous multi-protocol packets into data forwarding functions and process control functions. Heterogeneous protocol services can share data forwarding functions, and reflect the differences between different protocols in the forwarding rule set. Corresponding forwarding rule configuration parameters are generated for the switching and routing requirements of different protocols to complete the switching and routing functions of the protocol service packets. A software development model of one-time development and multiple uses is realized, which takes into account the high performance of service forwarding and the flexible expansion of multiple protocols. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.

[0023] In the figure:

[0024] Figure 1 A diagram showing the division of the process control function and the data forwarding function in the present invention;

[0025] Figure 2 Schematic diagram of the forwarding process of the packet in the present invention;

[0026] Figure 3 It is a schematic diagram of the execution process of various instructions in the present invention;

[0027] Figure 4 The relationship between various instructions in the present invention;

[0028] Figure 5 It is the storage structure of various instructions in the present invention. DETAILED DESCRIPTION

[0029] The invention is not limited to the following specific embodiments, and all equivalent changes made on the basis of the technical solution of this application fall within the protection scope of the present invention. All components and devices in the present invention, unless otherwise specified, are all components and devices known in the prior art.

[0030] Example

[0031] This embodiment discloses a packet processing method supporting heterogeneous multi-protocol routing, which includes the following steps:

[0032] S1: Design a set of business metadata extraction instructions based on the processing requirements of heterogeneous protocol packets;

[0033] S2: Design a forwarding rule instruction set based on the processing requirements of the heterogeneous protocol packets;

[0034] S3: Design a forwarding strategy instruction set based on the processing requirements of the packets of the heterogeneous protocols;

[0035] S4: Execute the service metadata extraction instruction, forwarding rule instruction and forwarding strategy instruction respectively for the packets of the heterogeneous protocols to complete the packet processing of the heterogeneous protocols.

[0036] The business metadata extraction instruction set in S1 of this embodiment includes multiple business metadata extraction instructions, and any of the business metadata extraction instructions is set according to a metadata extraction rule. The metadata extraction rule includes a metadata number, a protocol type, a field offset, and a field length.

[0037] Business metadata extraction instructions include protocol jump instructions (PMP) and metadata extraction instructions (MDG). The instruction length is 32 bits and are defined as follows: Protocol jump instruction (PMP): including 4-bit instruction type 0b0001, 8-bit protocol number and 20-bit jump address; Metadata extraction instruction (MDG): including 4-bit instruction type 0b0010, 8-bit metadata number, 14-bit metadata offset. The metadata offset is the offset of the extracted metadata in the group, in bits and 6-bit metadata length, which is the effective length of the extracted metadata.

[0038] This embodiment assumes that two metadata need to be extracted for the protocol packet with protocol number 0x11. The metadata 1 is numbered 0x01, with an offset of 0 bits and a length of 8 bits; the metadata 2 is numbered 0x02, with an offset of 64 bits and a length of 16 bits. The service metadata extraction instruction set is as follows:

[0039]

[0040] The forwarding rule instruction set in S2 of this embodiment includes all the rules for implementing protocol packet routing processing, and each rule includes a number of jump instructions, arithmetic instructions and output instructions.

[0041] Jump instructions include unconditional jump instruction (JMP), jump instruction if parameter is equal (EMP), jump instruction if parameter is not equal (UMP), jump instruction if parameter is greater than (LMP), jump instruction if parameter is less than (SMP), jump instruction if parameter is greater than or equal to (LEMP), jump instruction if parameter is less than or equal to (SEMP) and packet forwarding output instruction (POUT). The instruction length is 32 bits and is defined as follows:

[0042] Unconditional jump instruction (JMP): includes 4-bit instruction type 0b1111, 28-bit jump address, indicating the execution address of the next instruction. Equal parameter jump instruction (EMP): includes 4-bit instruction type 0b0011, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit verification failure relative jump address; if the rule verification fails, the metadata and forwarding rule parameters are not equal, then jump to the relative jump address instruction to execute, otherwise execute the next instruction. Unequal parameter jump instruction (UMP): includes 4-bit instruction type 0b0100, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit verification failure relative jump address; if the rule verification fails, the metadata and forwarding rule parameters are equal, then jump to the relative jump address instruction to execute, otherwise execute the next instruction. Jump instruction with parameter greater than (LMP): includes 4-bit instruction type 0b0101, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit relative jump address if verification fails; if the rule verification fails and the metadata is less than or equal to the forwarding rule parameter, then jump to the relative jump address instruction to execute, otherwise execute the next instruction. Jump instruction with parameter less than (SMP): includes 4-bit instruction type 0b0110, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit relative jump address if verification fails; if the rule verification fails and the metadata is greater than or equal to the forwarding rule parameter, then jump to the relative jump address instruction to execute, otherwise execute the next instruction. Jump instruction with parameter greater than or equal to (LEMP): includes 4-bit instruction type 0b0111, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit relative jump address if verification fails; if the rule verification fails and the metadata is less than the forwarding rule parameter, then jump to the relative jump address instruction to execute, otherwise execute the next instruction. Jump instruction if parameter is less than or equal to (SEMP): includes 4-bit instruction type 0b1000, 8-bit metadata number, 8-bit forwarding rule parameter number and 12-bit verification failure relative jump address; if the rule verification fails and the metadata is greater than the forwarding rule parameter, it jumps to the relative jump address instruction to execute, otherwise it executes the next instruction.

[0043] The output instruction includes a packet forwarding output instruction (POUT), including a 4-bit instruction type 0b1001, an 8-bit forwarding policy parameter 1, an 8-bit forwarding policy parameter 2 and a 12-bit forwarding policy jump address. When the packet completes the forwarding rule processing and needs to be output, it jumps to the forwarding policy jump address and executes the instructions in the forwarding policy to realize packet output.

[0044] In this embodiment, it is assumed that the forwarding rules for the two metadata are that the metadata content numbered 0x01 is equal to 0x55 and the metadata content numbered 0x02 is equal to 0xAAAA, then the forwarding policy with address 0x0010 is executed, where forwarding policy parameter 1 is 0x00 and forwarding policy parameter 2 is 0x00, then the forwarding rule instruction set is

[0045]

[0046] The forwarding strategy instruction set in S3 of this embodiment includes multiple forwarding strategy instructions, and the forwarding strategy instruction is a forwarding strategy for packets of heterogeneous protocols. Any forwarding strategy instruction includes a packet content replacement instruction (PLST), a packet check instruction (PART) and a packet write instruction (PWRT). The instruction length is 32 bits and is defined as follows:

[0047] Packet content replacement instruction (PLST): contains 4-bit instruction type, 10-bit forwarding parameter address, 10-bit replacement packet offset value, and 8-bit replacement packet content length; the forwarding parameter address specifies the parameter value to be written into the packet information, the packet information index is the offset value of the packet written by the forwarding parameter, and the replacement packet content length is the length of the packet information to be written. Packet check instruction (PART): contains 4-bit instruction type, 10-bit check calculation offset value, 10-bit check calculation length and 8-bit check calculation method; the check calculation offset value defines the starting position of the calculation of the packet check value, the check calculation length is the packet data length to be calculated, and the calculation method specifies the specific method of calculating the check. Packet write instruction (PWRT): contains 4-bit instruction type, 4-bit output port valid mark, 8-bit output packet port number 1, 8-bit output packet port number 2 and 8-bit output packet port number 3; each port number specifies the destination port for packet forwarding processing. When the bit in the output port valid mark is valid, it indicates that the output port number field is valid, and the packet content needs to be output according to the port specified by the output packet port number field.

[0048] In this embodiment, it is assumed that the forwarding strategy of the packet is to output ports 0x01 and 0x02, then the instruction set is

[0049] Instruction address Instruction code Instruction meaning 0x0000A 0xCC010200 Output the packet to ports 0x01 and 0x02

[0050] This embodiment S4 specifically includes the following steps:

[0051] S41: traversing and executing the business metadata extraction instruction set for all input business groups to obtain multiple business metadata sets; wherein the business metadata is part of the continuous content in the input business group, the length and position of the business metadata in the business group can be customized, and it is used as the minimum unit participating in the business forwarding decision; any input business group executes all the business metadata extraction instructions in the business metadata extraction instruction set, and the result obtained is the business metadata set corresponding to the input business group;

[0052] S42: traversing and executing the forwarding rule instruction set on the multiple business metadata sets obtained in S41 to obtain a set of forwarding strategies to be executed; wherein any business metadata set executes all the forwarding rule instructions in the forwarding rule instruction set to obtain a set of forwarding strategies to be executed;

[0053] S43: traverse and execute all instructions in the forwarding strategy set obtained in S42 to complete the forwarding process of the service group.

[0054] This embodiment executes the service metadata extraction instruction, the forwarding rule instruction and the forwarding strategy instruction respectively for the packets of the heterogeneous protocols, and completes the packet processing of the heterogeneous protocols.

[0055]

[0056]

[0057] This embodiment divides the switching and routing functions of heterogeneous multi-protocol packets into data forwarding functions and process control functions, realizes the sharing of data forwarding functions by heterogeneous protocol services, and reflects the differences between different protocols in different forwarding rule sets, generates corresponding forwarding rule configuration parameters for the switching and routing requirements of different protocols, and realizes the switching and routing functions of the protocol services. This realizes a software development model of one-time development and multiple uses, taking into account both high performance of service forwarding and flexible expansion of multiple protocols.

[0058] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0059] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0060] In addition, the various different implementation modes disclosed in this solution may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the content invented by the present disclosure.

Claims

1. A packet processing method supporting heterogeneous multi-protocol routing, characterized in that: The method comprises the following steps: S1: Design a set of business metadata extraction instructions based on the processing requirements of heterogeneous protocol packets; S2: Design a forwarding rule instruction set based on the processing requirements of the heterogeneous protocol packets; S3: Design a forwarding strategy instruction set based on the processing requirements of the packets of the heterogeneous protocols; S4: Execute the service metadata extraction instruction, forwarding rule instruction and forwarding strategy instruction respectively for the packets of the heterogeneous protocols to complete the packet processing of the heterogeneous protocols.

2. A packet processing method supporting heterogeneous multi-protocol routing according to claim 1, characterized in that: The business metadata extraction instruction set in S1 includes multiple business metadata extraction instructions, and any of the business metadata extraction instructions is set according to metadata extraction rules. The metadata extraction rules include metadata number, protocol type, field offset and field length.

3. A packet processing method supporting heterogeneous multi-protocol routing according to claim 2, characterized in that: The service metadata extraction instruction includes a protocol jump instruction (PMP) and a metadata extraction instruction (MDG).

4. A packet processing method supporting heterogeneous multi-protocol routing according to claim 1, characterized in that: The forwarding rule instruction set in S2 includes all the rules for implementing protocol packet routing processing, and each rule includes a number of jump instructions, arithmetic instructions and output instructions.

5. A packet processing method supporting heterogeneous multi-protocol routing according to claim 1, characterized in that: The jump instructions include an unconditional jump instruction (JMP), an equal parameter jump instruction (EMP), an unequal parameter jump instruction (UMP), a greater than parameter jump instruction (LMP), a less than parameter jump instruction (SMP), a greater than or equal to parameter jump instruction (LEMP), and a less than or equal to parameter jump instruction (SEMP); The output instructions include a packet forwarding output instruction (POUT).

6. The packet processing method supporting heterogeneous multi-protocol routing according to claim 1, characterized in that: The forwarding policy instruction set in S3 includes multiple forwarding policy instructions, and the forwarding policy instructions are forwarding strategies for packets of heterogeneous protocols. Any forwarding policy instruction includes a packet content replacement instruction (PLST), a packet check instruction (PART) and a packet write instruction (PWRT).

7. A packet processing method supporting heterogeneous multi-protocol routing according to any one of claims 1 to 6, characterized in that: S4 specifically includes the following steps: S41: traversing and executing the service metadata extraction instruction set on all input service groups to obtain multiple service metadata sets; Wherein, any input business group executes all business metadata extraction instructions in the business metadata extraction instruction set, and the result obtained is the business metadata set corresponding to the input business group; S42: traversing and executing a forwarding rule instruction set on the multiple service metadata sets obtained in S41 to obtain a set of forwarding strategies that need to be executed; Among them, any business metadata set executes all forwarding rule instructions in the forwarding rule instruction set to obtain a set of forwarding strategies that need to be executed; S43: traverse and execute all instructions in the forwarding strategy set obtained in S42 to complete the forwarding process of the service group.

8. A packet processing method supporting heterogeneous multi-protocol routing according to claim 7, characterized in that: The service metadata is part of the continuous content in the input service group. The length and position of the service metadata in the service group can be variable, and it serves as the smallest unit participating in the service forwarding decision.

Citation Information

Patent Citations

  • Communication protocol conversion method, equipment, system and gateway equipment

    CN113556359A

  • Multi-protocol connection routing method, device, equipment and medium in scene of Internet of Things

    CN118301225A

  • Method and compiler for routing policy

    US7818780B1