摘要 |
Embodiments of the present invention provide a packet processing method and a device. The method includes: acquiring a first packet; determining an identifier of a first table; determining description information, corresponding to the identifier of the first table, of the first table; performing first processing on the first packet according to the description information of the first table, and the first table, where the first table is a convention table; determining an identifier of a next table according to the description information of the first table, where the identifier of the next table corresponds to description information of the next table; and processing, according to the description information of the next table, and the next table, the first packet that has undergone the first processing, where the next table is a convention table or a flow table. In the present invention, high performance of a convention table and flexibility of a flow table are combined, which helps to give consideration to both packet processing performance of a forwarding device and programmability of the forwarding device. |