Method and device for updating hardware data

A data update and hardware technology, applied in the direction of data exchange network, electrical components, digital transmission system, etc., can solve the problems of inability to use routers, waste of hardware update operation, long refresh time, etc., and achieve the effect of reducing the cost of hardware operation

Inactive Publication Date: 2009-08-26
HUAWEI TECH CO LTD
0 Cites 4 Cited by

AI-Extracted Technical Summary

Problems solved by technology

Therefore, the disadvantage of the prior art is that the information issued by the router software batch table items cannot be used, res...
View more

Abstract

The embodiment of the invention provides a device and a method for updating hardware data for updating data stored in the hardware. The device includes a receiving module and a maintenance module, wherein the receiving module is used for receiving at least one request operation and defining the at least one request operation as batch operation, and the maintenance module is used for generating at least two hardware operation sets for each request operation in the batch operation, estimating price of each hardware operation set, and updating data stored in the hardware based on the estimated price. Each hardware operation set includes at least two hardware operations, and the at least two hardware operation sets is equivalent to operation result of the hardware. The device can access hardware with minimum price, and reduce noneffective or redundant hardware operations, thereby greatly increasing updating speed of the hardware.

Application Domain

Data switching networks

Technology Topic

Minimum priceBatch operation +2

Image

  • Method and device for updating hardware data
  • Method and device for updating hardware data
  • Method and device for updating hardware data

Examples

  • Experimental program(1)

Example Embodiment

