Mirror image flow table unloading method and device and medium

By generating a multicast replication group to represent the mirror stream table members of multi-egress mirror message forwarding, the problems of mirror stream table unloading failure and resource consumption in the prior art are solved, and efficient mirror message forwarding is achieved.

CN119603312AActive Publication Date: 2025-03-11NANJING NEBULA MICROCOMPUTING TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411722209.9
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

Technical Problem

When the prior art unloads the mirror flow table used for multi-egress mirror message forwarding, it faces problems such as large number of actions and failed unloading of the flow table, and large resource consumption, which affects the forwarding efficiency.

Method used

By determining the reference flow table and the mirrored stream table with which there is a mirror relationship, a multicast replication group is generated to represent all mirrored stream table members, a mirror relationship between the reference flow table and the multicast replication group is constructed, and the reference flow table and the multicast replication group are then unloaded.

Benefits of technology

This method can flexibly adapt to the hardware offload requirements of various number of mirror stream tables, save resource losses in data movement, editing actions and verification operations, and significantly improve the forwarding efficiency of mirror packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603312A_ABST
    Figure CN119603312A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a mirror image flow table unloading method and device and a medium. The method can flexibly adapt to hardware unloading requirements of various numbers of mirror image flow tables, not only can greatly save resource loss of data movement, editing action and verification operation, but also can effectively improve the forwarding efficiency of mirror image messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and medium for unloading a mirror stream table. Background Art

[0002] With the development of cloud computing networks, big data, artificial intelligence and other technologies, a wide range of business needs have been generated, resulting in the rapid growth of data centers and a sharp increase in data traffic. For this reason, it is necessary to meet the needs of high-performance business forwarding. Sometimes it is necessary to provide multi-export mirroring and use hardware acceleration unloading technology to unload the multi-export mirror flow table to dedicated hardware. However, in the prior art, considering that various editing actions and verifications need to be performed during the message forwarding process, when unloading the mirror flow table used for multi-export mirror message forwarding, there are problems such as a large number of actions and flow table unloading failure. It is also possible to face flow tables with more editing actions, which may consume a large amount of resources to achieve data movement and verification operations, which is not conducive to improving the forwarding efficiency of mirror messages.

[0003] To this end, the present application provides a mirror flow table unloading method, device and medium, which can flexibly adapt to the hardware unloading requirements of various numbers of mirror flow tables, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages. Summary of the invention

[0004] In a first aspect, the present application provides a mirror flow table unloading method. The mirror flow table unloading method includes: determining a reference flow table and at least one mirror flow table having a first mirror relationship with the reference flow table, wherein the reference flow table defines at least one message editing action, and the at least one mirror flow table defines, based on the at least one message editing action defined by the reference flow table, to perform the message editing action based on the first mirror relationship; generating a multicast replication group to represent all members in the at least one mirror flow table, and based on the first mirror relationship between the reference flow table and the at least one mirror flow table, constructing a second mirror relationship between the reference flow table and the multicast replication group, wherein the multicast replication group defines, based on the at least one message editing action defined by the reference flow table, to perform the message editing action based on the second mirror relationship, so as to use the multicast replication function of the multicast replication group to implement the mirror flow table function of all members in the at least one mirror flow table; unloading the reference flow table and the multicast replication group to the message forwarding hardware.

[0005] Through the first aspect of the present application, the hardware unloading requirements of various numbers of mirror flow tables can be flexibly adapted, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0006] In a possible implementation of the first aspect of the present application, the at least one message editing action defined by the reference flow table includes performing message field modification on one or more of the source network protocol address, source machine physical address, source port, destination network protocol address, destination machine physical address, and destination port.

[0007] In a possible implementation of the first aspect of the present application, the message editing actions defined by each of the at least one mirror flow table include, based on the at least one message editing action defined by the reference flow table, and based on the first mirror relationship, performing message field modification on one or more of the source network protocol address, the source machine physical address, the source port, the destination network protocol address, the destination machine physical address, and the destination port.

[0008] In a possible implementation manner of the first aspect of the present application, the number of message editing actions defined by each of the at least one mirror flow table is the same as the number of the at least one message editing action defined by the reference flow table.

[0009] In a possible implementation manner of the first aspect of the present application, the number of message editing actions defined by the multicast replication group is the same as the number of the at least one message editing action defined by the reference flow table.

[0010] In a possible implementation manner of the first aspect of the present application, the reference flow table defines that a checksum calculation is performed once after each message editing action of the at least one message editing action defined in the reference flow table is completed.

