Access request processing method, access request result returning method and network equipment

By introducing routing guidance and the combined use of internal and external channels in network devices, the problem of multiple access requests of access components in multiple TCAM components is solved, and efficient forwarding and fast table lookup of access requests are achieved.

CN120711080APending Publication Date: 2025-09-26NEW H3C SEMICON TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510883991.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In network devices, access components need to initiate multiple access requests in multiple TCAM components, resulting in low access request forwarding efficiency and slow table lookup speed.

Method used

By introducing routing guidance in the routing component, access requests are directly sent to the target TCAM component or other routing components using internal and external channels, avoiding multiple access requests and improving the forwarding efficiency of access requests.

Benefits of technology

The forwarding efficiency of access requests is improved, thereby increasing the speed of table lookup and reducing the occupancy of clock cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120711080A_ABST
    Figure CN120711080A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an access request processing and result returning method and network equipment, relates to the technical field of data exchange, and is applied to the network equipment, the network equipment comprises a first routing component, a first access component and a first TCAM component, and the first routing component is connected with the first TCAM component through a first internal channel; the method comprises the steps that a first routing component receives a first access request of a first access component for accessing a TCAM component, the first access request comprises first routing guidance, the first routing guidance indicates a target channel for sending the first access request, and the target channel comprises a first internal channel and / or a first external channel; the first external channel is connected with a second routing component included in the network equipment, and the second routing component is connected with a second TCAM component included in the network equipment through a second internal channel; and the first routing component sends the first access request through the target channel. According to the method, the forwarding efficiency of the access request and the table look-up speed can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data exchange, and in particular to an access request processing, result return method and network device. Background Art

[0002] Network devices include a routing component with forwarding capabilities. Access components and Ternary Content Addressable Memory (TCAM) components can be attached to the routing component. The access component is used to initiate access requests to search for table entries in the destination TCAM component. If there are multiple destination TCAM components, that is, the access component needs to search for table entries in multiple TCAM components, the access component must initiate multiple access requests and send them to the routing component where these multiple TCAM components are located to perform searches within these multiple TCAM components. This process takes multiple clock cycles, resulting in low access request forwarding efficiency and, in turn, slow table lookup speeds. Summary of the Invention

[0003] The purpose of the embodiments of the present application is to provide an access request processing and result return method and network device to improve the forwarding efficiency of access requests and the speed of table lookup. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides an access request processing method, applied to a network device, wherein the network device includes a first routing component, a first access component, and a first TCAM component, wherein the first routing component is connected to the first TCAM component via a first internal channel; the method comprising:

[0005] The first routing component receives a first access request from the first access component to access a TCAM component, the first access request including a first routing guide, the first routing guide indicating a target channel for sending the first access request, the target channel including the first internal channel and / or a first external channel, the first external channel being connected to a second routing component included in the network device, and the second routing component being connected to a second TCAM component included in the network device via a second internal channel;

[0006] The first routing component sends the first access request through the target channel.

[0007] In some embodiments, the first access request is stored in a cache queue of the first routing component, and the target channel includes at least one channel; and the step of the first routing component sending the first access request through the target channel includes:

[0008] The first routing component reads the first access request from the cache queue and records the number of times the first access request is read; and sends the first access request through the at least one channel;

[0009] The method further comprises:

[0010] When the number of reads reaches the number of the at least one channel, the first routing component marks the storage address of the first access request in the cache queue as free.

[0011] In some embodiments, the first routing guide includes at least one layer of routing information, each layer of routing information corresponds to a routing component on the forwarding path of the first access request, and each layer of routing information indicates a channel for sending the first access request.

[0012] In some embodiments, the outermost routing information of the first routing guidance indicates the target channel, and the first routing component is the first routing component to forward the first access request; and the step of the first routing component sending the first access request through the target channel includes:

[0013] If the target channel includes the first internal channel, the first routing component strips the first routing guide included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel.

[0014] If the target channel includes the first external channel, the first routing component sets the routing information corresponding to the second routing component in the first routing guidance as the new outermost routing information to obtain a second access request; and sends the second access request to the second routing component through the first external channel.

[0015] In some embodiments, the step of the first routing component setting the routing information corresponding to the second routing component in the first routing guidance as new outermost routing information to obtain the second access request includes:

[0016] The first routing component strips off the outermost routing information included in the first routing guide to obtain a second routing guide; right-shifts the routing information of each layer included in the second routing guide to obtain a third routing guide; and generates the second access request based on the access key value and the third routing guide.

[0017] In some embodiments, the TCAM components included in the network device are arranged in series; the outermost routing information includes a local sending flag bit, an upward sending flag bit, a downward sending flag bit, and a designated direction routing component flag bit;

[0018] The local sending flag is used to indicate that the target channel includes a first internal channel;

[0019] The upward sending flag is used to indicate that the target channel includes a first external channel for upward sending;

[0020] The downward sending flag is used to indicate that the target channel includes a first external channel for downward sending;

[0021] The designated direction routing component flag is used to indicate the number of routing components that forward the first access request in the designated direction; the designated direction routing component flag is valid when the target channel includes the first external channel for upward transmission and the first external channel for downward transmission.

[0022] In some embodiments, the outermost routing information of the first routing guidance indicates the target channel, and the first routing component is an intermediate routing component that forwards the first access request; and the step of the first routing component sending the first access request through the target channel includes:

[0023] If the target channel includes the first internal channel, the first routing component strips the first routing guide included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel.

[0024] If the target channel includes the first external channel, the first routing component right-shifts the first routing guide according to the outermost routing information to obtain a second access request; and sends the second access request to the second routing component through the first external channel.

[0025] In some embodiments, the TCAM components included in the network device are arranged in series; the outermost routing information includes a local send flag bit and a continue forwarding flag bit;

[0026] The local sending flag is used to indicate that the target channel includes a first internal channel;

[0027] The continue forwarding flag is used to indicate that the target channel includes a first external channel that is sent in the opposite direction of receiving the access request.

[0028] In some embodiments, the outermost routing information of the first routing guidance indicates the target channel, and the first routing component is a tail routing component that forwards the first access request; and the step of the first routing component sending the first access request through the target channel includes:

[0029] If the target channel includes the first internal channel, the first routing component strips off the first routing guidance included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel.

[0030] In some embodiments, the TCAM components included in the network device are arranged in series; the outermost routing information includes a local transmission flag bit; and the local transmission flag bit is used to indicate that the target channel includes a first internal channel.

[0031] In some embodiments, the first access request is stored in a cache queue of the first routing component, the first access request is the first fragment of a total access request, and the first access request includes length information of the total access request; the method further includes:

[0032] After receiving the first access request, the first routing component determines whether the free storage space in the cache queue is greater than or equal to the storage space indicated by the length information; if so, executes the step of sending the first access request through the target channel; if not, adds a stop flag at the first storage address, and the stop flag indicates to stop sending the first access request; when the last fragment of the total access request is received, updates the stop flag at the first storage address to a send flag, and the send flag indicates to send the first access request.

[0033] In some embodiments, the first routing component is a first routing component that forwards the first access request, the first routing component is connected to the first access component via a second external channel, and the step of the first routing component receiving the first access request from the first access component to access the TCAM component includes:

[0034] The first routing component receives, through the second external channel, a first access request for accessing the TCAM component generated by the first access component.

[0035] In a second aspect, an embodiment of the present application provides a result return method, applied to a network device, wherein the network device includes a third routing component, a first access component, and a first TCAM component, wherein the third routing component is connected to the first TCAM component via a third external channel; the method includes:

[0036] The third routing component receives, through the third external channel, a first access result fed back by the first TCAM component, where the first access result is a result obtained by the first TCAM component performing a search after receiving the first access request according to any one of the methods described in the first aspect.

[0037] The third routing component forwards the first access result according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component.

[0038] In some embodiments, the third routing component is a tail routing component that forwards the first access result. The third routing component is connected to the first access component through a third internal channel. The step of forwarding the first access result by the third routing component according to the routing component coordinates carried by the first access result includes:

[0039] The third routing component forwards the first access result to the first access component through the third internal channel according to the routing component coordinates carried in the first access result.

[0040] In a third aspect, an embodiment of the present application provides a network device, comprising a first routing component, a third routing component, a first access component, and a first TCAM component, wherein the first routing component is connected to the first TCAM component via a first internal channel, and the third routing component is connected to the first TCAM component via a third external channel;

[0041] The first routing component is configured to receive a first access request from the first access component to access a TCAM component, the first access request including a first routing instruction, the first routing instruction indicating a target channel for sending the first access request, the target channel including the first internal channel and / or a first external channel, the first external channel being connected to a second routing component included in the network device, and the second routing component being connected to a second TCAM component included in the network device via a second internal channel; and sending the first access request via the target channel;

[0042] The third routing component is used to receive a first access result fed back by the first TCAM component through the third external channel, where the first access result is a result obtained by the first TCAM component after performing a search upon receiving the first access request; and forward the first access result according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component.

[0043] Beneficial effects of the embodiments of the present application:

[0044] In the technical solution provided by the embodiments of the present application, a first access request received by a first routing component includes a first routing direction, which indicates a target channel for transmitting the first access request. The first routing component transmits the first access request according to the target channel and forwards the access request to a connected TCAM component and / or other routing components. This eliminates the need for the access component to initiate multiple access requests and allows the routing component to send the access request to multiple TCAM components, thereby improving access request forwarding efficiency and, in turn, table lookup speed.