[0023] The embodiments of the present invention will be described below with reference to the drawings. It should be noted that in the drawings, the same reference numerals always indicate the same or similar elements.
[0024] It should be understood that the various embodiments of the present invention described herein are only used to better explain the principles and concepts of the present invention, rather than limiting the present invention. After reading such a description, those skilled in the art can easily construct other modifications or substitutions, and such modifications or substitutions should be understood as falling within the scope of the present invention.
[0025] figure 1 It is a block diagram showing a hardware data update device 100 according to an embodiment of the present invention. The hardware data update device 100 is used to update data stored in the hardware 200. The hardware data update device 100 includes a receiving module 105 and a maintenance module 110.
[0026] The receiving module 105 may receive a request operation for the hardware 200 from the outside of the hardware data update device 100, for example, an operation requesting to update the data in the hardware 200. The receiving module 105 may receive multiple requested operations at one time or multiple times. For example, the receiving module 105 may include a data interface for communicating with the outside, etc., so as to receive the requested operation of the external device. Each requested operation may affect each other's hardware update results. The receiving module 105 defines the received request operation(s) as a batch operation 1050. The batch operation 1050 can have a definite length. The request operation in the batch operation 1050 can be completed at one time during the entire operation, or the hardware can be updated after a certain request operation as needed, and then the execution can be continued. Generally speaking, one request operation in the batch operation 1050 will cause one or more hardware operations (including but not limited to adding, deleting, replacing, moving, etc., data stored in the hardware 200). If there is only one requested operation in the batch operation, it is required that this requested operation can generate a different set of hardware operations ("hardware operation set" is described below).
[0027] The maintenance module 110 sequentially generates one or more hardware operations for each requested operation in the batch operation 1050. Generally speaking, a request operation can correspond to a series of different hardware operations (referred to as a "hardware operation set"). The maintenance module 110 may generate two or more hardware operation sets 1101,..., 110i, etc. according to a predefined scheme. The hardware operations in each generated hardware operation set 1101,..., 110i and the hardware operations in other hardware operation sets may be of the same type (add, delete, replace, move, etc.), or may be completely different. After each hardware operation set completes the hardware operation, its result is consistent and equivalent.
[0028] The maintenance module 110 can estimate the cost of each generated set of hardware operations. The hardware cost required for each hardware operation (add, delete, replace, move, etc.) may be different. Therefore, a corresponding weight can be assigned to each hardware operation, thereby estimating the cost of the hardware operation set.
[0029] The maintenance module 110 may estimate the cost in parallel during the process of generating the hardware operation set, or may estimate the cost after the entire hardware operation set is generated.
[0030] The maintenance module 110 may also update the data stored in the hardware 200 according to the estimated cost. The maintenance module 110 may select the hardware operation set with the least cost as the preferred operation set, and update the data in the hardware 200 according to the hardware operations in the preferred operation set.
[0031] For operating hardware objects, generally speaking, its access speed is relatively slow, and the speed of the maintenance module is much faster than that of the cost module. Through the above cost-based hardware data update device 100, hardware can be accessed at a minimum cost, and invalid or redundant hardware operations can be reduced, thereby greatly improving the update speed of the hardware.
[0032] figure 2 It is a flowchart showing a method 1000 for updating hardware data according to an embodiment of the present invention. The hardware data update method 1000 can be changed by figure 1 The hardware data update device 100 shown is executed, and it can also be executed by other devices with processing capabilities.
[0033] In S1005, the receiving target hardware 200 (see figure 1 ) Requested operation. Multiple request operations can be received at one time or multiple times. Each requested operation may affect each other's hardware update results. Define the received request operation(s) as batch operation 1050 (see figure 1 ). The request operation in the batch operation 1050 can be completed at one time during the entire operation, or the hardware can be updated after a certain request operation as needed, and then the execution can be continued. Generally speaking, one request operation in the batch operation will cause one or more hardware operations (including but not limited to adding, deleting, replacing, moving, etc., data stored in the hardware 200). If there is only one request operation in the batch operation, it is required that this request operation can generate a different set of hardware operations.
[0034]In S1010, for each request operation in the batch operation 1050 in turn, one or more corresponding hardware operations are generated. Generally speaking, a request operation can correspond to different sets of hardware operations. According to a predefined scheme, two or more hardware operation sets 1101,...,110i, etc. can be generated (see figure 1 ). The hardware operations in each generated hardware operation set 1101,..., 110i and the hardware operations in other hardware operation sets may be of the same type (add, delete, replace, move, etc.), or may be completely different. After each hardware operation set completes the hardware operation, the result is consistent and equivalent.
[0035] In S1015, the cost of each hardware operation set generated in S1010 is estimated. The hardware cost required for each hardware operation (add, delete, replace, move, etc.) may be different. Therefore, each hardware operation can be assigned a corresponding weight to estimate the cost of the hardware operation set.
[0036] S1015 can be executed in parallel with S1010, that is, the cost is estimated in parallel during the generation of the hardware operation set, or it can be executed after S1010, that is, the cost is estimated after the entire hardware operation set is generated.
[0037] In S1020, the data stored in the hardware 200 is updated according to the cost estimated in S1015. The hardware operation set with the least cost can be selected as the preferred operation set, and the data in the hardware 200 is updated according to the hardware operations in the preferred operation set.
[0038] For operating hardware objects, generally speaking, its access speed is relatively slow, while the speed of maintenance modules is much faster than that of cost modules. Through the above cost-based hardware data update method 1000, hardware can be accessed at a minimum cost, and invalid or redundant hardware operations can be reduced, thereby greatly improving the hardware update speed.
[0039] The routing search hardware is a kind of hardware for high-speed search, which can be a scheme implemented by a certain algorithm or a search scheme (such as TCAM) implemented by a hardware circuit. The algorithm search scheme has the advantages of large capacity, low power consumption and low cost. The update of the routing table is a major problem in the algorithm search scheme. The update speed reflects the router's ability to react when a network failure occurs, that is, a large amount of routing information needs to be updated quickly to complete the "correct" forwarding.
[0040] In the following, the data update operation of the routing lookup hardware (route lookup table entry operation) is taken as an example to describe the hardware data update method according to the embodiment of the present invention in more detail.
[0041] The data update operation of the routing lookup hardware can be implemented in a hierarchical fixed binary tree. image 3 Is a schematic diagram showing a hierarchical binary tree. Hierarchical binary tree is a search scheme, which is characterized by the physical separation of large tree nodes and small tree nodes through pointers, but logically it is still an ordered binary tree. The small tree is an ordered binary tree of a fixed size. Each requested operation will generate one or more hardware operations (referred to as "node operations") on the large tree node or the small tree node.
[0042] The content of the hierarchical binary tree and nodes are stored in both software and hardware. If their content is directly synchronized, it will cause an "error state" in the middle, which will appear as "packet loss" on the router, so it is necessary to define multiple groups. The operation set that causes the intermediate "error state" is used to complete the synchronization of the hardware, that is, the synchronization process "does not interrupt the service" and does not need to interrupt the external search request (not the operation request) during the synchronization process.
[0043] The big tree node and the small tree node mainly reflect the concept of layering:
[0044] 1. One-to-one correspondence between big tree nodes and small tree nodes;
[0045] 2. The big tree node serves as the resource allocation unit for the small tree node;
[0046] 3. A group of big tree nodes and a group of small tree nodes form an ordered binary tree;
[0047] 4. A group of big tree nodes and a corresponding group of small tree nodes form a lookup table.
[0048] According to the embodiment of the present invention, two hardware update methods can be defined:
[0049] a) Node operation update: update the hardware according to the node operation for nodes (big tree node and small tree node); and
[0050] b) One-time update: update all nodes of a small tree at one time according to the "one-time update operation", that is, update the small tree nodes to a new small tree of the hardware one at a time, and then modify the large tree node pointer.
[0051] In other words, hardware operations may include node operations and one-time update operations.
[0052] Figure 4 It is a schematic diagram showing an entry operation using a hardware cost strategy in a hierarchical binary tree according to an embodiment of the present invention. This embodiment can be used to update the data stored in the routing lookup hardware 200'. Specifically, the node data of the hierarchical binary tree is stored in the route search hardware 200'.
[0053] The receiving module 105' receives entry operations 1,..., n from the outside as request operations, and establishes entry batch operations 1050'.
[0054] The route search and maintenance module 110' establishes and maintains a hardware operation set (queue). For example, one or several queues with the size of the small tree (hereinafter referred to as "node operation queue") are established to cache the operation of a single small tree in hardware. At the same time, an additional queue (hereinafter referred to as "small tree update queue") is established to cache the "one-time update" operation.
[0055] For a certain request operation, take node addition as an example. After a node is added, multiple nodes may move, and all operations on the node are cached in the "node operation queue". The node operation queue only belongs to the operation on a small tree. The number of node operation queues can be limited. If the node operation queue is used up, the cached hardware operation needs to be updated to the hardware. After the update is completed, continue to cache the subsequent operations.
[0056] The route search and maintenance module 110' can estimate and compare the hardware operation cost of the node operation queue and the cost of an update operation of the small tree. The cost of the node operation queue is defined as the cost of the node operations it includes. The cost of "one update operation" of a small tree can be a fixed value, for example, the number of nodes corresponding to a small tree. During a batch refresh process, the maintenance module 110' will maintain the "hardware operation" queue, select the least costly queue as the hardware operation queue for the node to add the requested operation, and execute the hardware operation in the hardware operation queue for updating Data in hardware 200'.
[0057] In other words, in the process of adding nodes, if it is found that the number of operations (cost) of nodes in a small tree exceeds the cost of updating the entire small tree, the one-time update method should be selected, with the small tree update queue as the preferred hardware operation queue . At this time, the node operation queue is released, and the small tree is recorded in the small tree update queue. In this case, the route search and maintenance module 110' writes an "update once" operation in the small tree update queue. Otherwise, the node operation update mode should be selected, and the node operation queue is the preferred hardware operation queue.
[0058] In this way, for the batch operation 1050', the obtained minimum cost hardware operation set will only include the preferred hardware operation queue. The route search and maintenance module 110' updates the data in the hardware 200' according to the hardware operation in the minimum cost hardware operation set.
[0059] It should be noted that in the case of large tree node changes in batch operations, if two or more large tree nodes change, it will affect the route search process and may interrupt the normal use of users. So once the big tree node changes (update), the hardware needs to be updated in time. In other words, if a large tree node is modified, the hardware data will be updated immediately based on the existing calculation results, and then other table entry operations will be processed later.
[0060] In addition, if the number of small trees involved in the update exceeds the number of node operation queues, that is, the node operation queue has been used up, it is also necessary to synchronize the existing data to the hardware before continuing to process other entry operations.
[0061] Since the determination process of the above-mentioned minimum cost hardware operation set is at the software level, it is much faster than the hardware operation speed, so the hardware can be accessed at the minimum cost, reducing invalid or redundant hardware operations, thereby greatly improving the hardware refresh rate.
[0062] Figure 5 It is a diagram showing the flow of an entry operation method 2000 using a hardware cost strategy in a hierarchical binary tree according to an embodiment of the present invention.
[0063] In the method 2000, in S2001, it is determined whether there is an operation (entry operation) cached in the batch operation. If so, the method 2000 proceeds to S2005, and an entry operation is taken from the batch operation queue.
[0064] Then in S2010, the node update is completed, and a series of corresponding hardware operations will occur in this process.
[0065] Subsequently, in S2015, it is determined whether the small tree already has a node operation queue. If the small tree has been operated, there will be a node operation queue, or it has entered the small tree update queue. If it is determined in S2015 that the small tree does not have a node operation queue, then the method 2000 proceeds to S2020 to determine whether the small tree is in the small tree update queue.
[0066] In S2020, if it is determined that the queue is updated in the small tree, the operation of the small tree does not need to be recorded, and the method proceeds to S2040 (described below). If it is determined that the queue is not updated in the small tree, the method 2000 proceeds to S2025 to determine whether there is an available node operation queue.
[0067] In S2025, if there is an available node operation queue, the method 2000 proceeds to S2045 (described below). If no node operation queue is available, the method 2000 proceeds to S2030, and the hardware operation in the current queue needs to be updated to the hardware first, and then the queue is applied for this hardware operation.
[0068] Subsequently, in S2035, this hardware operation is put into the node operation queue. Then in S2040, it is judged whether the big tree node is affected. If the large tree node is affected, the method 2000 needs to proceed to S2045 and S2050 to refresh the hardware operations currently cached in the node operation queue and the small tree update queue to the hardware in time to prevent subsequent refreshes from affecting the hardware search. Specifically, first in S2045, the node operation in the small tree is updated to the hardware, and then in S2050, the entire small tree is updated to the hardware. When updating the entire small tree, you need to apply for a free small tree first, after updating the data to the hardware, modify the pointer of the corresponding large tree, and then release the original small tree.
[0069] After the refresh is completed, the method 2000 proceeds to S2055 to determine whether to end the entire method. If it is to end, the method 2000 is completed and terminated. If you do not want to end, return to S2001 to continue the loop and process the next entry operation. If it is determined in S2040 that the big tree node is not affected, the method 2000 also returns to S2001 to continue the loop to process the next entry operation.
[0070]Return to S2015, when it is judged that the small tree has a node operation queue, it means that the small tree has been operated. In this case, the method 2000 proceeds to S2060, compares hardware costs, and determines a hardware update strategy based on the costs. Specifically, in S2060, it is determined whether the node operation cost exceeds the small tree update cost. If it exceeds (Yes in S2060), it indicates that the small tree update operation (the "one-time update" operation described above) should be selected, and then the method 2000 proceeds to S2065 to release the node operation queue for use by other small trees. This is because for small trees that need to be updated as a whole, it is meaningless to queue up operations. Then in S2070, the node operation queue is cleared. Clearing the node operation queue can prevent subsequent misoperations. Subsequently, in S2075, enter the small tree update queue, that is, record the small tree to be updated. In the case that the small tree will be destroyed later, this situation can also be sensed at S2075 to avoid invalid or incorrect updates.
[0071] Subsequently, the method 2000 proceeds to S2040. S2040 and the following have been described in detail above, and will not be repeated here.
[0072] Return to S2060, if the judgment result is "Yes", that is, the node operation cost does not exceed the small tree update cost, the node operation update mode should be selected. Therefore, the method 2000 proceeds to S2035 to put the hardware operation into the node operation queue. S2035 and subsequent steps have been described in detail above, and will not be repeated here.
[0073] Return to S2001, if the judgment result is "No", that is, there is no table entry operation to be processed, or all the table entry operations in the cache have been processed, the method 2000 proceeds to S2045 and S2050, and the current cache is in the node operation queue and The hardware operations in the small tree update queue are flushed to the hardware. S2045, S2050 and subsequent steps have been described in detail above, and will not be repeated here.
[0074] The above example uses a hierarchical binary tree to illustrate the method of routing lookup hardware table item update. However, it is clear to those skilled in the art that the above examples are only used to better explain the principle of the present invention, and do not constitute a limitation to the scope of the present invention. For example, the embodiments of the present invention can also be applied to update other types of hardware data. The storage mode of hardware data is not limited to a hierarchical binary tree, and other data storage structures may also adopt the principles of the embodiments of the present invention. When any data is synchronized to the hardware, define the start and end points of a batch update hardware operation. During this process, if the subsequent update hardware operation may affect the previous update result, causing the previous update to be "invalid", you can Use this device to optimize and reduce hardware update operations.
[0075] In addition, the “one update operation” for updating the entire small tree is described in the embodiment of the present invention as an alternative method of node operation. However, those skilled in the art understand that "one-time update operation" does not limit the scope of the present invention, and other synchronous update methods can also be used. For example, "partial" updates can be performed, and the efficiency will be improved, but the cost calculation will be relatively complicated. Such partial update operations are also within the scope of the present invention.
[0076] Therefore, through the embodiments of the present invention, a solution for reducing hardware operations is provided for multiple invalid updates of hardware caused by batch operations, and a method and device for quickly refreshing entries can be provided for a hierarchical binary tree routing lookup solution .
[0077] Although some embodiments of the present invention have been shown and described, those skilled in the art should understand that various modifications can be made to these embodiments without departing from the principle and spirit of the present invention, and such modifications shall be made. Within the scope of the present invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products