[0011] In a possible implementation manner of the first aspect of the present application, each of the at least one mirror flow table defines that a checksum calculation is performed after each message editing action defined in the mirror flow table is completed.

[0012] In a possible implementation manner of the first aspect of the present application, the number of times the checksum calculation is performed defined by each of the at least one mirror flow tables is the same as the number of times the checksum calculation is performed defined by the reference flow table.

[0013] In a possible implementation of the first aspect of the present application, the multicast replication group defines that a checksum calculation is performed after each message editing action defined by the multicast replication group is completed, and the number of checksum calculations defined by the multicast replication group is the same as the number of checksum calculations defined by the reference flow table.

[0014] In a possible implementation of the first aspect of the present application, the reference flow table is used to forward message traffic from a first virtual function of a first physical function to a second virtual function of the first physical function, and the at least one mirror flow table is used to perform message field modification and checksum calculation on the original message from the first virtual function of the first physical function to the second virtual function of the first physical function, so as to implement forwarding of the mirrored message to other virtual functions of the first physical function except the first virtual function and the second virtual function.

[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 chart of a mirror stream table unloading method provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a virtual switch provided in an embodiment of the present application;

[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 flowchart of a mirror stream table unloading method provided in an embodiment of the present application. Figure 1 As shown, the image stream table unloading method includes the following steps.

[0025] Step S101: Determine a reference flow table and at least one mirror flow table that has a first mirror relationship with the reference flow table, wherein the reference flow table defines at least one message editing action, and the at least one mirror flow table each defines, on the basis of the at least one message editing action defined by the reference flow table, performing a message editing action based on the first mirror relationship.

[0026] Step S103: Generate a multicast replication group to represent all members in the at least one mirror flow table, and construct a second mirror relationship between the reference flow table and the multicast replication group based on the first mirror relationship between the reference flow table and the at least one mirror flow table, wherein the multicast replication group defines that, on the basis of the at least one message editing action defined in the reference flow table, a message editing action is performed based on the second mirror relationship, so as to use the multicast replication function of the multicast replication group to implement the mirror flow table function of all members in the at least one mirror flow table.

[0027] Step S105: Unloading the reference flow table and the multicast replication group to the message forwarding hardware.

[0028] Figure 1The mirror flow table unloading method shown is applied to cloud computing networks, big data, artificial intelligence and other technical fields, can meet the high-performance business forwarding requirements, especially meet the multi-export mirror message forwarding and mirror flow table unloading, and can also flexibly adapt to the hardware unloading requirements of various numbers of mirror flow tables, so that virtualization products and services such as virtual switches can be better combined to meet the traffic forwarding requirements between inbound ports and outbound ports. In addition, when the number of mirror flow tables unloaded by hardware is large, the resource occupancy can still be kept low by optimizing the design of message field modification and verification operations, and in the face of a large number of message editing actions, resources can still be saved and resource utilization can be improved by optimizing the design of the mirror flow table function implementation process, realizing the flexible adaptation of the hardware unloading requirements of various numbers of mirror flow tables, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages. These are described in detail below.

[0029] refer to Figure 1 In step S101, a reference flow table and at least one mirror flow table having a first mirror relationship with the reference flow table are determined, wherein the reference flow table defines at least one message editing action, and the at least one mirror flow table defines, based on the at least one message editing action defined by the reference flow table, to perform the message editing action based on the first mirror relationship. Here, the reference flow table is used for message forwarding from one port to another port, and the data format of the reference flow table defines various information, such as source network protocol address, source machine physical address, source port, destination port, etc. Depending on the specific message encapsulation format and communication protocol specification, a combination of multiple different fields can be modified, so that message forwarding from one port to another port can be achieved. Based on the reference flow table, there can be one or more mirror flow tables, and there is a first mirror relationship between these mirror flow tables and the reference flow table. The data formats of each of these mirror flow tables also define the modification of a combination of multiple fields. For example, if the data format of the reference flow table defines the modification of the source network protocol address, the source machine physical address, the source port, and the destination port, the data format of the mirror flow table may also require the modification of the source network protocol address, the source machine physical address, the source port, and the destination port. Considering that the number of mirror flow tables to be unloaded is difficult to determine in advance, and the number and complexity of the message editing actions defined by the reference flow table are also difficult to determine, therefore, if the reference flow table and the mirror flow table with a mirror relationship are integrated into one flow table for hardware unloading, it may cause a large amount of resources to be occupied to store the action field, and may cause a large number of field modification operations and checksum calculation operations.

[0030] For example, assume that the reference flow table is from pf1vf1 to pf1vf2, and then the mirror flow table forwards the mirrored message to pf1vf3, pf1vf4, pf1vf5, pf1vf6, pf1vf7, pf1vf8, a total of six mirrored messages. Here, pf1vf1, pf1vf2, pf1vf3, pf1vf4, pf1vf5, pf1vf6, pf1vf7, pf1vf8 are used to represent the first virtual function pf1vf1 of the first physical function pf1, the second virtual function pf1vf2, until the eighth virtual function pf1vf8. Here, assume that the following flow table defines the message editing action during the message forwarding process for the original message and the mirrored message:

[0031] "Key: smac=11:22:33:44:55:66, dmac=99:88:77:66:55:44, sip=1.1.1.1, dip=1.1.1.2, sport=1000, dport=2000; inport=pf1vf1_rep; action=mod_sip=2.2.2. 1, mod_smac=66:55:44:33:22:11, mod_sport=3000, mod_dport=4000, pf1vf2_re p,pf1vf3_rep,pf1vf4_rep,pf1vf5_rep,pf1vf6_rep,pf1vf7_rep,pf1vf8_rep".

[0032] Here, Key indicates the key value field, where smac is the source machine physical address, dmac is the destination machine physical address, sip is the source network protocol address, dip is the destination network protocol address, sport is the source port, dport is the destination port, and inport is the inport. Action indicates the action field, where the action field defines the message field modification of sip, i.e., the source network protocol address, the message field modification of smac, i.e., the source machine physical address, the message field modification of sport, i.e., the source port, and the message field modification of dport, i.e., the destination port. In addition, the flow table above also shows that the reference flow table defines four action fields, namely, modifying the source network protocol address, source machine physical address, source port, and destination port in turn. When faced with a total of six mirror messages, namely, "pf1vf2_rep, pf1vf3_rep, pf1vf4_rep, pf1vf5_rep, pf1vf6_rep, pf1vf7_rep, pf1vf8_rep," each mirror message needs to modify the source network protocol address, source machine physical address, source port, and destination port in turn. Therefore, the original message from pf1vf1 to pf1vf2 and the 6 mirror messages in a mirroring relationship, a total of 7 messages, need to be modified in the message field for a total of 7 times 4, which is 28 times. In addition, the original message and the mirrored message need to perform message checksum calculation each time the message field is modified. Therefore, a total of 28 checksum calculations are required, which means that a total of 56 message field modifications and checksum calculations need to be performed.

[0033] It can be seen that when the number of mirror flow tables to be unloaded increases further, for example, from six mirror flow tables to 100 mirror flow tables, if the reference flow table and the mirror flow tables with mirror relationship are integrated into one flow table for hardware unloading, this means that the number of data modification and checksum calculations required will increase significantly, which is not conducive to improving the performance of the network card. In addition, when the number of message editing actions defined by the reference flow table increases further, the data length of the action field that needs to be occupied will be further increased. In the above example, a total of 11 action fields are used. When 16 or more action fields are needed, it may cause the maximum data length of the flow table item to be exceeded, which may cause the flow table unloading to fail. In addition, the data specifications used for the mirror flow table are generally limited. Therefore, when there are many cloud devices, all the data specifications allocated to the mirror flow table may be used up, resulting in the extra data service requirements cannot be met by dedicated hardware, and can only be soft-converted by message, which is not conducive to improving the performance of the network card. Therefore, as the scale of mirror messages and outbound ports with mirror relationship increases, the action field of the comprehensive flow table will increase, so that it exceeds the design upper limit, and cannot be stored and unloaded to the hardware. In addition, the number of flow table actions that need to be executed will increase, which is not conducive to improving the performance of the network card.

[0034] Continue to refer Figure 1 , based on step S101, that is, after determining the reference flow table and at least one mirror flow table having a first mirror relationship with the reference flow table, step S103 is executed to generate a multicast replication group to represent all members in the at least one mirror flow table, and to construct a second mirror relationship between the reference flow table and the multicast replication group based on the first mirror relationship between the reference flow table and the at least one mirror flow table. Wherein, the multicast replication group defines that, based on the at least one message editing action defined by the reference flow table, a message editing action is executed based on the second mirror relationship, so as to use the multicast replication function of the multicast replication group to implement the mirror flow table function of all members in the at least one mirror flow table. In this way, the multicast replication group is used to represent all members in the at least one mirror flow table, effectively replacing all outbound ports and mirror message forwarding that have a mirror relationship. Only one flow table action needs to be executed, that is, forwarding to the multicast replication group, and only one message field modification and checksum calculation need to be executed, that is, the multicast replication group is used as the representative of all mirror messages. For example, taking the flow table that defines the message editing actions for the original message and the mirrored message in the message forwarding process as a reference, the following is the definition of the corresponding multicast replication group:

[0035] “Key: smac=11:22:33:44:55:66, dmac=99:88:77:66:55:44, sip=1.1.1.1, dip=1.1.1.2, sport=1000, dport=2000; inport=pf1vf1_rep; action=mod_sip=2.2.2.1, mod_smac=66:55:44:33:22:11, mod_sport=3000, mod_dport=4000, mcc_index=1”.

[0036] Here, Key indicates a key value field, where smac is the source machine physical address, dmac is the destination machine physical address, sip is the source network protocol address, dip is the destination network protocol address, sport is the source port, dport is the destination port, and inport is the inport. Action indicates an action field, where the action field defines the message field modification of sip, i.e., the source network protocol address, the message field modification of smac, i.e., the source machine physical address, the message field modification of sport, i.e., the source port, and the message field modification of dport, i.e., the destination port. The above multicast replication group also defines the identifier of the multicast replication group, i.e., mcc_index. It can be seen that the multicast replication group is used to represent all members in the at least one mirror flow table, and based on the first mirror relationship between the reference flow table and the at least one mirror flow table, a second mirror relationship between the reference flow table and the multicast replication group is constructed. In this way, the multicast replication group defines that, on the basis of the at least one message editing action defined by the reference flow table, the message editing action is performed based on the second mirror relationship, so as to use the multicast replication function of the multicast replication group to realize the mirror flow table function of all members in the at least one mirror flow table. It can be seen that each time the original message is forwarded, 4 message field modifications and 4 checksum calculations of the original message are required. Correspondingly, the multicast replication group also needs to perform 4 message field modifications and 4 checksum calculations. Therefore, using the generated multicast replication group to replace the mirror flow table requires a total of 8 message field modifications and 8 checksum calculations, and a total of 16 message field modifications and checksum calculations are performed. In addition, because the multicast replication group is used to effectively replace all the outbound ports and mirror message forwarding with mirror relationships, the number of required action fields is also greatly reduced, and the multicast replication group uses 5 action fields. Moreover, by introducing the multicast replication group, only one message editing action and checksum calculation are performed on the original message, and the edited message can be directly copied through the multicast replication function of the multicast replication group. By combining the port and mirror action in the flow table to obtain the multicast replication group, and assigning an index, i.e., the identifier of the multicast replication group, i.e., mcc_index, the number of various mirror flow tables to be uninstalled, the number of message editing actions defined by various reference flow tables, and the complexity of various mirror action combinations can all be integrated into the action of a multicast replication group, greatly reducing the number of action fields.

[0037] Continue reading Figure 1, after step S103, execute step S105 to unload the reference flow table and the multicast replication group to the message forwarding hardware. In this way, by combining the ports and mirror actions in the flow table to obtain a multicast replication group, no matter how many ports and mirror actions there are, they can be integrated into the actions of a multicast replication group, which greatly reduces the number of action fields and effectively avoids the failure of flow table unloading due to too many action fields exceeding the maximum data length of the flow table item. In addition, multicast replication group specifications can be used without allocating flow table specifications for mirror flow tables, which can save flow table resources and flexibly adapt to the hardware unloading requirements of various numbers of mirror flow tables. When the number of outbound ports increases or decreases, there is no need to change the flow table content. The multicast replication group can still be used to represent all members in the mirror flow table and the multicast replication function can be used to implement the mirror flow table function of all members, which is beneficial to improving the performance of the network card. In addition, by introducing a multicast replication group, only one message editing action and checksum calculation are performed on the original message. The multicast replication function of the multicast replication group can be used directly afterwards. After the copy and editing, the message can adapt to the number of mirror flow tables to be unloaded, the number of message editing actions defined by the reference flow table, and the complexity of the mirror action combination. This can not only greatly save the resource loss of data movement, editing actions, and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0038] Figure 2 A schematic diagram of a virtual switch provided in an embodiment of the present application. Figure 2 As shown, there are multiple ports on the virtual switch 201, which are used for traffic forwarding between virtual functions under the physical function. Among them, these ports include the first virtual function 211 of the first physical function, the second virtual function 212 of the first physical function, the third virtual function 213 of the first physical function, and the fourth virtual function 214 of the first physical function. Figure 1 In the mirror flow table unloading method shown, the reference flow table is used for forwarding the message traffic from the first virtual function 211 of the first physical function to the second virtual function 212 of the first physical function, and the at least one mirror flow table is used for modifying the message field and performing checksum calculation on the original message from the first virtual function 211 of the first physical function to the second virtual function 212 of the first physical function, so as to realize forwarding the mirror message to other virtual functions of the first physical function except the first virtual function and the second virtual function, that is, the third virtual function 213 of the first physical function and the fourth virtual function 214 of the first physical function. In this way, the hardware unloading requirements of various numbers of mirror flow tables are flexibly adapted, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0039] refer to Figure 1 and Figure 2 In a possible implementation, the at least one message editing action defined by the reference flow table includes performing message field modification on one or more of the source network protocol address, the source machine physical address, the source port, the destination network protocol address, the destination machine physical address, and the destination port. In this way, various communication protocol specifications, user requirements, and flow table forwarding requirements of business flows can be flexibly adapted.