[0045] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0047] Figure 1 A schematic diagram of a routing component network;

[0048] Figure 2 A structural diagram of a routing component;

[0049] Figure 3 A schematic diagram for sending an access request;

[0050] Figure 4 A flowchart of a method for processing access requests provided in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of the first structure of the network device provided in an embodiment of the present application;

[0052] Figure 6 A schematic diagram of the structure of the routing component network of the access request processing part provided in an embodiment of the present application;

[0053] Figure 7 A schematic diagram of a cache queue and pointer linked list provided in an embodiment of the present application;

[0054] Figure 8 A schematic diagram of a cache queue provided in an embodiment of the present application;

[0055] Figure 9a A first schematic diagram of access request processing provided in an embodiment of the present application;

[0056] Figure 9bA second schematic diagram of access request processing provided in an embodiment of the present application;

[0057] Figure 9c A third schematic diagram of access request processing provided in an embodiment of the present application;

[0058] Figure 9d A fourth schematic diagram of access request processing provided in an embodiment of the present application;

[0059] Figure 10 A schematic diagram of a structure of routing guidance provided in an embodiment of the present application;

[0060] Figure 11 A flowchart of a result return method provided in an embodiment of the present application;

[0061] Figure 12 A schematic diagram of the structure of the routing component network of the result return part provided in an embodiment of the present application;

[0062] Figure 13 A second structural diagram of a network device provided in an embodiment of the present application;

[0063] Figure 14 A first schematic diagram of initiating a table lookup provided in an embodiment of the present application;

[0064] Figure 15 A second schematic diagram of initiating a table lookup provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.

[0066] In network devices such as switches and routers, TCAM table lookup technology is key to efficient packet forwarding. With the rapid growth of network scale and data traffic, traditional table lookup methods (such as linear and binary searches) are no longer able to meet the demands of high-speed forwarding. By supporting three states ("0," "1," and "wildcard"), TCAM can match multiple access requests in parallel, significantly improving table lookup speed. This technology is particularly suitable for scenarios requiring fast matching, such as access control lists and routing tables, meeting the demands of modern networks for high performance, low latency, and complex policy processing.

[0067] In addition to efficient TCAM lookup technology, the efficiency of the lookup path is also crucial. A well-suited network on chip (NOC) significantly impacts performance, latency, and scalability. Network devices include a routing component with forwarding capabilities. Access components and TCAM components can be attached to the routing component. The access component initiates access requests, which are forwarded by the routing component to find entries in the destination TCAM component.

[0068] like Figure 1 As shown, multiple routing components form a mesh routing component network (mesh). The structure of each routing component is as follows Figure 2 As shown, there are five bidirectional interfaces: East (E), West (W), South (South), North (N), and Local. Each input interface is equipped with an input buffer (IBUF) based on a First-In-First-Out (FIFO) memory. Data can be transferred between these interfaces in any direction via an arbitrator. TCAM components and access components can be connected to any component via a local interface. After the access component initiates an access request, the routing component where the access component resides can send the access request to the routing component where the destination TCAM component resides via the routing network.

[0069] If there are multiple destination TCAM components—that is, if the access component needs to search for table entries in multiple TCAM components—the access component must initiate multiple access requests and send them to the routing component where these TCAM components reside. Because the access component must initiate access requests serially, this process takes multiple clock cycles, resulting in low access request forwarding efficiency and low table lookup efficiency, which in turn slows down the table lookup process.

[0070] In addition, if the access request consists of multiple consecutive fragments, the access component needs more clock cycles to initiate a complete lookup. Figure 3 As shown, an access request consists of five 20-byte (B) fragments. Therefore, a single lookup by the access component requires five clock cycles. If a search is required in three TCAM components, the access component needs to initiate three lookups, resulting in a serial transmission of 15 clock cycles. If the transmission involves forwarding between multiple routing components, even more clock cycles are required. This further reduces the on-chip transmission efficiency and table lookup speed, ultimately leading to a decrease in packet forwarding efficiency.

[0071] In order to solve the above problems, the present application provides an access request processing method, such as Figure 4As shown, it is applied to a network device, the network device includes a first routing component, a first access component and a first TCAM component, the first routing component is connected to the first TCAM component through a first internal channel, and the access request processing method includes the following steps.

[0072] In step S41, the first routing component receives a first access request from the first access component to access the TCAM component. The first access request includes a first routing guide. The first routing guide indicates a target channel for sending the first access request. The target channel includes a first internal channel and / or a first external channel. The first external channel is connected to the second routing component included in the network device. The second routing component is connected to the second TCAM component included in the network device through the second internal channel.

[0073] Step S42: The first routing component sends a first access request through the target channel.

[0074] In the technical solution provided by the embodiments of the present application, a first access request received by a first routing component includes a first routing direction, which indicates a target channel for transmitting the first access request. The first routing component transmits the first access request according to the target channel and forwards the access request to a connected TCAM component and / or other routing components. This eliminates the need for the access component to initiate multiple access requests and allows the routing component to send the access request to multiple TCAM components, thereby improving access request forwarding efficiency and, in turn, table lookup speed.

[0075] In an embodiment of the present application, a network device includes multiple routing components. These multiple routing components can be divided into routing components for sending access requests and routing components for returning access results. Each routing component for sending access requests is connected to at least one other routing component for sending access requests, a TCAM component, and an access component. Each routing component for returning access results is connected to at least one other routing component for returning access results, a TCAM component, and an access component.

[0076] The routing component, TCAM component, and access component are all hardware components. The access component is used to initiate access requests, the routing component is used to forward access requests, and the TCAM component is used to receive access requests and look up table entries.

[0077] like Figure 5 The network device shown includes routing components 11 through 1N for sending access requests, routing components 21 through 2N for returning access results, TCAM components 31 through 3N, and access components 41 through 4N. The value of N is not limited herein. In the embodiments of the present application, the TCAM components and routing components included in the network device are arranged in series as an example, which is not intended to be limiting.

[0078] The first routing component is any routing component used to send access requests. The TCAM component connected to the first routing component is the first TCAM component, and the access component connected to the first routing component is the second access component. The third routing component is a routing component used to return access results. The third routing component is connected to the first TCAM component and the second access component. In other words, the third routing component and the first routing component are connected to the same TCAM component and the same access component, and the third routing component corresponds to the first routing component. For ease of description, the following uses the first routing component and the third routing component as an example.

[0079] Each routing component can include multiple channels. Each channel is a unidirectional or bidirectional link formed by connecting the routing component to other routing components, TCAM components, or access components through its ingress and / or egress interfaces. Depending on the location of the routing component in the network device, the channels included in the routing component can be divided into internal channels and external channels.

[0080] For the first routing component for sending the access request, the first routing component and the first TCAM component may be placed on the same hardware board, for example, Figure 5 In the example, routing component 11 and TCAM component 31 are located on board 51, routing component 12 and TCAM component 32 are located on board 52, routing component 1N and TCAM component 3N are located on board 5N, and so on.

[0081] The first routing component is connected to the first TCAM component via an outbound interface, forming a unidirectional link. This unidirectional link is a first internal channel, such as the unidirectional arrow between routing component 11 and TCAM component 31. The first routing component is connected to the second access component via an inbound interface, forming a unidirectional link. This unidirectional link is a second external channel, such as the unidirectional arrow between routing component 11 and access component 41. The first routing component is connected to another routing component for sending access requests via an inbound interface and an outbound interface, forming a bidirectional link. This bidirectional link is a fourth external channel, such as the bidirectional arrow between routing component 11 and routing component 12. The number of other routing components connected to the first routing component and the fourth external channel is not limited herein.

[0082] As for the third routing component for returning the access result, the third routing component and the second access component can be placed on the same hardware board, for example, Figure 5 In FIG, routing component 21 and access component 41 are located on board 61, routing component 22 and access component 42 are located on board 62, and routing component 2N and access component 4N are located on board 6N.

[0083] The third routing component is connected to the second access component via an outbound interface, forming a unidirectional link. This unidirectional link is a third internal channel, such as the unidirectional arrow between routing component 21 and access component 41. The third routing component is connected to the first TCAM component via an inbound interface, forming a unidirectional link. This unidirectional link is a third external channel, such as the unidirectional arrow between routing component 21 and TCAM component 31. The third routing component is connected to another routing component for returning access results via an inbound interface and an outbound interface, forming a bidirectional link. This bidirectional link is a fifth external channel, such as the bidirectional arrow between routing component 21 and routing component 22. The number of other routing components connected to the third routing component and the fifth external channel is not limited herein.

[0084] In the embodiments of the present application, the first routing component and the second access component can also be placed on the same hardware board, and the third routing component and the first TCAM component can also be placed on the same hardware board. That is, the channel connecting the first routing component to the second access component is an internal channel, and the channel connecting to the first TCAM component is an external channel; the channel connecting the third routing component to the first TCAM component is an internal channel, and the channel connecting to the third access component is an external channel. This description uses the example of the first routing component and the first TCAM component being placed on the same hardware board, and the third routing component and the second access component being placed on the same hardware board, and is not intended to be limiting.

