Abstract:
This application discloses a network device sleep control method and apparatus. The method is applied to the network device, and the method includes: obtaining measurement data, where the measurement data is attribute data that indicates the network device to process a service; obtaining a first sleep policy, where the first sleep policy includes a rule item and an action item; determining that the measurement data meets the rule item; and controlling, according to the action item, one or more indicated sleep objects to sleep in a corresponding sleep time period, where the sleep objects include at least one of the following objects: a switch board, a switch chip, and a switch port, the network device includes a service board and the switch board, the switch board includes the switch chip and the switch port, and the switch port is used for communication between the switch board and the service board.
Abstract:
The embodiments of the present invention relate to a routing table establishment method and device and a routing table lookup, method and device. The routing table establishment method includes: partitioning a data structure of a routing table into a trunk and a TRIE sub-tree (101); adding entries of the routing table to the TRIE sub-tree (102); and storing an upgrade sub-node of the TRIE sub-tree's root in the trunk, where the height of the TRIE sub-tree is smaller than or equal to a set height threshold (103), and the upgrade sub-node of the TRIE sub-tree's root is a sub-root among prefix sub-nodes included in the TRIE sub-tree's root. Thereby ensuring the high compression ratio of the routing table; and the height of the TRIE sub-tree is controlled according to the height threshold, thereby reducing times for accessing a memory, improving lookup speed, and reducing lookup delay.
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:
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:
A packet forwarding method to shorten a transmission latency of an elephant flow is provided. In the method, for a first packet flow used as an elephant flow, a network device may receive a plurality of packets of the first packet flow, and determine a characteristic parameter of the first packet flow based on the plurality of packets, where the characteristic parameter of the first packet flow is used to indicate a transmission latency of the first packet flow. After determining the characteristic parameter of the first packet flow, the network device determines a forwarding policy of the first packet flow based on the characteristic parameter of the first packet flow. The forwarding policy of the first packet flow is used to indicate latency sensitivity of the first packet flow.
Abstract:
A method for load balancing and packet re-sequencing on a network includes an ingress node that determines an identifier of a destination chip based on a destination address of a packet flow and a forwarding table, allocates, based on the identifier of the destination chip, a channel identifier and a sequence number of each packet that is in the packet flow and that enters a channel, to generate an updated packet flow, where each packet in the updated packet flow includes a packet in a corresponding packet flow, a sequence number of the packet, and the channel identifier, and the updated packet flow is sent in a per-packet load sharing manner.
Abstract:
A method for load balancing and packet re-sequencing on a network includes an ingress node that determines an identifier of a destination chip based on a destination address of a packet flow and a forwarding table, allocates, based on the identifier of the destination chip, a channel identifier and a sequence number of each packet that is in the packet flow and that enters a channel, to generate an updated packet flow, where each packet in the updated packet flow includes a packet in a corresponding packet flow, a sequence number of the packet, and the channel identifier, and the updated packet flow is sent in a per-packet load sharing manner.
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:
A method for determining a packet dequeue rate includes allocating a plurality of consecutive blocks in a first memory to a first packet, storing the first packet and a first length in the plurality of blocks, where the first length is of a first packet queue and is obtained when the first packet is enqueued into the first packet queue, and determining, based on a first span and the first length stored, a first rate at which a packet in the first packet queue is dequeued, where the first span is equal to a difference between a second time and a first time, the first time is when the first packet is enqueued into the first packet queue, and the second time is when the first packet is dequeued from the first packet queue.
Abstract:
A method for determining a packet dequeue rate includes allocating a plurality of consecutive blocks in a first memory to a first packet, storing the first packet and a first length in the plurality of blocks, where the first length is of a first packet queue and is obtained when the first packet is enqueued into the first packet queue, and determining, based on a first span and the first length stored, a first rate at which a packet in the first packet queue is dequeued, where the first span is equal to a difference between a second time and a first time, the first time is when the first packet is enqueued into the first packet queue, and the second time is when the first packet is dequeued from the first packet queue.