[0040] In some embodiments, the message editing action defined in each of the at least one mirror flow table includes, based on the at least one message editing action defined in the reference flow table, performing message field modification on one or more of the source network protocol address, the source machine physical address, the source port, the destination network protocol address, the destination machine physical address, and the destination port based on the first mirror relationship. In this way, the message forwarding and hardware unloading requirements of various mirror flow tables can be flexibly adapted.

[0041] In some embodiments, the number of message editing actions defined by each of the at least one mirror flow table is the same as the number of the at least one message editing action defined by the reference flow table. In this way, by introducing a multicast replication group, the number of mirror flow tables to be uninstalled, the number of message editing actions defined by the reference flow table, and the complexity of the mirror action combination can be adapted, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0042] In some embodiments, the number of message editing actions defined by the multicast replication group is the same as the number of at least one message editing action defined by the reference flow table. In this way, by introducing the multicast replication group, only one message editing action and checksum calculation are performed on the original message, and then the multicast replication function of the multicast replication group can be directly used. After the copy and edit, the message can adapt to the number of mirror flow tables to be unloaded, the number of message editing actions defined by the reference flow table, and the complexity of the mirror action combination, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of the mirror message.

[0043] In a possible implementation, the reference flow table defines that a checksum calculation is performed once after each of the at least one message editing action defined in the reference flow table is completed. In this way, checksum operations of various message data formats and protocol specifications can be adapted.