[0085] The access request processing method provided in the embodiment of the present application is described in detail below through the first routing component. The routing components mentioned in the embodiment of the present application are all routing components for sending search requests. The result return method will be described in detail later and will not be described in detail here.

[0086] like Figure 6 The routing component network of the access request processing part shown in the figure is used as an example to describe that the network device includes four routing components for sending search requests. Figure 6 In the example, the routing component and access component used to return access results have been omitted.

[0087] In an embodiment of the present application, an access component generates an access request to access a TCAM component. The accessed TCAM component is referred to as the destination TCAM component. The access request includes a routing guide indicating the transmission of the access request. The routing guide may include at least one layer of routing information, each layer of routing information corresponding to a routing component on the forwarding path of the access request, and each layer of routing information indicates the channel through which the corresponding routing component transmits the access request. The structure of the routing guide and the content of each layer of routing information will be described in detail later and are not described in detail here. In an embodiment of the present application, the access request may be a complete access request or a fragment of the complete access request.

[0088] The access component can determine the routing components on the forwarding path of the access request based on the destination TCAM component, generate routing information corresponding to each routing component, assemble it into a routing guide, and encapsulate it together with the access key (i.e., the actual data to be searched) into an access request. The routing guide can be located in a fixed position such as the head or tail of the access request, and this is not limited. The access component can send access requests to the connected routing components. Each routing component on the forwarding path can receive access requests sent by the access component or other routing components, forward the access request according to the routing information of the corresponding layer included in the routing guide, and ultimately send the access request to the destination TCAM component for table lookup.

[0089] For ease of description, the process of the routing component forwarding the access request is described in detail by taking the first routing component receiving and forwarding the first access request as an example. The access component initiating this access is the first access component, and the routing guidance included in the first access request is the first routing guidance.

[0090] In the above step S41, the first routing component may receive the first access request in two ways.

[0091] In mode 1, the first routing component receives the access request sent by the first access component as the first access request. That is, the first routing component is directly connected to the first access component via the second external channel. The first access component and the second access component are the same access component, and the first routing component is the first routing component to forward the first access request.

[0092] In this case, the first routing component may receive, through the second external channel, a first access request generated by the first access component for accessing the TCAM component.

[0093] In mode 2, the first routing component receives an access request sent by another routing component as the first access request. That is, the first routing component is not directly connected to the first access component; the first access component and the second access component are different access components. The first routing component is an intermediate routing component or a tail routing component that forwards the first access request.

[0094] In this case, the first routing component can receive the access request sent by other routing components (such as the fourth routing component) as the first access request through a fourth external channel (referred to as the sixth external channel for ease of distinction).

[0095] In an embodiment of the present application, in the above two methods, the input interface for the first routing component to receive the first access request is different. In method 1, the input interface for receiving the first access request is the input interface of the second external channel, and the output channel corresponding to the input interface (that is, the channel that can forward the first access request) includes all fourth external channels and the first internal channel. In method 2, the input interface for receiving the first access request is the input interface of the sixth external channel, and the output channel corresponding to the input interface includes the other fourth external channels except the sixth external channel and the first internal channel. For the tail routing component that forwards the first access request, if the other fourth external channels do not exist, the output channel only includes the first internal channel.

[0096] After receiving the first access request, the first routing component can determine the channel for sending the first access request, i.e., the target channel, according to the routing information of the corresponding layer included in the first routing guidance. In the embodiment of the present application, the target channel is one or more output channels corresponding to the input interface that received the first access request, and can be specifically divided into the following three situations.

[0097] In case 1, the target channel is the first internal channel, and the first TCAM component is the destination TCAM component. The first routing component may execute step S42 to send a first access request to the first TCAM component via the first internal channel. The first TCAM component may receive the first access request and search for a table entry based on the first access request.

[0098] In case 2, the target channel is the fourth external channel (referred to as the first external channel for ease of distinction). The first TCAM component is not the destination TCAM component, but the TCAM component connected to another routing component on the forwarding path is the destination TCAM component. The routing component connected to the first external channel is called the second routing component.

[0099] The first routing component may execute step S42 to send a first access request to the second routing component via the first external channel. If there are multiple first external channels, the first routing component may send the first access request to each second routing component via each first external channel.

[0100] In the embodiment of the present application, the second routing component may further be connected to a TCAM component (referred to as a second TCAM component) via an internal channel (referred to as a second internal channel). The second routing component may receive the first access request sent by the first routing component. In this case, the second routing component may serve as a new first routing component and execute steps S41 to S42 above to process the first access request.

[0101] In case 3, the target channels are the first internal channel and the first external channel, the first TCAM component is the destination TCAM component, and the TCAM components connected to other routing components on the forwarding path are also destination TCAM components. The first routing component may execute step S42 to send a first access request to the first TCAM component via the first internal channel, and to send a first access request to the second routing component via the first external channel. This is similar to the above-described cases 1 and 2 and is not further described here.

[0102] In some embodiments, to ensure efficient forwarding of access requests and maintain network stability, a cache queue can be set at each inbound interface of the first routing component, and the output channel corresponding to each cache queue is the output channel corresponding to the inbound interface. After receiving the first access request, the first routing component can also store the first access request in the cache queue.

[0103] Based on how the first routing component receives the first access request, the first routing component may store the first access request in a cache queue corresponding to the second external channel / the sixth external channel. The first routing component may store the first access request in an idle location (i.e., a storage address marked as idle) in the cache queue in a predetermined order or randomly, without limitation. The storage address of the first access request in the cache queue is the first storage address.

[0104] In an embodiment of the present application, the first routing component can also store a head pointer linked list corresponding to the cache queue at each input interface, and each head pointer linked list records the head pointer of each output channel corresponding to the cache queue. The head pointer of each output channel is used to indicate the storage address in the cache queue of the access request to be sent through the output channel in each clock cycle.

[0105] During each clock cycle, the first routing component may send, through each output channel, an access request at the storage address pointed to by the head pointer of the output channel. If the head pointer of the target channel in the current clock cycle points to the first storage address of the first access request, indicating that the access request to be sent in the current clock cycle is the first access request, the first routing component may execute step S42 in the current clock cycle and send, through the target channel, the first access request at the first storage address pointed to by the head pointer of the target channel.

[0106] When there are multiple target channels, for each target channel, the first routing component can execute the above step S42 within the clock cycle in which the head pointer of the target channel points to the first storage address, and send the first access request at the first storage address through the target channel. For ease of description, the clock cycle in which the first access request is sent will be referred to as the current clock cycle. Applying the technical solution provided in the embodiment of the present application, by maintaining the head pointer linked list, the routing component can accurately send the access request according to the storage address pointed to by the head pointer in each clock cycle, thereby ensuring the accuracy of sending the access request.

[0107] After receiving the first access request, the first routing component may continue to receive other access requests and store the other access requests in a cache queue.

[0108] In an embodiment of the present application, if a second access request is stored in the cache queue, the first routing component can execute the above step S42 and send the first access request through the target channel, and then point the head pointer to the second storage address of the second access request in the cache queue.

[0109] The second access request is the next access request to be sent via the target channel, following the first access request. That is, the cache queue stores access requests that are stored after the first access request and are to be sent via the target channel. In this embodiment of the present application, when there are multiple target channels for sending the first access request, for any target channel, the second access request is the next access request to be sent via that target channel. The second access requests for multiple target channels can be the same or different. For ease of description, this description uses only one target channel as an example, which is not intended to be limiting.

[0110] After the current clock cycle ends, the first routing component can point the head pointer of the target channel to the storage address of the second access request in the cache queue, i.e., the second storage address. By updating the head pointer, the first routing component can send the second access request at the second storage address pointed to by the head pointer of the target channel through the target channel in the next clock cycle, thereby implementing sequential transmission of access requests.

[0111] In some embodiments, the cache queue may further include an address flag bit for each output channel corresponding to each storage address, wherein the address flag bit for each output channel is used to indicate the storage address of the next access request after the access request at the corresponding storage address is sent through the output channel.

[0112] After receiving a new access request (e.g., a second access request) to be sent through the target channel and storing the second access request in the cache queue, the first routing component can update the value of the address flag of the target channel corresponding to the first storage address (referred to as the first address flag) to the second storage address, and record the storage address of the next access request to be sent through the target channel in the cache queue. In this way, after the current clock cycle ends, the first routing component can update the storage address pointed to by the head pointer to the value of the first address flag, thereby setting the head pointer to the second storage address.

[0113] In some embodiments, the first routing component may store a tail pointer linked list corresponding to the cache queue at each input interface, where each tail pointer linked list records the tail pointer of each output channel corresponding to the cache queue, and the tail pointer of each output channel is used to indicate the storage address in the cache queue of the last access request to be sent through the output channel.

[0114] After storing the first access request in the cache queue, the first routing component may point the tail pointer to the first storage address of the first access request in the cache queue after the clock cycle for receiving the first access request ends, thereby updating the tail pointer.

[0115] In this embodiment of the present application, if a third access request is also stored in the cache queue, the first routing component may set the value of the second address flag bit of the target channel corresponding to the third storage address to the first storage address. The third storage address is the storage address of the third access request in the cache queue.

