摘要 |
A method and a device for writing data into a ternary content addressable memory (TCAM). The method comprises: acquiring a link state of a physical bus between a network processor (NP) and a TCAM; if the link state of the physical bus is good, controlling a working mode of a write operation to be a first working mode, the first working mode being that a query response of the TCAM is not waited for, or after a query response of the TCAM is obtained, the query response of the TCAM is not parsed and processed ; and when an operation of writing data into the TCAM is detected, if the working mode is the first working mode, directly writing data into the TCAM. |