[0044] In some embodiments, each of the at least one mirror flow table defines that a checksum calculation is performed once after each message editing action defined in the mirror flow table is completed. In this way, the checksum operation of the mirror flow table and the mirror message can be adapted.

[0045] In some embodiments, the number of times the at least one mirror flow table is defined to perform checksum calculations is the same as the number of times the reference flow table is defined to perform checksum calculations. In this way, the multicast replication group specification can be used without allocating flow table specifications for the mirror flow table, which can save flow table resources and flexibly adapt to the hardware unloading requirements of various numbers of mirror flow tables. When the number of outbound ports increases or decreases, there is no need to change the flow table content. The multicast replication group can still be used to represent all members in the mirror flow table and the multicast replication function can be used to implement the mirror flow table function of all members, which is conducive to improving the performance of the network card. In addition, by introducing the multicast replication group, only one message editing action and checksum calculation are performed on the original message, and the multicast replication function of the multicast replication group can be directly used later. After the copy and edit, the message can adapt to the number of mirror flow tables to be unloaded and the number of message editing actions defined by the reference flow table as well as the complexity of the mirror action combination, which can not only greatly save the resource loss of data movement, editing action and verification operation, but also effectively improve the forwarding efficiency of the mirror message.

[0046] In some embodiments, the multicast replication group defines that a checksum calculation is performed once after each message editing action defined in the multicast replication group is completed, and the number of checksum calculations defined by the multicast replication group is the same as the number of checksum calculations defined by the reference flow table. In this way, the multicast replication group specification can be used without allocating flow table specifications for the mirror flow table, which can save flow table resources and flexibly adapt to the hardware unloading requirements of various numbers of mirror flow tables. When the number of outbound ports increases or decreases, there is no need to change the flow table content. The multicast replication group can still be used to represent all members in the mirror flow table and the multicast replication function can be used to implement the mirror flow table function of all members, which is beneficial to improving the performance of the network card. In addition, by introducing a multicast replication group, only one message editing action and checksum calculation are performed on the original message. The multicast replication function of the multicast replication group can be used directly afterwards. After the copy and editing, the message can adapt to the number of mirror flow tables to be unloaded, the number of message editing actions defined by the reference flow table, and the complexity of the mirror action combination. This can not only greatly save the resource loss of data movement, editing actions, and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0047] In a possible implementation, the reference flow table is used to forward message traffic from the first virtual function of the first physical function to the second virtual function of the first physical function, and the at least one mirror flow table is used to modify the message field and perform checksum calculations on the original message from the first virtual function of the first physical function to the second virtual function of the first physical function, so as to forward the mirror message to other virtual functions of the first physical function except the first virtual function and the second virtual function. In this way, the hardware unloading requirements of various numbers of mirror flow tables are flexibly adapted, which can not only greatly save the resource loss of data movement, editing actions and verification operations, but also effectively improve the forwarding efficiency of mirror messages.