[0116] The third access request is the previous access request to be sent through the target channel, that is, the cache queue stores access requests that were stored before the first access request and are to be sent through the target channel. In the embodiment of the present application, when there are multiple target channels, for any target channel, the third access request is the previous access request to be sent through that target channel. The third access requests for multiple target channels can be the same or different. For ease of description, only one target channel is used as an example, which is not limiting.

[0117] After the clock cycle of receiving the first access request ends, the first routing component can set the value of the address flag (i.e., the second address flag) of the target channel corresponding to the third storage address to the storage address of the next access request of the third access request, that is, to the first storage address.

[0118] In some embodiments, the first routing component may store a valid pointer linked list corresponding to the cache queue at each input interface, where each valid pointer linked list records the valid pointer of each output channel corresponding to the cache queue. The valid pointer of each output channel is used to indicate whether the output channel is valid, that is, whether there is an access request to be sent in the output channel.

[0119] Before the start of each clock cycle, the first routing component can check whether the valid pointer of each output channel indicates that the output channel is valid, so as to determine whether the clock cycle needs to send an access request through the output channel. The access request is sent only when the valid pointer indicates that it is valid, thereby ensuring that the access request is accurately sent. In an embodiment of the present application, after determining the valid output channel, the first routing component can send the access request at the storage address pointed to by the head pointer of the valid output channel through each valid output channel. That is, when the valid pointer of the target channel indicates that the target channel is valid, it means that there is a first access request to be sent in the target channel, and the first routing component can execute the above step S42 to send the first access request through the target channel.

[0120] After each clock cycle, the first routing component can update the valid pointer of each output channel. For ease of description, the first routing component updates the valid pointer of the target channel after the first clock cycle.

[0121] In the embodiment of the present application, the first routing component may first determine whether a new access request to be sent through the target channel is received within the first clock cycle.

[0122] If a new access request (such as a second access request) is received, indicating that there is an access request to be sent in the target channel in the next clock cycle, the first routing component may set the valid pointer of the target channel to indicate that the target channel is valid before the start of the next clock cycle.

[0123] If no new access request is received, the first routing component may further determine whether the head pointer and the tail pointer of the target channel are the same, and whether an access request is sent within the first clock cycle.

[0124] If the head pointer and tail pointer of the target channel are the same and an access request is sent within the first clock cycle, it means that there is only one access request to be sent in the target channel, and the first routing component has sent this access request within the first clock cycle. There is no access request to be sent in the target channel in the next clock cycle. Before the start of the next clock cycle, the first routing component can set the valid pointer of the target channel to indicate that the target channel is invalid.

[0125] If the head pointer and the tail pointer of the target channel are different, or no access request is sent in the first clock cycle, indicating that there is an access request to be sent in the target channel in the next clock cycle, then before the start of the next clock cycle, the first routing component can set the valid pointer of the target channel to indicate that the target channel is valid.

[0126] In some embodiments, the first routing component also stores a usage flag corresponding to each storage address in the cache queue, and the usage flag is used to mark the corresponding storage address. In the embodiment of the present application, when the value of the usage flag is a first preset value, the corresponding storage address is marked as idle (that is, the storage address can be used); when the value of the usage flag is a second preset value, the corresponding storage address is marked as occupied. For ease of description, the following explanation is taken as an example of the first preset value being 1 and the second preset value being 0, and no limitation is imposed on this. For example, for a cache queue with a depth of 5 (that is, the total number of storage addresses in the cache queue is 5), a 5-bit (bit) status register can be set, and each bit of the status register is a usage flag, corresponding to storage address 1 to storage address 5. 11111 means that all 5 storage addresses are idle, 00000 means that all 5 storage addresses are occupied, and 00001 means that only storage address 1 is idle.

[0127] In the embodiment of the present application, the first routing component may randomly determine a usage flag bit from the usage flag bits whose values ​​are the first preset values, or determine a usage flag bit according to a preset order, which is not limited to the above. The determined usage flag bit is the first usage flag bit.

[0128] The first routing component can determine the storage address corresponding to the first usage flag, use the storage address as the first storage address, store the first access request to the first storage address, and update the value of the first usage flag to a second preset value, that is, mark the first storage address as occupied.

[0129] In this embodiment of the present application, the target channel may include at least one channel. For example, the target channel may include a first internal channel and one or more first external channels; or, the target channel may include multiple first external channels, without limitation. The first routing component may execute step S42 above to send the first access request by: reading the first access request from the cache queue and recording the number of reads of the first access request; and sending the first access request through at least one channel.

[0130] After storing the first access request in the cache queue, the first routing component may record the number of target channels, that is, the number of times the first access request is to be sent. After reading the first access request from the cache queue, the first routing component may record the number of times the first access request is read, that is, the number of times the first access request is sent. When the number of reads reaches the number of at least one channel, that is, the number of times the first access request is sent reaches the number of times the first access request is to be sent, indicating that the first access request has been sent, the first routing component may mark the first storage address of the first access request in the cache queue as free, that is, update the first usage flag to a second preset value.

[0131] In an embodiment of the present application, the first routing component may set a counter for each storage address to record the number of times the first access request is to be sent. After the first access request is stored in the cache queue, the value of the counter is the number of target channels.

[0132] In each clock cycle in which the head pointer of a target channel points to the first storage address, the first routing component can read the first access request from the cache queue according to the number of target channels in which the head pointer points to the first storage address, record the number of reads of the first access request in the clock cycle, and send the access request through the target channel in which the head pointer points to the first storage address.

[0133] If the number of reads is less than the counter value, indicating that the first access request has not yet been sent, the counter value is updated to the difference between the number of target channels and the number of reads. The updated value is the number of times the first access request remains to be sent. The first routing component can continue to send the first access request in subsequent clock cycles, updating the counter value until the number of reads in a certain clock cycle matches the counter value. This determines that the total number of reads has reached the number of target channels, and the first access request has been sent successfully.

[0134] For example, the target channel includes a first internal channel and a first external channel. The first routing component records that the number of target channels is 2, that is, the value of the counter is 2.

[0135] In the second clock cycle, the head pointer of the first internal channel points to the first storage address. The first routing component can read the first access request from the cache queue in the second clock cycle, record the number of reads of the first access request in the second clock cycle, and send the first access request to the first TCAM component through the first internal channel.

[0136] In the third clock cycle, the head pointer of the first external channel points to the first storage address. The first routing component can read the first access request from the cache queue in the third clock cycle, record the number of reads of the first access request in the third clock cycle, and send the first access request to the second routing component through the first external channel.

[0137] When the second clock cycle and the third clock cycle are the same clock cycle, the first routing component records the number of reads of the first access request as 2, which is the same as the value of the counter. After sending the first access request through the first internal channel and the first external channel, the first routing component updates the first usage flag to the second preset value.

[0138] When the second clock cycle and the third clock cycle are not the same clock cycle, the first routing component can record the number of reads of the first access request as 1 in the second clock cycle, which is less than the value of the counter. Then, after the first routing component sends the first access request through the first internal channel, the value of the counter is updated to 1; in the third clock cycle, the first routing component records the number of reads of the first access request as 1, which is the same as the value of the counter. Then, after the first routing component sends the first access request through the first external channel, the first usage flag is updated to the second preset value.

[0139] In an embodiment of the present application, after determining that the first access request has been sent, the first routing component may not delete the first access request. When the first routing component subsequently writes a new access request at the first storage address, the new access request may directly overwrite the first access request, thereby reducing memory management overhead; the first routing component may also delete the first access request, and there is no limitation on this.

[0140] By applying the technical solutions provided in the embodiments of this application, and by using flag bits, the first routing component can more conveniently manage storage addresses, facilitating timely writing and reading of access requests, thereby conserving storage space in the cache queue. Using a counter, the first routing component can promptly determine whether an access request has been sent, enabling access requests to be sent in multiple clock cycles, thereby ensuring the correctness of access request transmission.

[0141] In some embodiments, the first access request may be the first fragment of the total access request, that is, the first access request is a packet header. The first access request includes the length information of the total access request, and the length information may be the number of fragments of the total access request. For example, if the total access request is divided into three fragments, the length information included in the first access request (i.e., the first fragment) is 2 (the length information of one fragment is 0). In an embodiment of the present application, other fragments of the total access request may also carry length information, and the length information may be the order of the access requests in the total access request. For example, if the total access request is divided into three fragments, the length information included in the second fragment is 1, and the length information included in the last fragment (i.e., the tail of the packet) is 0.

[0142] To reduce the probability of a deadlock between routing components causing an access request to fail to be sent, the first routing component can, after receiving the first access request, determine whether the free storage space in the cache queue is greater than or equal to the storage space indicated by the length information. In other words, the first routing component determines whether the number of storage addresses marked as free in the cache queue is greater than or equal to the number of shards in the total access request, thereby determining whether the tail of the total access request can be stored in the cache queue.

[0143] If so, it indicates that the tail of the total access request can be stored in the cache queue. Then, after storing the first access request in the first storage address, the first routing component may execute the above step S42 and send the first access request through the target channel.

[0144] If not, indicating that the tail of the total access request cannot currently be stored in the cache queue, the first routing component may add a stop flag at the first storage address after storing the first access request in the first storage address. The stop flag indicates to stop sending the first access request. The value of the stop flag may be a third preset value, which may be 0, and there is no limitation on this.

