摘要:
A method for selecting a hash function, a method for storing and searching a routing table and devices thereof are provided. The method for selecting a hash function includes: hashing data to be hashed by using a current alternative hash function; decoding a hash result; accumulating decoded results until no carry occurs during the accumulation; and selecting a current alternative hash function with no carry generated as a formal hash function. The method for storing a routing table includes: dividing the routing table into a next-level node pointer portion and a prefix portion for being stored; and selecting a hash function by using the above method for selecting a hash function. The method for searching a routing table includes: directly searching an IP address to be searched according to a directly stored length of a next-level node pointer portion for storing the routing table; and reading a prefix node according to a searched result. Thus, hash collision can be avoided, and memory resources occupied by the routing table can be effectively reduced.
摘要:
A method for implementing flow control in a switch fabric includes: sending, by each input port, request information to a destination output port where no packet congestion occurs; according to respective back pressure information, determining, by the destination output port which receives the request information, whether to return grant information to each input port to establish a matching relationship between each input port and the destination output port which returns the grant information; according to the matching relationship, scheduling, by each input port, a cell to a destination output port that is matched with each input port. Through the embodiments of the present invention, quantity of information transmitted between an input port and an output port is reduced, the design of the switch fabric is simplified, and data processing efficiency in the switch fabric is improved.
摘要:
A method for implementing flow control in a switch fabric includes: sending, by each input port, request information to a destination output port where no packet congestion occurs; according to respective back pressure information, determining, by the destination output port which receives the request information, whether to return grant information to each input port to establish a matching relationship between each input port and the destination output port which returns the grant information; according to the matching relationship, scheduling, by each input port, a cell to a destination output port that is matched with each input port. Through the embodiments of the present invention, quantity of information transmitted between an input port and an output port is reduced, the design of the switch fabric is simplified, and data processing efficiency in the switch fabric is improved.
摘要:
A method for selecting a hash function, a method for storing and searching a routing table and devices thereof are provided. The method for selecting a hash function includes: hashing data to be hashed by using a current alternative hash function; decoding a hash result; accumulating decoded results until no carry occurs during the accumulation; and selecting a current alternative hash function with no carry generated as a formal hash function. The method for storing a routing table includes: dividing the routing table into a next-level node pointer portion and a prefix portion for being stored; and selecting a hash function by using the above method for selecting a hash function. The method for searching a routing table includes: directly searching an IP address to be searched according to a directly stored length of a next-level node pointer portion for storing the routing table; and reading a prefix node according to a searched result. Thus, hash collision can be avoided, and memory resources occupied by the routing table can be effectively reduced.