[0048] Figure 3 3 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.

[0049] 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 3The 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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 method for unloading an image stream table, characterized in that: The image stream table unloading method comprises: Determine a reference flow table and at least one mirror flow table having a first mirror relationship with the reference flow table, wherein the reference flow table defines at least one message editing action, and the at least one mirror flow table each defines, based on the at least one message editing action defined by the reference flow table, performing the message editing action based on the first mirror relationship; Generate a multicast replication group to represent all members in the at least one mirror flow table, and build a second mirror relationship between the reference flow table and the multicast replication group based on the first mirror relationship between the reference flow table and the at least one mirror flow table, wherein the multicast replication group defines that, based on the at least one message editing action defined in the reference flow table, a message editing action is performed based on the second mirror relationship, so as to use the multicast replication function of the multicast replication group to implement the mirror flow table function of all members in the at least one mirror flow table; The reference flow table and the multicast replication group are uninstalled to the message forwarding hardware.

2. The image stream table unloading method according to claim 1, characterized in that: The at least one message editing action defined by the reference flow table includes performing message field modification on one or more of the source network protocol address, source machine physical address, source port, destination network protocol address, destination machine physical address, and destination port.

3. The image stream table unloading method according to claim 2, characterized in that: The message editing actions defined by each of the at least one mirror flow table include, based on the at least one message editing action defined by the reference flow table and based on the first mirror relationship, performing message field modification on one or more of the source network protocol address, the source machine physical address, the source port, the destination network protocol address, the destination machine physical address, and the destination port.