[0145] The first routing component suspends sending the first access request at the first storage address, records the first storage address of the first access request, and continues to receive other fragments of the total access request. After receiving the last fragment of the total access request, the first routing component may update the stop flag at the first storage address to a send flag. The send flag indicates sending the first access request. The value of the send flag may be a fourth preset value, which may be 1, and this is not limited.

[0146] In an embodiment of the present application, the first routing component may set an address identifier at the storage address of each cache queue. When the address identifier is a stop identifier, that is, when the value is the third preset value, the access request in the corresponding storage address is suspended; when the address identifier is a send identifier, that is, when the value is the fourth preset value, the access request in the corresponding storage address can be sent. The default value of the address identifier is the fourth preset value, and the first routing component updates the address identifier to a stop identifier only when it receives any access request and the free storage space in the cache queue is less than the storage space indicated by the length information included in the access request.

[0147] By applying the technical solution provided in the embodiments of the present application and setting a stop flag, it is possible to prevent an incomplete packet sent by a routing component through a certain channel from causing other routing components to get stuck, thereby causing an irreversible deadlock problem.

[0148] Figure 7 A schematic diagram of a cache queue and pointer linked list provided in an embodiment of the present application. Figure 7As shown, the cache queue includes M+1 storage addresses (i.e., the depth of the cache queue is M+1), which can store access requests 0 to M. The output channels corresponding to the cache queue are channels 0 to m. The cache queue also includes address flags for each output channel corresponding to each storage address, such as the address flags for channels 0 to m (i.e., next pointers 0 to m) corresponding to the storage address of access request 0, and the address flags for channels 0 to m (i.e., next pointers 0 to m) corresponding to the storage address of access request 1.

[0149] The routing component can also store a head pointer linked list, a tail pointer linked list, and a valid pointer linked list corresponding to the cache queue, recording the head pointer, tail pointer, and valid pointer of channels 0 through m, respectively. The head pointer and tail pointer of each channel point to a storage address included in the cache queue. For example, the head pointer of channel 0 points to the storage address where access request 0 is located, and the tail pointer of channel m points to the storage address where access request 2 is located. The value of M(m) is not limited here.

[0150] Figure 8 A schematic diagram of a cache queue provided in an embodiment of the present application is provided, taking as an example a case where there are three output channels (ie, channels 0 to 2), the cache queue depth is 5, and the storage addresses are row numbers 0 to 4 on the right.

[0151] The routing component receives five access requests (i.e., D0 to D4), among which D0 is sent through channel 0 (i.e., the target channel is channel 0), D1 is sent through channel 0 and channel 1, D2 is sent through channel 0 and channel 2, D3 is sent through channel 0, channel 1, and channel 2, and D4 is sent through channel 0, channel 1, and channel 2.

[0152] After the routing component sends D0 through channel 0, it determines that the next access request sent through channel 0 is in row 1 based on the "1" address flag of channel 0 corresponding to D0. Therefore, the next access request is D1. The routing component updates the head pointer of channel 0 to "1" and sends D1 through channel 0 in the next cycle. After the routing component sends D1 through channel 0, it determines that the next access request sent through channel 0 is in row 2 based on the "2" address flag of channel 0 corresponding to D1. Therefore, the next access request is D2. Similarly, the routing component can send D0 to D4 through channel 0 in sequence.

[0153] Similarly, after the routing component sends D1 through channel 1, it determines, based on the address flag bit "3" of channel 1 corresponding to D1, that the next access request sent through channel 0 is in row 3, meaning that the next access request is D3. The routing component updates the head pointer of channel 1 to "3" and sends D3 through channel 1 in the next cycle. Using the same method, the routing component can send D1, D3, and D4 through channel 0 and D2-D4 through channel 2. The specific process is not detailed here.

[0154] If the routing component receives the next access request (such as D5) and the routing component has sent D0, and the storage address in row 0 is free, the routing component can store D5 in row 0 and update the address flag of the target channel corresponding to the previous access request of D5 in each target channel according to the target channel of D5. For example, if the target channels of D5 are channel 0 and channel 1, and the previous access request of D5 in channel 0 and channel 1 is D4, the routing component will update the address flag of channel 0 and channel 1 corresponding to D4 to "0".

[0155] In the technical solution provided in the embodiment of the present application, the access request only needs to be written once and can be repeatedly output on demand through three channels, which significantly reduces the area and power consumption required for chip design.

[0156] In some embodiments, the outermost routing information in a routing guide indicates the target channel for the routing component to send an access request. Specifically, the outermost routing information in a first routing guide indicates the target channel for the first routing component to send a first access request. In other words, the outermost routing information corresponds to the first routing component. Based on the position of the first routing component in the forwarding path for the first access request, the following three scenarios can be considered.

[0157] In case a, the first routing component is the first routing component that forwards the first access request, and the first routing guidance includes routing information corresponding to all routing components on the forwarding path.

[0158] In an embodiment of the present application, when the TCAM components are arranged in series, the outermost routing information may include a local sending flag bit, an upward sending flag bit, a downward sending flag bit, and a designated direction routing component flag bit.

[0159] The local transmission flag (Local) is used to indicate that the target channel includes the first internal channel. It can be 1 bit in length. When the local transmission flag is the first preset value, the target channel includes the first internal channel. When the local transmission flag is the second preset value, the target channel does not include the first internal channel.

[0160] The Up flag (Up) indicates that the target channel includes the first external channel sent upward. It can be 1 bit long. When the Up flag is at the first preset value, the target channel includes the first external channel sent upward. When the Up flag is at the second preset value, the target channel does not include the first external channel sent upward.

[0161] The Down flag (Down) indicates that the target channel includes the first external channel sent downward. It can be 1 bit long. When the Down flag is at the first preset value, the target channel includes the first external channel sent downward. When the Down flag is at the second preset value, the target channel does not include the first external channel sent downward.

[0162] The specified direction routing component flag (Size up) is used to indicate the number of routing components that forward the first access request in the specified direction. The specified direction can be an upward direction or a downward direction. For the sake of ease of description, the subsequent description will take the upward direction as an example, which does not serve as a limitation.

[0163] The designated direction routing component flag is valid when the target channel includes the first external channel for upward transmission and the first external channel for downward transmission. That is, when the values ​​of the upward transmission flag and the downward transmission flag are both the first preset value, the designated direction routing component flag is valid, and the first routing component can determine the number of routing components to forward the first access request in the upward direction (i.e., the number of routing components on the forwarding path in the upward direction) based on the value of the designated direction routing component flag.

[0164] The length of the designated direction routing component flag bit is related to the total number of routing components. For example, if the total number of routing components is 4, the length of the designated direction routing component flag bit can be 1 bit. When the value is 0, the number of routing components that forward the first access request in the upward direction (hereinafter referred to as the forwarding number) is 1. When the value is 1, the forwarding number is 2.

[0165] For another example, if the total number of routing components is 6, the length of the routing component flag bit for a specified direction can be 2 bits. When the value is 00, the forwarding quantity is 1, when the value is 01, the forwarding quantity is 2, when the value is 10, the forwarding quantity is 3, and when the value is 11, the forwarding quantity is 4. The specific setting can be made according to actual needs.

[0166] The first routing component can determine the target channel based on the local sending flag, the upward sending flag, and the downward sending flag included in the outermost routing information. Depending on whether the target channel includes the first internal channel and / or the first external channel, the first routing component can use different methods to send the first access request.

[0167] In the case where the target channel includes the first internal channel, the first routing component may strip off the first routing guide included in the first access request to obtain the access key value; and send the access key value to the first TCAM component through the first internal channel.

[0168] In the embodiment of the present application, the first TCAM component is a destination TCAM component. The first routing component can remove the first routing guide and send the access key value to the first TCAM component through the first internal channel. The first TCAM component can search the table entry based on the access key value.

[0169] When the target channel includes the first external channel, in order to ensure that the outermost routing information in the routing guidance included in the access request received by the second routing component corresponds to the second routing component, the first routing component can set the routing information corresponding to the second routing component in the first routing guidance as the new outermost routing information to obtain the second access request; and send the second access request to the second routing component through the first external channel.

[0170] In an embodiment of the present application, the first routing component can determine the position of the second routing component on the forwarding path based on the upward sending flag, downward sending flag and designated direction routing component flag included in the outermost routing information, so as to determine the layer where the routing information corresponding to the second routing component is located.

[0171] In the embodiment of the present application, the routing information included in each layer of the routing guidance increases in number from right to left. In the routing guidance included in the access request received by the first routing component, the outermost layer of routing information is the first layer of routing information (L0), followed from right to left by: the second layer of routing information (L1), the third layer of routing information (L2), the fourth layer of routing guidance (L3), etc., which respectively correspond to the first routing component (i.e., the first routing component), the second routing component, the third routing component, the fourth routing component, and so on on the forwarding path. For example, L1 indicates the target channel for the second routing component on the forwarding path to send the access request, and the same applies to L2 and L3.

[0172] If only one of the upward sending flag and the downward sending flag included in the outermost routing information is the first preset value, and the other flag is the second preset value, indicating that the first routing component only sends the first access request in one direction, then the routing components in that direction are the second routing component, the third routing component, and so on on the forwarding path, and the corresponding routing information is L1, L2, and so on.

