Flow table splitting method, equipment and medium
By splitting and re-planning the flow table entries, a variety of types of key-value table entries and cascade action units are introduced, which solves the problems of waste and insufficient length of flow table entries, and realizes the rational allocation and full utilization of resources, adapts to the needs of various business flows, and improves the utilization rate and product competitiveness of flow table resources.
Patent Information
- Application Number
- CN202411723825.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the field of data communication and chip design technology, the waste and insufficient length of flow table entry resources lead to low flow table forwarding efficiency and cannot adapt to the needs of various service flows.
By splitting the flow table items, re-planning the information layout in the flow table items, introducing multiple types of key-value table items and cascaded action units, realizing the rational allocation and full utilization of resources.
It effectively adapts to the length requirements of different service flows for packet action domain segments, avoids the waste of table entry resources, provides a sufficiently long table entry length, and improves the utilization rate of flow table resources and product competitiveness.
Smart Images

Figure CN119603214A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data communication and chip design, and in particular to a flow table splitting method, device and medium. Background Art
[0002] In the field of data communication and chip design technology, during the data communication process, when data packets are transmitted and communicated between different devices, the generation, transmission, parsing, matching, and forwarding of data packets are involved. In the process of processing data packets, the smart network card chip completes functions such as message parsing, key value matching, message editing, and forwarding. The important information required in the above data packet processing process is obtained by querying the flow table. Therefore, the storage of flow tables and the reading and writing of flow tables require a large amount of resources, which is also a key consideration in chip design from the perspective of reducing resource consumption. With the development of cloud computing, big data, artificial intelligence and other applications, there are a wide variety of business flows. The lengths of the key value information and action information of these business flows are long and short, which may cause waste of flow table resources or insufficient length of flow table items, which is not conducive to improving the efficiency of flow table forwarding and reducing resource usage.
[0003] To this end, the embodiments of the present application provide a flow table splitting method, device and medium, which realizes reasonable allocation and full utilization of resources through optimized design of splitting flow table items, and helps to adapt to the needs of various business flows. Summary of the invention
[0004] In a first aspect, the present application provides a flow table splitting method. The flow table splitting method includes: determining multiple flow table items of a first flow table, wherein the multiple flow table items each include a key value field segment and an action field segment, the key value field segment is used for table lookup matching, and the action field segment is used to execute one or more flow table item actions; splitting the first flow table into a first key value table and a first cascade table, wherein the first key value table includes multiple key value table items, the multiple key value table items correspond one-to-one to the multiple flow table items, each of the multiple key value table items includes a key value field segment for recording the key value field segment of the flow table item corresponding to the key value table item, and the multiple key value table items are divided into first type key value table items, second type key value table items, and third type key value table items. The first type of key-value table entry includes a key-value domain segment and a common action unit, the second type of key-value table entry includes a key-value domain segment and a first-level cascade action unit, the third type of key-value table entry includes a key-value domain segment, a first-level cascade action unit and a second-level cascade action unit, the common action unit includes an action type and execution action data, the first-level cascade action unit includes a first-level cascade type and a first-level table item index, the second-level cascade action unit includes a second-level cascade type and a second-level table item index, the first-level table item index and the second-level table item index are respectively used to point to cascade table entries in different areas in the first cascade table, and the cascade table entries include an action type and execution action data.
[0005] Through the first aspect of the present application, through a combination of multiple types of key-value table entries and ordinary action units, first-level cascade action units and second-level cascade action units, first-type key-value table entries, second-type key-value table entries and third-type key-value table entries are provided, which can effectively adapt to the length requirements of message action domain segments of different business flows, not only avoiding the waste of table item resources but also providing a sufficiently long table item length, which can improve the idle waste of flow table resources, make full use of table item resources, adapt to various business needs and scenarios, and improve product competitiveness.
[0006] In a possible implementation of the first aspect of the present application, the first type of key-value table entries are used for the first business flow, the second type of key-value table entries are used for the second business flow, and the third type of key-value table entries are used for the third business flow. The action information of the first business flow is less than that of the second business flow, and the action information of the second business flow is less than that of the third business flow.
[0007] In a possible implementation manner of the first aspect of the present application, the cascade table entry resources in the first cascade table are shared among the multiple key-value table entries included in the first key-value table.
[0008] In a possible implementation of the first aspect of the present application, the first-level table entry index is used for mapping from the first key-value table to the first area in the first cascade table, and the second-level table entry index is used for mapping from the first key-value table to the second area in the first cascade table, and the first area does not overlap with the second area.
[0009] In a possible implementation of the first aspect of the present application, the first-level cascade type corresponds to the first area, the second-level cascade type corresponds to the second area, the first-level cascade action unit is used to search for matching cascade table entries in the first area according to the first-level table entry index based on the first-level cascade type, and the second-level cascade action unit is used to search for matching cascade table entries in the second area according to the second-level table entry index based on the second-level cascade type.
[0010] In a possible implementation manner of the first aspect of the present application, the data length of the key-value field of each of the multiple key-value table entries included in the first key-value table is the same.
[0011] In a possible implementation of the first aspect of the present application, among the multiple key-value table entries included in the first key-value table, the key-value table entries classified as the first type of key-value table entries have the same data length, the key-value table entries classified as the second type of key-value table entries have the same data length, and the key-value table entries classified as the third type of key-value table entries have the same data length.
[0012] In a possible implementation manner of the first aspect of the present application, the key-value field segments of each of the multiple key-value table entries included in the first key-value table are determined based on a message data format and a communication protocol specification.
[0013] In a possible implementation of the first aspect of the present application, the first type key-value table entry includes neither the first level cascade action unit nor the second level cascade action unit, the second type key-value table entry also includes a common action unit, and the third type key-value table entry also includes a common action unit.
[0014] In a possible implementation manner of the first aspect of the present application, the one or more flow table entry actions include message parsing, message editing, and message forwarding.
[0015] In a second aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method according to any one of the implementation modes of any of the above aspects when executing the computer program.
[0016] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer device, the computer device executes a method according to any one of the implementation methods of any of the above aspects.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer program product, which includes instructions stored on a computer-readable storage medium, and when the instructions are executed on a computer device, the computer device executes a method according to any one of the implementation methods of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of a flow table splitting method provided in an embodiment of the present application;
[0020] Figure 2 A reference provided for the embodiments of this application Figure 1 A schematic diagram of a first key-value table and a first cascade table obtained by the flow table splitting method shown;
[0021] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0023] It should be understood that, in the description of this application, "at least one" means one or more, and "a plurality of" means two or more. In addition, unless otherwise specified, the words "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0024] Figure 1 A flow chart of a flow table splitting method provided in an embodiment of the present application. Figure 1 As shown, the flow table splitting method includes the following steps.
[0025] Step S101: Determine multiple flow table entries of a first flow table, wherein each of the multiple flow table entries includes a key value field and an action field, the key value field is used for table lookup matching, and the action field is used to execute one or more flow table entry actions.
[0026] Step S103: split the first flow table into a first key-value table and a first cascade table.
[0027] refer to Figure 1 The first key-value table includes a plurality of key-value table entries, the plurality of key-value table entries correspond to the plurality of flow table entries one by one, each of the plurality of key-value table entries includes a key-value field segment for recording a key-value field segment of a flow table entry corresponding to the key-value table entry, the plurality of key-value table entries are divided into a first type of key-value table entry, a second type of key-value table entry, and a third type of key-value table entry, the first type of key-value table entry includes a key-value field segment and a common action unit, the second type of key-value table entry includes a key-value field segment and a first-level cascade action unit The third type key-value table entry includes a key-value domain segment, a first-level cascade action unit and a second-level cascade action unit, the ordinary action unit includes an action type and execution action data, the first-level cascade action unit includes a first-level cascade type and a first-level table item index, the second-level cascade action unit includes a second-level cascade type and a second-level table item index, the first-level table item index and the second-level table item index are respectively used to point to cascade table items in different areas of the first cascade table, and the cascade table items include an action type and execution action data.
[0028] Figure 1The flow table splitting method shown can be applied to the field of data communication and chip design technology. In the data communication process in the field of data communication and chip design technology, when data packets are transmitted and communicated between different devices, the generation, transmission, parsing, matching, forwarding, etc. of data packets are involved. In the process of processing data packets, the smart network card chip completes functions such as message parsing, key value matching, message editing and forwarding. The important information required in the above data packet processing process is obtained by querying the flow table. Therefore, the storage of flow tables and the reading and writing of flow tables require a lot of resources, which is also a key consideration in chip design from the perspective of reducing resource consumption. With the development of cloud computing, big data, artificial intelligence and other applications, there are a wide variety of business flows, and the lengths of the key value information and action information of these business flows are long and short. Therefore, some business flows have shorter key value information and action information, and some business flows have longer key value information and action information. In order to improve the packet forwarding performance, it is necessary to store and read and write the flow tables of multiple service flows with key value information and action information of different lengths through dedicated hardware such as smart network card chips, that is, to use hardware acceleration offloading technology to offload to dedicated hardware. To this end, it is necessary not only to consider whether there is enough space in the flow table entry to provide a long enough data length to accommodate the key value information and action information of longer length, but also to consider the waste of table entry resources caused by the remaining space in the flow table entry. Figure 1 The flow table splitting method shown, through the optimized design of splitting the flow table items, re-plans the information layout in the flow table items, realizes the reasonable allocation and full utilization of resources, and helps to adapt to the needs of various business flows. The following is further described in detail.
[0029] Figure 1The flow table splitting method shown improves the structural design of the flow table, and on the basis of determining multiple flow table items of the first flow table, splits the first flow table into a first key-value table and a first cascade table, thereby introducing multiple key-value table items included in the first key-value table and cascade table items included in the first cascade table. In addition, by combining the first key-value table and the first cascade table, using a combination of multiple types of key-value table items and ordinary action units, first-level cascade action units, and second-level cascade action units, the length requirements of the message action domain segment of different business flows can be effectively adapted. By allowing the ordinary action unit to include the action type and the execution action data, the first type of key-value table item including the key-value domain segment and the ordinary action unit can adapt to the business flow with a lower length requirement for the message action domain segment, and only the ordinary action unit included in the first key-value table needs to be used to meet the message action requirements after the table lookup match, which is conducive to improving the message forwarding performance. By allowing the first-level cascade action unit to include the first-level cascade type and the first-level table item index, it can point to the cascade table item of the corresponding area in the first cascade table, thereby obtaining the action type and execution action data included in the cascade table item, so that the second type of key-value table item including the key-value field segment and the first-level cascade action unit can adapt to the business flow with medium length requirements for the message action field segment. By allowing the second-level cascade action unit to include the second-level cascade type and the second-level table item index, it can point to the cascade table item of the corresponding area in the first cascade table, thereby obtaining the action type and execution action data included in the cascade table item, so that the third type of key-value table item including the key-value field segment, the first-level cascade action unit and the second-level cascade action unit can adapt to the business flow with high length requirements for the message action field segment. Here, by providing three different types of action units, the common action unit includes an action type and execution action data. Therefore, the first type of key-value table items including key-value domain segments and common action units in the first key-value table can meet the needs of flow table lookup matching and execution of message actions, which means that by allowing the first type of key-value table items to adapt to business flows with lower requirements for the length of the message action domain segments, that is, converting the flow table items corresponding to the business flows with lower requirements for the length of the message action domain segments in the multiple flow table items of the first flow table into the first type of key-value table items, the table item resources can be fully utilized, which not only avoids the waste of table item resources but also provides a sufficiently long table item length, and only needs to use the common action units included in the first key-value table to meet the message action requirements after table lookup matching, which is beneficial to improving the message forwarding performance.Further, the first-level cascade action unit includes a first-level cascade type and a first-level table entry index, the second-level cascade action unit includes a second-level cascade type and a second-level table entry index, the first-level table entry index and the second-level table entry index are respectively used to point to cascade table entries in different areas of the first cascade table, so that the second-type key-value table entry including the key-value domain segment and the first-level cascade action unit can use the first-level table entry index to achieve mapping to the specified area of the first cascade table, so that the table entry resources on the first cascade table can be shared and indicated by the first-level table entry index, and can adapt to business flows with medium length requirements for the message action domain segment. Further, the third-type key-value table entry including the key-value domain segment, the first-level cascade action unit and the second-level cascade action unit can use the first-level table entry index and the second-level table entry index to achieve mapping to different areas of the first cascade table, so that the table entry resources on the first cascade table can be shared and indicated by the first-level table entry index and the second-level table entry index, and can adapt to business flows with high length requirements for the message action domain segment.
[0030] In conclusion, Figure 1 The flow table splitting method shown provides first type key-value table items, second type key-value table items and third type key-value table items through a combination of multiple types of key-value table items and ordinary action units, first-level cascade action units and second-level cascade action units. It can effectively adapt to the length requirements of message action domain segments for different business flows, not only avoid the waste of table item resources but also provide a sufficiently long table item length, which can improve the idle waste of flow table resources, make full use of table item resources, adapt to various business needs and scenarios, and improve product competitiveness.
[0031] Figure 2 A reference provided for the embodiments of this application Figure 1 Schematic diagram of the first key value table and the first cascade table obtained by the flow table splitting method shown in FIG. Figure 2 As shown, first determine multiple flow table entries of the first flow table, wherein each of the multiple flow table entries includes a key field segment and an action field segment, the key field segment is used for table lookup matching, and the action field segment is used to execute one or more flow table entry actions. Then, split the first flow table into Figure 2The first key-value table 201 and the first cascade table 203 are shown. The first key-value table 201 includes multiple key-value table entries (key-value table entry A210, key-value table entry B220, key-value table entry C230). The multiple key-value table entries (key-value table entry A210, key-value table entry B220, key-value table entry C230) correspond to the multiple flow table entries one by one, and each of the multiple key-value table entries (key-value table entry A210, key-value table entry B220, key-value table entry C230) includes a key-value field segment for recording the key-value field segment of the flow table entry corresponding to the key-value table entry. The multiple key-value table entries are divided into first type key-value table entries, second type key-value table entries and third type key-value table entries, the first type key-value table entries include key value domain segments and ordinary action units, the second type key-value table entries include key value domain segments and first-level cascade action units, the third type key-value table entries include key value domain segments, first-level cascade action units and second-level cascade action units, the ordinary action unit includes an action type and execution action data, the first-level cascade action unit includes a first-level cascade type and a first-level table item index, the second-level cascade action unit includes a second-level cascade type and a second-level table item index, the first-level table item index and the second-level table item index are respectively used to point to cascade table entries in different areas in the first cascade table 203, and the cascade table entries include an action type and execution action data.
[0032] refer to Figure 2 , the key-value table entry A210 includes a key-value domain segment A211, a general action unit A212, a general action unit B213 and a general action unit C214, where the key-value table entry A210 is a first-type key-value table entry. The key-value table entry B220 includes a key-value domain segment B221, a general action unit D222, a general action unit E223 and a first-level cascade action unit A224, where the key-value table entry B220 is a second-type key-value table entry. The key-value table entry C230 includes a key-value domain segment C231, a general action unit F232, a first-level cascade action unit B234 and a second-level cascade action unit A233, where the key-value table entry C230 is a third-type key-value table entry. The first cascade table 203 includes multiple cascade table entries, Figure 2, cascade table entry A291, cascade table entry B292, cascade table entry C293, cascade table entry D294, and cascade table entry E281, cascade table entry F282, and cascade table entry G283 are shown. Here, the first-level entry index of the first-level cascade action unit A224 included in the key-value table entry B220 points to the cascade table entry B292 in the first cascade table 203, and the first-level entry index of the first-level cascade action unit B234 included in the key-value table entry C230 points to the cascade table entry C293 in the first cascade table 203. The first-level entry index of the second-level cascade action unit A233 included in the key-value table entry C230 points to the cascade table entry G283 in the first cascade table 203. It can be seen that the cascade table entry A291, the cascade table entry B292, the cascade table entry C293, and the cascade table entry D294 in the first cascade table 203 belong to a designated area, which is used to correspond to the first-level cascade action units included in the key-value table entries in the first key-value table 201, for example Figure 2 The key-value table entry B220 includes the first-level cascade action unit A224 and the key-value table entry C230 includes the first-level cascade action unit B234. In contrast, the cascade table entry E281, the cascade table entry F282, and the cascade table entry G283 belong to another designated area, which is used to correspond to the second-level cascade action units included in the key-value table entries in the first key-value table 201, for example Figure 2 The second-level cascade action unit A233 included in the key-value table entry C230 shown in the figure. In this way, the mapping to different areas of the first cascade table 203 is respectively realized by using the first-level table entry index and the second-level table entry index, so that the table entry resources on the first cascade table 203 can be shared and indicated by the first-level table entry index and the second-level table entry index, which can adapt to the service flow with higher requirements on the length of the message action field segment.
[0033] In conclusion, Figure 2 The first key-value table 201 and the first cascade table 203 shown in the figure provide first-type key-value table items, second-type key-value table items and third-type key-value table items through a combination of multiple types of key-value table items and ordinary action units, first-level cascade action units and second-level cascade action units, which can effectively adapt to the length requirements of message action domain segments of different business flows, not only avoiding the waste of table item resources but also providing a sufficiently long table item length, which can improve the idle waste of flow table resources, make full use of table item resources, adapt to various business needs and scenarios, and improve product competitiveness.
[0034] refer to Figure 1 and Figure 2In a possible implementation, the first type of key-value table entry is used for the first service flow, the second type of key-value table entry is used for the second service flow, and the third type of key-value table entry is used for the third service flow. The action information of the first service flow is less than that of the second service flow, and the action information of the second service flow is less than that of the third service flow. In this way, the length requirements of the message action domain segment of different service flows can be effectively adapted, which not only avoids the waste of table entry resources but also provides a sufficiently long table entry length, can improve the idle waste of flow table resources, make full use of the resources of the table entry, adapt to the needs and scenarios of various services, and improve the competitiveness of the product.
[0035] In a possible implementation, the cascade table entry resources in the first cascade table are shared among the multiple key-value table entries included in the first key-value table. In this way, the length requirements of the message action domain segment of different business flows can be effectively adapted, which not only avoids the waste of table entry resources but also provides a sufficiently long table entry length, can improve the idle waste of flow table resources, make full use of table entry resources, adapt to the needs and scenarios of various businesses, and improve product competitiveness.
[0036] In a possible implementation, the first-level table entry index is used for mapping from the first key-value table to the first area in the first cascade table, and the second-level table entry index is used for mapping from the first key-value table to the second area in the first cascade table, and the first area does not overlap with the second area. In this way, the table entry resources of the first cascade table can be efficiently utilized, and the length requirements of the message action domain segment of different business flows can be effectively adapted, which not only avoids the waste of table entry resources but also provides a sufficiently long table entry length, can improve the idle waste of flow table resources, make full use of the resources of the table entries, adapt to the needs and scenarios of various businesses, and improve the competitiveness of the product.
[0037] In some embodiments, the first level cascade type corresponds to the first area, the second level cascade type corresponds to the second area, the first level cascade action unit is used to search for matching cascade table entries in the first area according to the first level table entry index based on the first level cascade type, and the second level cascade action unit is used to search for matching cascade table entries in the second area according to the second level table entry index based on the second level cascade type. In this way, the mapping to different areas of the first cascade table can be achieved using the first level table entry index and the second level table entry index respectively, so that the table entry resources on the first cascade table can be shared and indicated by the first level table entry index and the second level table entry index, which can adapt to business flows with higher requirements for the length of the message action field segment.
[0038] In a possible implementation manner, the data length of the key-value field of each of the plurality of key-value table entries included in the first key-value table is the same. This is conducive to fully utilizing storage resources and improving message forwarding efficiency.
[0039] In a possible implementation, among the multiple key-value table entries included in the first key-value table, the key-value table entries classified as the first type of key-value table entries have the same data length, the key-value table entries classified as the second type of key-value table entries have the same data length, and the key-value table entries classified as the third type of key-value table entries have the same data length. This is conducive to fully utilizing storage resources and improving message forwarding efficiency.
[0040] In a possible implementation manner, the key-value domain segments of the plurality of key-value table entries included in the first key-value table are determined based on the message data format and the communication protocol specification, which is conducive to adapting to complex and changing application environment requirements.
[0041] In a possible implementation, the first type of key-value table entry does not include the first level cascade action unit nor the second level cascade action unit, the second type of key-value table entry also includes a common action unit, and the third type of key-value table entry also includes a common action unit. In this way, through a combination of multiple types of key-value table entries and common action units, first level cascade action units, and second level cascade action units, first type key-value table entries, second type key-value table entries, and third type key-value table entries are provided, which can effectively adapt to the length requirements of message action domain segments for different business flows, not only avoiding the waste of table entry resources but also providing a sufficiently long table entry length, which can improve the idle waste of flow table resources, make full use of table entry resources, adapt to various business needs and scenarios, and improve product competitiveness.
[0042] In a possible implementation, the one or more flow table entry actions include message parsing, message editing, and message forwarding. This is conducive to supporting the smart network card chip to implement various functions during the data packet processing process.
[0043] Figure 33 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application, and the computing device 300 includes: one or more processors 310, a communication interface 320 and a memory 330. The processor 310, the communication interface 320 and the memory 330 are interconnected via a bus 340. Optionally, the computing device 300 may also include an input / output interface 350, and the input / output interface 350 is connected to an input / output device for receiving parameters set by a user, etc. The computing device 300 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processor 310 can also be used to implement some or all of the operating steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 300 can refer to the specific details in the above-mentioned embodiments, such as the processor 310 is used to perform some or all of the steps in the above-mentioned method embodiment or some or all of the operations in the above-mentioned method embodiment. For another example, in an embodiment of the present application, the computing device 300 may be used to implement part or all of the functions of one or more components in the above-mentioned apparatus embodiment. In addition, the communication interface 320 may be specifically used to perform the communication functions necessary to implement the functions of these apparatuses and components, and the processor 310 may be specifically used to perform the processing functions necessary to implement the functions of these apparatuses and components.
[0044] It should be understood that Figure 3 The computing device 300 may include one or more processors 310, and the multiple processors 310 may provide processing capabilities in a parallel connection mode, a serial connection mode, a serial-parallel connection mode, or any connection mode, or the multiple processors 310 may form a processor sequence or a processor array, or the multiple processors 310 may be divided into a main processor and an auxiliary processor, or the multiple processors 310 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 3 The computing device 300 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 300 may include Figure 3 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.
[0045] The processor 310 may have a variety of specific implementation forms. For example, the processor 310 may include a central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU), etc., and the embodiment of the present application does not specifically limit it. The processor 310 may also be a single-core processor or a multi-core processor. The processor 310 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processor 310 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP). The communication interface 320 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.
[0046] The memory 330 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 330 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 330 may also be used to store program codes and data, so that the processor 310 calls the program codes stored in the memory 330 to execute some or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 3 Show more or fewer components, or have different component configurations.
[0047] The bus 340 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 340 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 340 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0048] The method and device provided in the embodiments of the present application are based on the same inventive concept. Since the principles of solving the problems in the methods and devices are similar, the embodiments, implementation methods, examples or implementation methods of the methods and devices can refer to each other, and the repeated parts will not be repeated. The embodiments of the present application also provide a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiments and / or the specific functions described in the above device embodiments, which will not be repeated here.
[0049] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer device (such as one or more processors), the method steps in the above method embodiment can be implemented. The specific implementation of the processor of the computer-readable storage medium in executing the above method steps can refer to the specific operations described in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.
[0050] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. The embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media. Available media can be magnetic media (such as floppy disks, hard disks, tapes), optical media, or semiconductor media. Semiconductor media can be solid-state hard disks, random access memory, flash memory, read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, or any other form of suitable storage media.
[0051] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. Each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0052] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. The steps in the method of the embodiment of the present application can be adjusted in order, merged or deleted according to actual needs; the modules in the system of the embodiment of the present application can be divided, merged or deleted according to actual needs. If these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A flow table splitting method, characterized in that: The flow table splitting method comprises: Determine a plurality of flow table entries of a first flow table, wherein each of the plurality of flow table entries comprises a key value field segment and an action field segment, the key value field segment is used for table lookup matching, and the action field segment is used for executing one or more flow table entry actions; The first flow table is split into a first key-value table and a first cascade table, wherein the first key-value table includes a plurality of key-value table entries, the plurality of key-value table entries correspond one-to-one to the plurality of flow table entries, each of the plurality of key-value table entries includes a key-value domain segment for recording a key-value domain segment of a flow table entry corresponding to the key-value table entry, the plurality of key-value table entries are divided into a first type of key-value table entry, a second type of key-value table entry, and a third type of key-value table entry, the first type of key-value table entry includes a key-value domain segment and a common action unit, the second type of key-value table entry includes a key-value domain segment and a common action unit, domain segment and a first-level cascade action unit, the third-type key-value table entry includes a key-value domain segment, a first-level cascade action unit and a second-level cascade action unit, the ordinary action unit includes an action type and execution action data, the first-level cascade action unit includes a first-level cascade type and a first-level table item index, the second-level cascade action unit includes a second-level cascade type and a second-level table item index, the first-level table item index and the second-level table item index are respectively used to point to cascade table items in different areas in the first cascade table, and the cascade table items include an action type and execution action data.
2. The flow table splitting method according to claim 1, characterized in that: The first type of key-value table entries are used for the first business flow, the second type of key-value table entries are used for the second business flow, and the third type of key-value table entries are used for the third business flow. The action information of the first business flow is less than that of the second business flow, and the action information of the second business flow is less than that of the third business flow.
3. The flow table splitting method according to claim 1, characterized in that: The cascade table entry resources in the first cascade table are shared among the multiple key-value table entries included in the first key-value table.
4. The flow table splitting method according to claim 1, characterized in that: The first-level table entry index is used for mapping from the first key-value table to the first area in the first cascade table, and the second-level table entry index is used for mapping from the first key-value table to the second area in the first cascade table, and the first area does not overlap with the second area.
5. The flow table splitting method according to claim 4 is characterized in that: The first-level cascade type corresponds to the first area, the second-level cascade type corresponds to the second area, the first-level cascade action unit is used to search for matching cascade table entries in the first area according to the first-level table entry index based on the first-level cascade type, and the second-level cascade action unit is used to search for matching cascade table entries in the second area according to the second-level table entry index based on the second-level cascade type.
6. The flow table splitting method according to claim 1, characterized in that: The data lengths of the key-value fields of the multiple key-value table entries included in the first key-value table are the same.
7. The flow table splitting method according to claim 1, characterized in that: Among the multiple key-value table entries included in the first key-value table, the key-value table entries classified as the first type of key-value table entries have the same data length, the key-value table entries classified as the second type of key-value table entries have the same data length, and the key-value table entries classified as the third type of key-value table entries have the same data length.
8. The flow table splitting method according to claim 1, characterized in that: The key-value field segments of each of the multiple key-value table entries included in the first key-value table are determined based on the message data format and communication protocol specifications.
9. The flow table splitting method according to claim 1, characterized in that: The first-type key-value table entry does not include the first-level cascade action unit or the second-level cascade action unit, the second-type key-value table entry also includes a common action unit, and the third-type key-value table entry also includes a common action unit.
10. The flow table splitting method according to claim 1, characterized in that: The one or more flow table entry actions include message parsing, message editing, and message forwarding.
11. A device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 10 when executing the computer program.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for searching multistage flow table
CN103354522A
Network-switching-chip-based realization method for microcode and stream table
CN106533943A
Multi-level flow table design method based on logical relationship between matching fields
CN108259354A
Flow table processing method and device
CN118138526A
Transforming a multi-level hybrid hierarchical forwarding information base format
EP3913869A1