Method and device for managing DPU hardware flow table in VPC network
By maintaining the version information of open flow rules and the open flow id and version values of the hardware flow table in the VPC network, comparing the version values to determine the validity of the flow table, and generating new hardware flow table updates in software processing, the hardware problem is solved The problem of high resource consumption and long time when updating the flow table improves the processing capacity and efficiency of the system and avoids packet forwarding errors.
Patent Information
- Application Number
- CN202410860831.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-11
AI Technical Summary
In a cloud computing VPC network environment, the complex interaction between software and hardware when updating the hardware flow table results in large resource consumption and long update time, which may cause packet forwarding errors and network interruptions, affecting customer services.
By maintaining the version information of each open flow rule in the software system, and storing the associated open flow id and version values in the hardware flow table, the version values are compared when the packet hits, and if they are inconsistent, they are reported to the software for processing and a new one is generated. Hardware flow table updates reduce the negative impact of software-hardware interaction and improve processing capabilities and efficiency.
Realizing the timely update of the hardware flow table, reducing the negative impact of software and hardware interaction, improving the system's processing capability and efficiency, and avoiding packets from being sent to the wrong destination or network congestion.
Smart Images

Figure CN118764428A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network technology, and in particular, relates to a method and device for managing a DPU hardware flow table in a VPC network. Background Art
[0002] In the cloud computing VPC network environment, the OVS component on the host forwards packets based on the flow table. When the VPC networking rules change (virtual machines undergo hot migration, virtual machines are powered on or off, routes are changed, etc.), the flow table must be updated to avoid forwarding errors. In the DPU offloading scenario, the flow table is offloaded to the hardware, and the flow table on the hardware needs to be updated. However, updating the hardware flow table involves software and hardware interaction, and the process is complicated.
[0003] In the open source version of the OVS community, when the networking rules change and the hardware flow table becomes invalid, the solution is: the software identifies and deletes all related hardware flow tables at one time, and then regenerates and sends all new flow tables according to the new rules. This solution has obvious defects.
[0004] Defect 1: The software needs to delete and re-issue millions or even tens of millions of hardware flow tables at one time, which consumes a lot of resources, causing software and hardware performance bottlenecks, and affecting normal message forwarding and unloading of other flow tables.
[0005] Defect 2: It takes a long time to delete a large number of hardware flow tables. It is difficult to ensure that the invalid hardware flow tables are deleted in the first time. Before deletion, the hardware will still forward according to the invalid flow tables, which may cause forwarding errors, resulting in packet loss or network interruption, and thus affecting customer business.
[0006] In order to solve the above problems, the present invention proposes a method and device for managing a DPU hardware flow table in a VPC network. Summary of the invention
[0007] In view of the above shortcomings of the prior art, the purpose of the invention is to provide a method and device for managing the DPU hardware flow table in a VPC network to solve the problem that the hardware flow table may not be updated in time when the message traffic in the network is too large. This may cause the message to be sent to the wrong destination or cause congestion in the network. In addition, due to the limited capacity of the hardware flow table, when the capacity limit is reached, new flow table entries may not be added, further exacerbating performance issues.
[0008] A first aspect of the present invention provides a method for managing a DPU hardware flow table in a VPC network, comprising the following steps:
[0009] Step S1: Maintain the changes of each open flow rule in the software system and assign a version information to each rule;
[0010] Step S2: storing the associated open flow id and version value in the hardware flow table;
[0011] Step S3: When the hardware receives the message and hits the flow table, compare the open flow id and version value in the flow table with the version value of the open flow table maintained by the hardware;
[0012] Step S4: When the version values are inconsistent, the message is reported to the software for processing;
[0013] Step S5: The software queries the open flow table, generates a new hardware flow table, and updates the relevant version field;
[0014] Step S6: Use the new flow table to overwrite the original invalid flow table.
[0015] Furthermore, the method is characterized in that the method triggers orderly updates through messages, thereby reducing the negative impact of software and hardware interactions and improving the processing capacity and efficiency of the system.
[0016] Furthermore, the method triggers the update of hardware flow table entries by actually forwarding messages to filter invalid flow tables and improve management efficiency.
[0017] Furthermore, the method generates a new hardware flow table by querying the open flow flow table through the software system.
[0018] A device for managing a DPU hardware flow table in a VPC network, comprising:
[0019] Software system: responsible for maintaining open flow rules in the network;
[0020] Hardware flow table: used to maintain two related table entries on the DPU device;
[0021] Message processing module: receives messages on the hardware device and searches the hardware forwarding flow table;
[0022] Update management module: a component in the software system used for update management.
[0023] Furthermore, the software system also assigns a unique ID and version information (counted as the version field) to each rule, which is the open flow version table; the software will send the open flow version table to the hardware and synchronously update the open flow version table of the hardware.
[0024] Furthermore, the two related table items maintained by the hardware flow table are as follows: the first is the openflow version table issued by the software, which records the latest version of each open flow rule, whose key is the open flow id and the value is the version value; the second is to add two fields to the hardware forwarding flow table, which are the open flow id associated with this forwarding flow table and the last updated version value.
[0025] Furthermore, the detailed processing steps of the message processing module are as follows: when the message hits the forwarding flow table on the hardware device, the message processing module will take out the open flow id stored in the forwarding flow table as the key, query the openflow version table, obtain the version value, and then compare this version value with the version value stored in the hardware forwarding flow table.
[0026] Furthermore, in the message processing module, if the version values are consistent, the hardware forwarding flow table is considered valid, and the message is directly forwarded according to the hardware forwarding flow table; if the version values are inconsistent, the message will be reported to the software system for processing.
[0027] Furthermore, the specific work content of the update management module is as follows: it is responsible for updating the version field of the open flow id table item corresponding to the open flow version according to the changes in the open flow rules, and performing +1 processing on the version field; when the version field corresponding to a certain open flow id changes, the table item corresponding to the hardware will be updated synchronously.
[0028] The beneficial effects of the present invention are as follows:
[0029] (1) The software identifies the correspondence between each hardware forwarding flow table and the open flow table, and sends this information to the hardware forwarding flow table.
[0030] (2) The software maintains the version information of the open flow table changes and sends this information to the hardware. When the version changes, the hardware maintains this information in real time.
[0031] (3) After the hardware message hits a forwarding flow table entry, the hardware determines whether the flow table entry is valid by comparing the open flow version information recorded in the flow table with the latest open flow table entry version information saved by the hardware. If it is valid, it is forwarded normally. If it is invalid, the message and the flow table invalidation information are sent to the software for processing.
[0032] (4) After the software receives the message sent due to hardware flow table failure, it searches the open flow table again, generates a new hardware forwarding flow table, and completes the hardware forwarding flow table update. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0034] Figure 1 A flow chart of a method and device for managing a DPU hardware flow table in a VPC network according to an embodiment of the present invention;
[0035] Figure 2 It is a flow chart of the open flow-version table maintenance process according to an embodiment of the present invention;
[0036] Figure 3 This is a flowchart of the hardware of an embodiment of the present invention determining whether a flow table is valid according to version;
[0037] Figure 4 The Open flow version table (Table 1) of the embodiment of the present invention;
[0038] Figure 5 The hardware forwarding flow table (Table 2) of the embodiment of the present invention;
[0039] Figure 6 FIG. 4 is a diagram showing the structure of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0041] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0042] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0044] The present invention proposes a management method and device for DPU hardware flow table in a VPC network, which solves the problems of low automation, inaccurate target positioning and labeling, low work efficiency, high technical requirements for testers, cumbersome operations and long time consumption in existing methods.
[0045] Method Embodiment
[0046] The present invention provides a method for managing a DPU hardware flow table in a VPC network, such as Figure 1-Figure 5 As shown, the following steps are included:
[0047] Step S1: Maintain the changes of each open flow rule in the software system, assign a version information to each rule, and record it in an open flowversion table {key:open_flow_id,value:version}; this table is also sent to the hardware, and the software and hardware are updated and maintained synchronously to keep the data consistent;
[0048] Step S2: Store the open flow id and version value in the hardware forwarding flow table, where the open flow id indicates which open flow entry this hardware flow table is associated with, and the version value indicates the version value of the corresponding open flow entry when this hardware flow table was created or last updated;
[0049] Step S3: When the hardware receives the message and searches the hardware forwarding flow table, when a forwarding flow table is hit, the open flow id stored in the forwarding flow table is used as the key, the version value is taken out from the open flow version table, and compared with the version value stored in the forwarding flow table;
[0050] Step S4: When the version values are consistent, it indicates that the hardware forwarding flow table is valid and the message is directly forwarded according to the hardware flow table; when the version values are inconsistent, it indicates that the hardware forwarding flow table has expired and the message needs to be reported to the software for processing;
[0051] Step S5: When the software receives a message sent due to the failure of the hardware forwarding flow table, it re-queries the open flow flow table, generates a new hardware flow table forwarding rule, and updates the version value to the latest;
[0052] Step S6: The software uses the new forwarding specification and version value to generate a new hardware forwarding flow table, overwriting the original invalid flow table.
[0053] Furthermore, the method triggers orderly updates through messages, reduces the negative impact of software and hardware interactions, and improves the processing capability and efficiency of the system.
[0054] Furthermore, the method triggers the update of hardware flow table entries by actually forwarding messages to filter invalid flow tables and improve management efficiency.
[0055] Furthermore, the method generates a new hardware flow table by querying the open flow flow table through the software system.
[0056] The specific implementation steps of this solution are as follows:
[0057] (1) After the control plane issues or updates the open flow rules, the software maintains the changes of each open flow rule and maintains a version information for each open flow rule, which we represent with the version field. This information will also be synchronized to the hardware at any time to keep the software and hardware consistent. The open flow version table is as follows: Figure 4 ) as shown:
[0058] (2) The software identifies the correspondence between each hardware forwarding flow table and the software open flow. In addition to the original key+action, the hardware forwarding flow table entry also stores the open flow id and version value. The open flow id indicates which open flow rule this hardware forwarding flow table is associated with; the version value indicates which open flow version this hardware forwarding flow table is generated based on. When each hardware forwarding flow table is sent down, these newly added fields will be sent down to the hardware together. The main data of the hardware forwarding flow table is as follows in Table 2 ( Figure 5 ) as shown.
[0059] Further, regarding the open flow-version table maintenance process, the example is as follows:
[0060] a) When the hardware receives a message and hits a hardware forwarding flow table, it obtains the open flow ID and the corresponding version value recorded in the flow table, and compares them with the version value of the open flow table maintained by the hardware. Since the comparison is made directly by ID index, the overhead is very small and has almost no impact on the hardware forwarding performance.
[0061] b) If the version value of any open flow id is inconsistent, the hardware flow table is considered invalid; only when the versions of all open flows are consistent, the flow table is considered valid. Figure 5 ), the entry with id 2 in the hardware forwarding table is invalid because one version does not match, while the rest of the flow tables are valid.
[0062] c) If the hardware flow table is valid, forwarding will continue according to the current flow table; if the hardware flow table is invalid, the message needs to be sent to the software for processing, and the information that the hardware flow table is invalid will be carried in the sent message.
[0063] d) When the software receives the information that the hardware flow table is invalid, it will reroute the message to the slow path, re-query the new openflow flow table, and generate a new hardware flow table. The new hardware flow table not only contains the generated new forwarding rules, but also updates the version field of the related open flow it carries. Finally, the new flow table is used to overwrite and modify the original invalid flow table to complete the flow table update management.
[0064] Device Embodiment
[0065] Another specific embodiment of the present invention, in the second aspect of the present invention, proposes a management device for a DPU hardware flow table in a VPC network, see Figure 2-Figure 6 , the device comprises:
[0066] Software system: responsible for maintaining the open flow rules in the network and assigning a unique ID and version information (counted as the version field) to each rule, which is the open flow version table; the software will send the open flow version table to the hardware and synchronously update the open flow version table of the hardware;
[0067] Hardware flow table: On the DPU device, two related table entries are maintained. The first is the open flow version table issued by the software, which records the latest version of each open flow rule. Its key is the open flow id and its value is the version value. The second is to add two fields to the hardware forwarding flow table, which are the open flow id associated with this forwarding flow table and the last updated version value.
[0068] Message processing module: Receive messages on the hardware device and search the hardware forwarding flow table; when the message hits the forwarding flow table on the hardware device, the message processing module will take out the open flow id stored in the forwarding flow table as the key, query the open flow version table, get the version value, and then compare this version value with the version value stored in the hardware forwarding flow table; if the version values are consistent, the hardware forwarding flow table is considered valid, and the message is directly forwarded according to the hardware forwarding flow table; if the version values are inconsistent, the message will be reported to the software system for processing;
[0069] Update management module: A component in the software system, responsible for updating the version field of the open flow version corresponding to the open flow id table entry according to the changes in the open flow rules, and performing +1 processing on the version field; when the version field corresponding to a certain open flow id changes, the table entry corresponding to the hardware will be updated synchronously.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for managing a DPU hardware flow table in a VPC network, characterized in that: The steps include: Step S1: Maintain the changes of each open flow rule in the software system and assign a version information to each rule; Step S2: storing the associated open flowid and version value in the hardware flow table; Step S3: When the hardware receives the message and hits the flow table, compare the open flowid and version values in the flow table with the version value of the open flow table maintained by the hardware; Step S4: When the version values are inconsistent, the message is reported to the software for processing; Step S5: The software queries the open flow table, generates a new hardware flow table, and updates the relevant version field; Step S6: Use the new flow table to overwrite the original invalid flow table.
2. The method for managing a DPU hardware flow table in a VPC network according to claim 1, characterized in that: This method triggers orderly updates through messages, reduces the negative impact of software and hardware interactions, and improves the processing capability and efficiency of the system.
3. The method for managing a DPU hardware flow table in a VPC network according to claim 2, characterized in that: The method triggers the update of hardware flow table entries by actually forwarding messages to filter invalid flow tables and improve management efficiency.
4. The method for managing a DPU hardware flow table in a VPC network according to claim 3, characterized in that: This method generates a new hardware flow table by querying the open flow flow table through the software system.
5. A device for managing a DPU hardware flow table in a VPC network, characterized in that: The device is used to perform the method according to any one of claims 1 to 4, comprising: Software system: responsible for maintaining open flow rules in the network; Hardware flow table: used to maintain two related table entries on the DPU device; Message processing module: receives messages on the hardware device and searches the hardware forwarding flow table; Update management module: a component in the software system used for update management.
6. A device for managing a DPU hardware flow table in a VPC network, characterized in that: The software system also assigns a unique ID and version information (counted as the version field) to each rule, which is the open flow version table; the software will send the open flow version table to the hardware and synchronously update the open flow version table of the hardware.
7. A device for managing a DPU hardware flow table in a VPC network, characterized in that: The two related table items maintained by the hardware flow table are as follows: the first is the open flow version table issued by the software, which records the latest version of each open flow rule. Its key is the open flow id and the value is the version value; the second is to add two fields to the hardware forwarding flow table, which are the open flow id associated with this forwarding flow table and the last updated version value.
8. A device for managing a DPU hardware flow table in a VPC network, characterized in that: The detailed processing steps of the message processing module are as follows: when the message hits the forwarding flow table on the hardware device, the message processing module will take out the open flow id stored in the forwarding flow table as the key, query the open flow version table, obtain the version value, and then compare this version value with the version value stored in the hardware forwarding flow table.
9. A device for managing a DPU hardware flow table in a VPC network, characterized in that: In the message processing module, if the version values are consistent, the hardware forwarding flow table is considered valid, and the message is directly forwarded according to the hardware forwarding flow table; if the version values are inconsistent, the message will be reported to the software system for processing.
10. A device for managing a DPU hardware flow table in a VPC network, characterized in that: The specific work content of the update management module is as follows: it is responsible for updating the version field of the open flow id table item corresponding to the open flow version according to the changes in the open flow rules, and performing +1 processing on the version field; when the version field corresponding to a certain open flow id changes, the table item corresponding to the hardware will be updated synchronously.