[0173] For example, the total number of routing components is 4. Figure 9a to Figure 9dIn the figure, the four routing components are all routing components on the forwarding path. L0, L1, L2, and L3 represent the routing information corresponding to the routing components respectively. The routing information corresponding to the first routing component is L0.

[0174] exist Figure 9a and Figure 9d In the example, the first routing component sends an access request in only one direction. The routing components in that direction are the second routing component, the third routing component, and the fourth routing component on the forwarding path, and the corresponding routing information is L1, L2, and L3.

[0175] If the upward sending flag and the downward sending flag included in the outermost routing information are both the first preset value, then the designated direction routing component flag is valid. Based on the forwarding quantity indicated by the designated direction routing component flag, the position of the routing components with the forwarding quantity in the upward direction on the forwarding path and the corresponding routing information are first determined, and then the position of the routing components in the downward direction on the forwarding path and the corresponding routing information are determined. For example, if the forwarding quantity is 1, the routing component in the upward direction connected to the first routing component is the second routing component, corresponding to L1, and the routing component in the downward direction is the third routing component, corresponding to L2, etc.; if the forwarding quantity is 2, the two routing components in the upward direction connected to the first routing component are the second routing component and the third routing component, corresponding to L1 and L2, respectively, and the routing component in the downward direction is the fourth routing component, corresponding to L3, etc.

[0176] Still Figure 9a to Figure 9d For example. Figure 9b to Figure 9c In the example, the first routing component sends access requests in two directions simultaneously.

[0177] for Figure 9b , the forwarding quantity indicated by the flag of the routing component in the specified direction is 1. The 1 routing component in the upward direction is the second routing component on the forwarding path, and the corresponding routing information is L1. The 2 routing components in the downward direction are the third routing component and the fourth routing component on the forwarding path, and the corresponding routing information is L2 and L3 respectively.

[0178] for Figure 9c , the forwarding quantity indicated by the flag of the routing component in the specified direction is 2. The two routing components in the upward direction are the second routing component and the third routing components on the forwarding path, and the corresponding routing information is L1 and L2 respectively. The one routing component in the downward direction is the fourth routing component on the forwarding path, and the corresponding routing information is L3.

[0179] In this embodiment of the present application, the first routing component may set the routing information corresponding to the determined second routing component as the new outermost routing information, obtain a new routing guide, update the first routing guide to the new routing guide, and generate a new access request, which is the second access request. The first routing component sends the second access request to the second routing component, and the second routing component may act as the new first routing component, execute steps S41 and S42 above, and process the received access request as the first access request.

[0180] In some embodiments, the first routing component can strip off the outermost routing information included in the first routing guidance to obtain a second routing guidance; right-shift the routing information of each layer included in the second routing guidance to obtain a third routing guidance; and generate a second access request based on the access key value and the third routing guidance.

[0181] The first routing component may first strip off the outermost routing information, that is, strip off the routing information corresponding to the first routing component, to obtain the second routing guidance. In the embodiment of the present application, the length of the routing information corresponding to the first routing component is the total length of all flag bits, such as 4 bits.

[0182] After determining the routing information corresponding to the second routing component, the first routing component can shift the second routing guide to the right so that the routing information corresponding to the second routing component is located in the outermost layer. After the right shift, the empty space on the left is filled with 0 to obtain the third routing guide, and the third routing guide is added at a fixed position such as the head or tail of the search keyword to generate a second access request.

[0183] Still Figure 9a to Figure 9d For example, the first routing guide includes four layers of routing information: L3, L2, L1, and L0. Figure 9a and Figure 9d In the example, the routing information corresponding to the second routing component is L1. After the first routing component strips off the outermost routing information L0, L1 is located at the outermost layer. The second routing guidance is the third routing guidance, which is: L3, L2, L1. Figure 9b After the first routing component strips off the outermost routing information, the routing information corresponding to the second routing component is L1, and the routing information corresponding to the third routing component is L2. The first routing component needs to move L1 and L2 to the outermost layer respectively, and send the third routing instructions L3, L2, and L1 upward after the right shift, and send 00, L3, and L2 downward.

[0184] The first routing component may send a second access request to the second routing component through the corresponding first external channel. The second routing component may receive the second access request and, at this point, may act as a new first routing component, treating the second access request as the first access request, and executing steps S41 to S42 above to process the access request.

[0185] In case b, the first routing component is an intermediate routing node that forwards the first access request, and the first routing guidance includes routing information corresponding to some routing components on the forwarding path.

[0186] In the embodiment of the present application, when the TCAM components are arranged in series, the outermost routing information may include a local sending flag bit and a continue forwarding flag bit.

[0187] The local sending flag is used to indicate that the target channel includes the first internal channel, which is the same as the local sending flag in the above case a and will not be described in detail here.

[0188] The continue forwarding flag bit is used to indicate that the target channel includes the first external channel sent in the opposite direction of the access request. The length can be 1 bit. When the continue forwarding flag bit is at a first preset value, the target channel includes the first external channel sent in the opposite direction of the access request. When the continue forwarding flag bit is at a second preset value, the target channel does not include the first external channel sent in the opposite direction of the access request.

[0189] For example, if the fourth routing component (i.e., the routing component that receives the first access request) is located above the first routing component, the direction in which the first access request is received by the first routing component is an upward direction, and the opposite direction in which the first access request is received is a downward direction. When the continue forwarding flag is at a first preset value, the target channel includes the first external channel for downward transmission, and the first routing component continues to send the access request to the second routing component below it via the downward first external channel.

[0190] If the target channel includes the first internal channel, the first routing component can strip the first routing direction included in the first access request to obtain the access key value, and send the access key value to the first TCAM component via the first internal channel. For details, please refer to the relevant description of the above scenario a and will not be repeated here.

[0191] In the case where the target channel includes the first external channel, the first routing component may right-shift the first routing guidance according to the outermost routing information to obtain a second access request; and send the second access request to the second routing component through the first external channel.

[0192] In an embodiment of the present application, the length of the routing information corresponding to the intermediate routing component is the total length of the local sending flag and the continue forwarding flag, such as 2 bits. The first routing component can right-shift the first routing guidance by the length of the outermost routing information to obtain a new routing guidance. For example, if the first routing guidance is: L3, L2, L1, the new routing guidance after right shift is: 00, L3, L2. The first routing component can generate a second access request based on the new routing guidance, and send the second access request to the second routing component through the corresponding first external channel. For details, please refer to the relevant description in part a of the above situation, which will not be described in detail here.

[0193] In case c, the first routing component is a tail routing component that forwards the first access request, and the first routing guide only includes routing information corresponding to the first routing component. In this case, the target channel does not include the first external channel.

[0194] In an embodiment of the present application, when the TCAM components are arranged in series, the outermost routing information may include a local send flag. The local send flag is used to indicate that the target channel includes the first internal channel. This is the same as the local send flag in the above-described scenario a and is not further described here. In an embodiment of the present application, the outermost routing information may also include a continue forwarding flag, and the continue forwarding flag may be a second preset value.

[0195] If the target channel includes the first internal channel, the first routing component can strip the first routing direction included in the first access request to obtain the access key value, and send the access key value to the first TCAM component via the first internal channel. For details, please refer to the relevant description of the above scenario a and will not be repeated here.

[0196] In an embodiment of the present application, the first access component can determine, based on the destination TCAM component, the routing component connected to the destination TCAM component, obtain a forwarding path for the access request, and determine the position of each routing component on the forwarding path. Based on the position of each routing component on the forwarding path, the first access component can determine the layer at which the routing information corresponding to the routing component resides, determine the channel through which each routing component sends the access request, generate corresponding routing information, and obtain routing guidance.

[0197] For example, the total number of routing components is 4. Figure 10 The routing guide shown in the figure. 0 to 8 above represent bits. A complete routing guide can include routing information for four layers, namely L3, L2, L1, and L0.

[0198] Among them, L0 is the first-layer routing information, including the local flag bit (i.e., the local sending flag bit), the upward flag bit (i.e., the upward sending flag bit), the downward flag bit (i.e., the downward sending flag bit), and the indication flag bit (i.e., the designated direction routing component flag bit), which are located at bits 0, 1, 2, and 3 respectively.

[0199] L1 is the second layer routing information, including the local flag bit (ie, the local sending flag bit) and the continue flag bit (ie, the continue sending flag bit), which are located at the 4th and 5th bits respectively.

[0200] L2 is the third-layer routing information, including the local flag bit (i.e., the local sending flag bit) and the continue flag bit (i.e., the continue sending flag bit), which are located at bits 6 and 7 respectively.

[0201] L3 is the fourth layer routing information, including the local flag bit (ie, the local sending flag bit), which is located at the 8th bit.

[0202] For example, Figure 9a The access component connected to the routing component corresponding to L0 initiates an access request, and the destination TCAM component is the TCAM component connected to the routing components corresponding to L0, L1, and L3. Then the positions of the routing components corresponding to L0 to L3 on the forwarding path are the first routing component to the fourth routing component, respectively.

[0203] Since the TCAM component connected to the routing component corresponding to L0 is the destination TCAM component and needs to continue to send access requests downward, the local flag bit included in L0 is 1, the upward flag bit is 0, the downward flag bit is 1, and the indication flag bit is 0 (the default value is 0), that is, L0 is 0101.

