Abstract:
A method includes receiving, by a forwarding device, M pieces of description information that are sent by a controller and are in a one-to-one correspondence with M forwarding services. Each piece of description information includes preset performance of a corresponding forwarding service and an identifier of a table to be searched, and a set including preset performance of the M forwarding services includes Q elements. The method further includes generating Q pieces of simultaneous access information according to the M pieces of description information; and determining, according to the Q pieces of simultaneous access information, that N tables are to be stored in at least one memory of the forwarding device.
Abstract:
A congestion control method and apparatus is disclosed. The method includes, when usage information of a buffer in a device satisfies a preset first condition, determining at least one first queue from the buffer, and performing congestion control on the at least one first queue, where the first condition includes a first threshold corresponding to the usage information of the buffer, and the at least one first queue is a queue whose queue delay is greater than or equal to a queue delay threshold or whose queue length is greater than or equal to a queue length threshold in a plurality of queues in the buffer. In this way, the device triggers a condition of congestion control based on a buffer status.
Abstract:
A memory management method includes: determining that available storage space of a first memory in a network device is less than a first threshold, where the first threshold is greater than 0 and the first memory stores a first packet queue; and deleting at least one packet at the tail of the first packet queue from the first memory based on the available storage space of the first memory being less than the first threshold. When the available storage space of the first memory is less than the first threshold, a packet queue, namely, the first packet queue, is selected and a packet at the tail of the packet queue is deleted from the first memory.
Abstract:
Embodiments provide a packet processing method and a device. The method includes: acquiring a first packet, and determining an identifier of a first table. The method also includes determining description information of the first table, and performing first processing on the first packet according to the description information and the first table, where the first table is a convention table. The method also includes 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. The method also includes processing, according to the description information, and the next table, the first packet that has undergone the first processing.
Abstract:
Embodiments provide a packet processing method and a device. The method includes: acquiring a first packet, and determining an identifier of a first table. The method also includes determining description information of the first table, and performing first processing on the first packet according to the description information and the first table, where the first table is a convention table. The method also includes 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. The method also includes processing, according to the description information, and the next table, the first packet that has undergone the first processing.