Patent attributes
A method for accessing a forwarding entry and a network device are provided. In an example, a cache receives, from a forwarding component, an entry reading command which carries a storage address in a storage of a first forwarding entry to be read. The cache locally searches for a first Hash bucket in a valid state according to the storage address of the first forwarding entry, the first Hash bucket containing a storage address identical to that of the first forwarding entry. If the first Hash bucket is found, the cache transmits, to the forwarding component, the first forwarding entry cached in cache space corresponding to the first Hash bucket. If not found, the cache reads the first forwarding entry from the storage and transmits the first forwarding entry to the forwarding component when the first Hash bucket is not found.