[0204] Since the TCAM component connected to the routing component corresponding to L1 is the destination TCAM component and needs to continue to send the access request downward, the local flag bit and the continue flag bit included in L1 are 1, that is, L1 is 11.

[0205] Since the TCAM component connected to the routing component corresponding to L2 is not the destination TCAM component and the access request needs to be sent downward, the local flag bit included in L2 is 0 and the continue flag bit is 1, that is, L2 is 10.

[0206] Since the TCAM component connected to the routing component corresponding to L3 is the destination TCAM component and does not need to continue to send the access request downward, the local flag included in L3 is 1, that is, L3 is 1.

[0207] like Figure 9a In the example, the destination TCAM component is the TCAM component connected to the routing components corresponding to L0 and L1. The positions of the routing components corresponding to L0 to L3 on the forwarding path are the first routing component to the fourth routing component, respectively.

[0208] Since the routing component corresponding to L1 does not need to continue to send access requests downward, the local flag bit included in L1 is 1 and the continue flag bit is 0, that is, L1 is 01. In this case, L2 and L3 can be default values, such as L2 can be 00 and L3 can be 0. In this embodiment of the present application, L2 and L3 can also be excluded from the routing guidance. In this case, the routing guidance only includes two-layer routing information: L1 and L0.

[0209] After generating routing instructions and access requests, the routing component receives the access request sent by the access component and forwards it. Figure 9a to Figure 9d The manner in which the routing component in the embodiment of the present application sends an access request is described in detail. Figure 9a to Figure 9d In [1], the access component generates routing instructions including 4-layer routing information, namely L3, L2, L1, and L0, and generates an access request.

[0210] Figure 9a In the example, the routing component corresponding to L0 is the first routing component and receives the access request sent by the access component. Based on the multiple flags included in L0, the routing component corresponding to L0 determines that the target channel includes the external channel sent downward and that the routing information corresponding to the routing component below is L1. It updates the routing guidance to L3, L2, L1 and sends it downward.

[0211] The routing component corresponding to L1 is the middle routing component, which receives the access request sent by the routing component corresponding to L0. The routing component corresponding to L1 determines based on the multiple flags included in L1 that the target channel includes the external channel sent downward, and that the routing information corresponding to the routing component below is L2. It updates the routing guidance to 00, L3, L2 and sends it downward.

[0212] The routing component corresponding to L2 is the middle routing component, which receives the access request sent by the routing component corresponding to L1. The routing component corresponding to L2 determines based on the multiple flags included in L2 that the target channel includes the external channel sent downward, and that the routing information corresponding to the routing component below is L3. It updates the routing guidance to 0000, L3 and sends it downward.

[0213] Figure 9b In the example, the routing component corresponding to L0 is the first routing component. According to the multiple flags included in L0, it is determined that the target channel includes the external channel sent downward and the external channel sent upward, and there is 1 routing component above. The routing information corresponding to the upper routing component is L1, and the updated routing guidance is L3, L2, L1 and sent upward. The routing information corresponding to the lower routing component is L2, and the updated routing guidance is 00, L3, L2 and sent downward. The subsequent sending method is the same as Figure 9a Similar, I will not go into details here.

[0214] Figure 9c In the example, the routing component corresponding to L0 is the first routing component. According to the multiple flags included in L0, it is determined that the target channel includes the external channel sent downward and the external channel sent upward, and there are two routing components above. The routing information corresponding to the upper routing component is L1, and the updated routing guidance is L3, L2, L1 and sent upward. The routing information corresponding to the lower routing component is L3, and the updated routing guidance is 0000, L3 and sent downward. The subsequent sending method is the same as Figure 9a Similar, I will not go into details here.

[0215] Figure 9d In the example, the routing component corresponding to L0 is the first routing component. According to the multiple flags included in L0, it is determined that the target channel includes the external channel sent upward, and the routing information corresponding to the upper routing component is L1. The routing guidance is updated to L3, L2, L1 and sent upward. The subsequent sending method is the same as Figure 9a Similar, I will not go into details here.

[0216] Corresponding to the above access request processing method, the embodiment of the present application also provides a result return method, such as Figure 11 As shown, it is applied to a network device, the network device includes a third routing component, a first access component and a first TCAM component, the third routing component is connected to the first TCAM component through a third external channel, and the result returning method includes the following steps.

[0217] Step S111: The third routing component receives, through a third external channel, a first access result fed back by the first TCAM component, where the first access result is a result obtained by the first TCAM component performing a search upon receiving the first access request according to any of the aforementioned access request processing methods.

[0218] Step S112: The third routing component forwards the first access result according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component.

[0219] In the technical solution provided by the embodiment of the present application, the third routing component receives the first access result fed back by the first TCAM component, and returns the first access result to the access component that initiated the search according to the routing component coordinates, thereby realizing result return.

[0220] In the embodiment of the present application, the structure of the network device, and the related descriptions of the first routing component, the third routing component, etc. can be found in the above Figure 4 Part. The first TCAM component is the target TCAM component. After receiving the first access request, the first TCAM component searches for the table entry according to the access key value included in the first access request. The specific search process of the TCAM component is not described in detail here. Figures 4 to 10See the description of the access request processing method section as shown.

[0221] In the embodiments of the present application, only the first TCAM component is used as the destination TCAM component as an example, and the result return method provided in the embodiments of the present application is described in detail through the third routing component connected to the first TCAM component. For other destination TCAM components, the result return process is similar. The routing components mentioned in the embodiments of the present application are all routing components for returning access results.

[0222] like Figure 12 The routing component network of the result return part shown in the figure is taken as an example in which the network device includes four routing components for returning the result for the convenience of description. Figure 12 In the example, the routing component and access component used to process access requests have been omitted.

[0223] In the above step S111, the third routing component may receive, through a third external channel, a first access result fed back by the first TCAM component, obtained by looking up a table entry based on the first access request.

[0224] The first access result may carry the coordinates of the routing component connected to the first access component that initiated the access (i.e., routing component coordinates). The routing component coordinates may be represented by the location information of the length corresponding to the number of routing components. Figure 12 Taking the routing component network shown as an example, among the four routing components, the routing component coordinates are represented by 2-bit position information. From top to bottom, the coordinates of the routing components can be 00, 01, 10, and 11, respectively, and there is no limitation on this.

[0225] The third routing component may execute step S112 to determine whether the carried routing component coordinates are the same as the routing component coordinates of the third routing component.

[0226] If they are not the same, the third routing component may forward the first access result to the routing component connected in the direction through the fifth external channel according to the direction corresponding to the carried routing component coordinates.

[0227] For example, if the coordinates of the routing components are 00, 01, 10, and 11 from top to bottom, if the coordinate of the third routing component is 11 and the coordinate of the routing component it carries is 01, then the corresponding direction is upward, and the third routing component can forward the first access result to the routing component with coordinate 10; if the coordinate of the third routing component is 01 and the coordinate of the routing component it carries is 10, then the corresponding direction is downward, and the third routing component can forward the first access result to the routing component with coordinate 10.

[0228] If they are the same, the third routing component is the last routing component that forwards the first access result. The third routing component is directly connected to the first access component via the third internal channel. In this case, the first routing component corresponding to the third routing component is the first routing component to forward the first access request. The third routing component can forward the first access result to the first access component via the third internal channel based on the routing component coordinates carried in the first access result.

[0229] In this embodiment of the present application, another routing component can receive the first access result forwarded by the third routing component. In this case, the other routing component can serve as a new third routing component and execute step S112 to forward the first access result based on the routing component coordinates carried in the first access result. Through forwarding by multiple routing components in sequence, the first access result can be forwarded to the last routing component that forwarded the first access result, and then forwarded to the first access component.

[0230] The following is based on Figures 13 to 15 The access request processing method and result return method provided in the embodiment of the present application are described. Take, for example, a network device including four access components, a TCAM component, a routing component for sending a lookup request, and a routing component for returning a result.

[0231] like Figure 13 The network device shown in the figure. The routing component used to send access requests and the TCAM component are located on the same hardware card, while the routing component used to return access results and the access component are also located on the same hardware card. By deploying the routing component that sends access requests and returns access results on two hardware cards, vertical data traffic and cabling pressure are reduced.

[0232] The access component sends an access request to the routing component used to send access requests through a unidirectional link (external channel); the routing component used to send access requests sends access requests to the TCAM component through a unidirectional link (internal channel); the routing components used to send access requests are connected to each other through bidirectional links (external channels) to forward access requests.

[0233] The TCAM component returns the access result to the routing component used to return the access result through a unidirectional link (external channel); the routing component used to return the access result returns the access result to the access component through a unidirectional link (internal channel); the routing components used to return the access result are connected to each other through a bidirectional link (external channel) to realize the forwarding of the access result.

[0234] Figure 14 and Figure 15 For an access request that includes three slices and each slice is 20B long, if the access request needs to be sent to two TCAM components, Figure 14 In the example, the access component needs to send two complete access requests, and it takes 8 clock cycles (6 clock cycles for sending + 2 clock cycles for transmission delay) to complete the access request. Figure 15 The routing component replicates access requests through the target channel and cache queue, and forwards the access requests to multiple routing components and the destination TCAM component. It only takes 5 clock cycles (3 clock cycles for sending + 2 clock cycles for transmission delay) to complete the sending, which reduces the occupancy of the message channel, significantly reduces the pressure on the network, and improves the table lookup efficiency.

