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:
An embodiment of the present invention provides a code loading method, including: obtaining, by a control plane of a network apparatus, a process to be executed by a forwarding plane of the network apparatus and code that executes the process, where the code is described by using a high-level programming language; determining, by the control plane of the network apparatus, that service configuration information of the network apparatus corresponds to the code; compiling, by the control plane of the network apparatus, the code to generate compiled code; and loading, by the control plane of the network apparatus, the compiled code to the forwarding plane of the network apparatus. In addition, an embodiment of the present invention further provides a corresponding network apparatus.
Abstract:
A data processing method and a related device are provided. The method includes receiving, by the ith processing circuit in a first circuit set, a first packet header and data D(1, i−1), obtaining data D′(1, i) based on a first field in the first packet header, and sending the first packet header and data D(1, i) to the (i+1)th processing circuit in the first circuit set, where the data D(1, i) is obtained based on the data D(1, i−1) and the data D′(1, i). The method also includes sending, by the ith processing circuit in the first circuit set, the data D(1, i) to the (i+1)th processing circuit in a second circuit set and sending, by the ith processing circuit in the second circuit set, a second packet header to the (i+1)th processing circuit in the second circuit set.
Abstract:
Disclosed are a data processing method, a processor, and a data processing device. The method comprises: an arbiter sends data D(a,1) to a first processing circuit; the first processing circuit processes the data D(a,1) to obtain data D(1,2), the first processing circuit being a processing circuit among m processing circuits; the first processing circuit sends the data D(1,2) to a second processing circuit; the second processing circuit to an mth processing circuit separately process the received data; and the arbiter receives data D(m,a) sent by the mth processing circuit. The processor comprises an arbiter and a first processing circuit to an (m+1)th processing circuit. Each processing circuit in the first processing circuit to the (m+1)th processing circuit can receive first data to be processed sent by the arbiter, and process the first data to be processed. The scheme is helpful to improve efficiency of data processing.
Abstract:
A method and a device for classifying a packet, in the field of communications technologies, are provided to reduce rule duplication in a classification process and improve classification efficiency. The method classifies a packet by receiving a packet; searching for a rule matching the packet in at least one created decision tree (created after an original rule set is divided based on a segmentation code); and classifying the packet according to a found rule. The method and the device may be applicable to a router.
Abstract:
A network device management method and apparatus are provided. The method includes: generating statistical traffic data, where the statistical traffic data includes at least one of data traffic of a port of a network device, a queue status of the network device, traffic of a data packet that passes through the network device, or traffic of a target data flow that passes through the network device; and sending the statistical traffic data to a controller. The controller receives statistical traffic data sent by multiple network devices, and can adjust a path of a data flow dynamically according to a traffic status of each port of the multiple network devices or a traffic status of a transmitted data flow in the multiple network devices and by changing routing tables of the network devices, thereby improving link utilization, and further improving network performance.
Abstract:
Embodiments of the present invention provide a method and a device for classifying a packet, which relates to the field of communications technologies, so as to reduce rule duplication in a classification process and improve classification efficiency. The method for classifying a packet provided by the embodiment of the present invention includes: receiving a packet (201); searching for a rule matching the packet in at least one created decision tree, in which the decision tree is a decision tree created after an original rule set is divided based on a segmentation code (202); and classifying the packet according to a found rule (203). The method and the device provided in the embodiments of the present invention are applicable to a router.
Abstract:
Embodiments provide a method, including: receiving, by a forwarding element, a packet through an inbound port; searching for, by the forwarding element, a port table according to the inbound port and determining a first offset, a first length, and an identifier of a first table; determining, by the forwarding element, a first key according to the first offset and the first length, searching for the first table according to the first key, and determining a first instruction; and processing, by the forwarding element, the packet according to the first instruction. In addition, a forwarding element is provided. In the foregoing technical solutions, before processing a packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats.
Abstract:
A data processing method and a related device are provided. The method includes receiving, by the ith processing circuit in a first circuit set, a first packet header and data D(1, i−1), obtaining data D′(1, i) based on a first field in the first packet header, and sending the first packet header and data D(1, i) to the (i+1)th processing circuit in the first circuit set, where the data D(1, i) is obtained based on the data D(1, i−1) and the data D′(1, i). The method also includes sending, by the ith processing circuit in the first circuit set, the data D(1, i) to the (i+1)th processing circuit in a second circuit set and sending, by the ith processing circuit in the second circuit set, a second packet header to the (i+1)th processing circuit in the second circuit set.
Abstract:
Embodiments provide a method, including: receiving, by a forwarding element, a packet through an inbound port; searching for, by the forwarding element, a port table according to the inbound port and determining a first offset, a first length, and an identifier of a first table; determining, by the forwarding element, a first key according to the first offset and the first length, searching for the first table according to the first key, and determining a first instruction; and processing, by the forwarding element, the packet according to the first instruction. In addition, a forwarding element is provided. In the foregoing technical solutions, before processing a packet, the forwarding element does not need to interpret a data format of the packet, so that the forwarding element can flexibly support packets in different data formats.