4. The image stream table unloading method according to claim 3 is characterized in that: The number of packet editing actions defined in each of the at least one mirrored flow tables is the same as the number of the at least one packet editing action defined in the reference flow table.

5. The image stream table unloading method according to claim 2, characterized in that: The number of message editing actions defined by the multicast replication group is the same as the number of the at least one message editing action defined by the reference flow table.

6. The image stream table unloading method according to claim 1, characterized in that: The reference flow table defines that a checksum calculation is performed once after each message editing action in the at least one message editing action defined in the reference flow table is completed.

7. The image stream table unloading method according to claim 6, characterized in that: Each of the at least one mirror flow table defines that a checksum calculation is performed once after each message editing action defined in the mirror flow table is completed.

8. The image stream table unloading method according to claim 7, characterized in that: The number of times the checksum calculation is performed defined in each of the at least one mirror flow table is the same as the number of times the checksum calculation is performed defined in the reference flow table.

9. The image stream table unloading method according to claim 6, characterized in that: The multicast replication group defines that a checksum calculation is performed once after each message editing action defined in the multicast replication group is completed, and the number of checksum calculations defined by the multicast replication group is the same as the number of checksum calculations defined by the reference flow table.

10. The image stream table unloading method according to claim 1, characterized in that: The reference flow table is used to forward message traffic from the first virtual function of the first physical function to the second virtual function of the first physical function, and the at least one mirror flow table is used to modify message fields and perform checksum calculations on the original message from the first virtual function of the first physical function to the second virtual function of the first physical function, so as to implement forwarding of mirror messages to other virtual functions of the first physical function except the first virtual function and the second virtual function.

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

  • Flow table hardware unloading method, equipment and medium

    CN115150328A

  • Multicast traffic replication method based on hardware unloading and related device

    CN116366534A

  • Data processing method and device, storage medium and electronic equipment

    CN118509390A

  • Network interface controller for virtual and distributed services

    WO2012039792A1