[0235] The technical solution provided in the embodiments of this application utilizes a pointer linked list and address management to implement a virtual FIFO for data replication. Special multi-layer routing guidance enables the most efficient routing with minimal data. Dynamic flow control is achieved by adding a stop flag to the packet header, avoiding deadlock in scenarios with high-volume table lookups and complex table lookup requests. The technical solution provided in the embodiments of this application, combined with special routing guidance, enables more efficient transmission of table lookup requests, improving network transmission efficiency, reducing network data volume, and lowering network-on-chip power consumption.

[0236] The present application also provides a network device, such as the above Figure 5 As shown, the network device includes a first routing component (such as routing component 11 to routing component 1N), a third routing component (such as routing component 21 to routing component 2N), a first access component (such as access component 41 to access component 4N), and a first TCAM component (such as TCAM component 31 to routing component 3N). The first routing component is connected to the first TCAM component via a first internal channel, and the third routing component is connected to the first TCAM component via a third external channel.

[0237] The first routing component is configured to receive a first access request from a first access component to access a TCAM component, the first access request including a first routing instruction, the first routing instruction indicating a target channel for sending the first access request, the target channel including the first internal channel and / or a first external channel, the first external channel being connected to a second routing component included in the network device, and the second routing component being connected to a second TCAM component included in the network device via a second internal channel; sending the first access request via the target channel; and performing the steps in any of the above-mentioned access request processing methods;

[0238] The third routing component is used to receive, through the third external channel, a first access result fed back by the first TCAM component, where the first access result is a result obtained by the first TCAM component after performing a search upon receiving the first access request; forward the first access result according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component; and execute the steps in any of the above-mentioned result return methods.

[0239] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0240] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0241] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the network device embodiment is generally similar to the method embodiment, so its description is relatively simple. For related portions, refer to the description of the method embodiment.

[0242] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.

Claims

1. A method for processing an access request, characterized in that: The method is applied to a network device, the network device comprising a first routing component, a first access component, and a first ternary content addressable memory (TCAM) component, wherein the first routing component is connected to the first TCAM component via a first internal channel; the method comprising: The first routing component receives a first access request from the first access component to access a TCAM component, the first access request including a first routing guide, the first routing guide indicating a target channel for sending the first access request, the target channel including the first internal channel and / or a first external channel, the first external channel being connected to a second routing component included in the network device, and the second routing component being connected to a second TCAM component included in the network device via a second internal channel; The first routing component sends the first access request through the target channel.

2. The method according to claim 1, characterized in that The first access request is stored in a cache queue of the first routing component, and the target channel includes at least one channel; The step of sending the first access request by the first routing component through the target channel includes: The first routing component reads the first access request from the cache queue and records the number of times the first access request is read; and sends the first access request through the at least one channel; The method further comprises: When the number of reads reaches the number of the at least one channel, the first routing component marks the storage address of the first access request in the cache queue as free.

3. The method according to claim 1, characterized in that The first routing guide includes at least one layer of routing information, each layer of routing information corresponds to a routing component on the forwarding path of the first access request, and each layer of routing information indicates a channel for sending the first access request.

4. The method according to claim 3, characterized in that The outermost routing information of the first routing guide indicates the target channel, and the first routing component is the first routing component that forwards the first access request; The step of sending the first access request by the first routing component through the target channel includes: If the target channel includes the first internal channel, the first routing component strips the first routing guide included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel. If the target channel includes the first external channel, the first routing component sets the routing information corresponding to the second routing component in the first routing guidance as the new outermost routing information to obtain a second access request; and sends the second access request to the second routing component through the first external channel.

5. The method according to claim 4, characterized in that The step of setting, by the first routing component, the routing information corresponding to the second routing component in the first routing guidance as new outermost routing information to obtain a second access request includes: The first routing component strips off the outermost routing information included in the first routing guide to obtain a second routing guide; right-shifts the routing information of each layer included in the second routing guide to obtain a third routing guide; and generates the second access request based on the access key value and the third routing guide.

6. The method according to claim 4 or 5, characterized in that The TCAM components included in the network device are arranged in series; the outermost routing information includes a local sending flag bit, an upward sending flag bit, a downward sending flag bit and a designated direction routing component flag bit; The local sending flag is used to indicate that the target channel includes a first internal channel; The upward sending flag is used to indicate that the target channel includes a first external channel for upward sending; The downward sending flag is used to indicate that the target channel includes a first external channel for downward sending; The designated direction routing component flag is used to indicate the number of routing components that forward the first access request in the designated direction; the designated direction routing component flag is valid when the target channel includes the first external channel for upward transmission and the first external channel for downward transmission.

7. The method according to claim 3, characterized in that The outermost routing information of the first routing guide indicates the target channel, and the first routing component is an intermediate routing component that forwards the first access request; The step of sending the first access request by the first routing component through the target channel includes: If the target channel includes the first internal channel, the first routing component strips the first routing guide included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel. If the target channel includes the first external channel, the first routing component right-shifts the first routing guide according to the outermost routing information to obtain a second access request; and sends the second access request to the second routing component through the first external channel.

8. The method according to claim 7, characterized in that The TCAM components included in the network device are arranged in series; the outermost routing information includes a local sending flag bit and a continue forwarding flag bit; The local sending flag is used to indicate that the target channel includes a first internal channel; The continue forwarding flag is used to indicate that the target channel includes a first external channel that is sent in the opposite direction of receiving the access request.

9. The method according to claim 3, characterized in that The outermost routing information of the first routing guidance indicates the target channel, and the first routing component is a tail routing component that forwards the first access request; The step of sending the first access request by the first routing component through the target channel includes: If the target channel includes the first internal channel, the first routing component strips off the first routing guidance included in the first access request to obtain an access key value; and sends the access key value to the first TCAM component through the first internal channel.

10. The method according to claim 9, characterized in that The TCAM components included in the network device are arranged in series; the outermost routing information includes a local transmission flag; The local sending flag is used to indicate that the target channel includes a first internal channel.

11. The method according to claim 1, wherein The first access request is stored in the cache queue of the first routing component, the first access request is the first fragment of the total access request, and the first access request includes length information of the total access request; The method further comprises: After receiving the first access request, the first routing component determines whether the free storage space in the cache queue is greater than or equal to the storage space indicated by the length information; If so, execute the step of sending the first access request through the target channel; if not, add a stop flag at the first storage address, and the stop flag indicates to stop sending the first access request; when the last fragment of the total access request is received, update the stop flag at the first storage address to a sending flag, and the sending flag indicates to send the first access request.

12. The method according to claim 1, characterized in that The first routing component is a first routing component that forwards the first access request, the first routing component is connected to the first access component via a second external channel, and the step of the first routing component receiving the first access request from the first access component to access the TCAM component includes: The first routing component receives, through the second external channel, a first access request for accessing the TCAM component generated by the first access component.

13. A result return method, characterized in that: The method is applied to a network device, the network device including a third routing component, a first access component, and a first ternary content addressable memory (TCAM) component, wherein the third routing component is connected to the first TCAM component via a third external channel; the method comprising: The third routing component receives, through the third external channel, a first access result fed back by the first TCAM component, where the first access result is a result obtained by the first TCAM component through a search performed after receiving the first access request according to the method according to any one of claims 1 to 12; The third routing component forwards the first access result according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component.

14. The method according to claim 13, characterized in that The third routing component is a tail routing component that forwards the first access result. The third routing component is connected to the first access component through a third internal channel. The third routing component forwards the first access result according to the routing component coordinates carried in the first access result, including: The third routing component forwards the first access result to the first access component through the third internal channel according to the routing component coordinates carried in the first access result.

15. A network device, characterized in that: The network device includes a first routing component, a third routing component, a first access component, and a first ternary content addressable memory (TCAM) component, wherein the first routing component is connected to the first TCAM component via a first internal channel, and the third routing component is connected to the first TCAM component via a third external channel. The first routing component is configured to receive a first access request from the first access component to access a TCAM component, the first access request including a first routing instruction, the first routing instruction indicating a target channel for sending the first access request, the target channel including the first internal channel and / or a first external channel, the first external channel being connected to a second routing component included in the network device, and the second routing component being connected to a second TCAM component included in the network device via a second internal channel; and sending the first access request via the target channel; The third routing component is configured to receive, through the third external channel, a first access result fed back by the first TCAM component, where the first access result is a result obtained by the first TCAM component after searching after receiving the first access request; The first access result is forwarded according to the routing component coordinates carried in the first access result, so as to return the first access result to the first access component.

Citation Information

Patent Citations

  • Method and system for searching data transmission in engine real-time system

    CN101777037A

  • Coherency directory cache based on memory structure

    CN111406253A

  • Amortizing dissipated power and current demand in a ternary content addressable memory

    CN111625695A

  • Parallel table look-up device, method and equipment and computer readable storage medium

    CN117914784A

  • System and method of coalescing writes to a hardware table in a non-disruptive fashion

    US20190005148A1