The present invention discloses a look-up table creation method and query method. The creation method includes: receiving a look-up table create message sent by a controller, where the look-up table create message includes an identifier of a look-up table and a look-up mode of the look-up table; creating a look-up table according to the look-up table create message and setting a look-up mode of the look-up table; receiving an entry add message sent by the controller, where the entry add message includes a to-be-added forwarding action and an index parameter of the forwarding action; and adding, according to the entry add message, an entry corresponding to the entry add message to the look-up table.
Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A look-up table creation method, comprising: receiving, at a forwarding device disposed in a communications network, a look-up table create message sent by a controller for creating a look-up table, wherein the look-up table create message comprises an identifier of the look-up table and a look-up mode of the look-up table, the look-up mode of the look-up table indicating how a look-up is performed in the look-up table; creating the look-up table at the forwarding device according to the look-up table create message, the look-up table having the look-up mode in the look-up table create message; receiving, at the forwarding device, an entry add message sent by the controller, wherein the entry add message comprises a to-be-added forwarding action and an index parameter of the forwarding action; and adding, by the forwarding device and according to the entry add message, an entry corresponding to the entry add message to the look-up table using an idle entry in the look-up table, the idle entry being determined according to the index parameter and the look-up mode, and the entry comprising the to-be-added forwarding action and the index parameter.
A method for creating lookup tables in a network forwarding device. A controller sends a "create lookup table" message to the forwarding device, including a lookup table identifier and the lookup mode (how to search the table). The forwarding device creates the table using this information. The controller then sends an "add entry" message, containing the forwarding action to take and an index parameter used for looking up the action. The forwarding device adds this entry to the lookup table using an available (idle) entry. The location of the idle entry is determined by the index parameter and the lookup mode. Each entry contains both the forwarding action and the index parameter.
2. The method according to claim 1 , wherein the look-up mode comprises one of a linear look-up mode, a hash look-up mode, a longest match look-up mode, and a mask look-up mode.
The lookup table creation method described previously specifies that the lookup mode can be one of the following: a linear lookup (sequential search), a hash lookup (using a hash function), a longest match lookup (finding the most specific matching entry), or a mask lookup (using a bitmask to match entries).
3. The method according to claim 2 , wherein the look-up mode of the look-up table is the linear look-up mode, the index parameter comprises a keyword, and the adding, by the forwarding device and according to the entry add message, the entry corresponding to the entry add message to the look-up table comprises: obtaining, by the forwarding device, an idle entry from the look-up table by using the keyword as an index; and writing the forwarding action by the forwarding device into the idle entry.
For the lookup table creation method with a linear lookup mode, the index parameter is a keyword. Adding an entry to the table involves the forwarding device finding an unused entry using the keyword as an index. The device then writes the forwarding action into this empty entry. This means the keyword directly corresponds to a location in the table.
4. The method according to claim 2 , wherein the look-up mode of the look-up table is the hash look-up mode, the index parameter comprises a keyword, and the adding, by the forwarding device and according to the entry add message, the entry corresponding to the entry add message to the look-up table comprises: obtaining, by the forwarding device, a bucket index by performing a hash operation on the keyword, and obtaining a hash bucket from the look-up table according to the bucket index; and writing, by the forwarding device, the forwarding action and the keyword into an idle entry in the hash bucket.
For the lookup table creation method using a hash lookup mode, the index parameter is a keyword. Adding an entry involves the forwarding device calculating a bucket index by applying a hash function to the keyword. It then finds the corresponding hash bucket within the lookup table using this bucket index. Finally, it writes both the forwarding action and the keyword into an available entry inside that specific hash bucket.
5. The method according to claim 2 , wherein the look-up mode of the look-up table is the longest match look-up mode, the index parameter comprises a keyword and a mask length, and the adding, by the forwarding device and according to the entry add message, the entry corresponding to the entry add message to the look-up table comprises: obtaining, by the forwarding device, a longest match index by performing a first operation on the keyword and the mask length; finding an idle entry from the look-up table by the forwarding device and according to the longest match index; and writing, by the forwarding device, the forwarding action, the keyword, and the mask length into the idle entry.
For the lookup table creation method using a longest match lookup mode, the index parameter contains both a keyword and a mask length. Adding an entry involves the forwarding device performing an operation on the keyword and mask length to generate a longest match index. Then, the forwarding device locates an available entry in the lookup table based on this index. The forwarding device then writes the forwarding action, the keyword, and the mask length into that found entry.
6. The method according to claim 2 , wherein the look-up mode of the look-up table is the mask look-up mode, the index parameter comprises a keyword and a mask, and the adding, according to the entry add message, the forwarding action to the look-up table comprises: obtaining an idle entry from a ternary content addressable memory according to the keyword and the mask; and writing the forwarding action, the keyword, and the mask into the idle entry.
For the lookup table creation method using a mask lookup mode, the index parameter consists of a keyword and a mask. Adding the forwarding action to the lookup table entails obtaining an available entry from a ternary content addressable memory (TCAM) based on both the keyword and the mask. The forwarding action, the keyword, and the mask are then written into this available entry in the TCAM.
7. The method according to claim 1 , further comprising: extracting a keyword of a packet by the forwarding device and in response to the packet jumping to the look-up table; looking up, by the forwarding device and using a look-up mode corresponding to the look-up table, an entry corresponding to the keyword; and executing, by the forwarding device, a forwarding action in the entry corresponding to the keyword.
The lookup table creation method also includes packet forwarding. When a packet is directed to a particular lookup table, the forwarding device extracts a keyword from the packet. It then uses the lookup mode associated with that table to find the corresponding entry. Finally, the device executes the forwarding action specified within that found entry to process the packet.
8. A forwarding device, comprising: a receiver, configured to receive a look-up table create message sent by a controller over a communications network for creating a look-up table, wherein the look-up table create message comprises an identifier of the look-up table and a look-up mode of the look-up table, the look-up mode of the look-up table indicating how a look-up is performed in the look-up table, wherein the receiver further is configured to receive an entry add message sent by the controller for adding an entry in the look-up table, and wherein the entry add message comprises a to-be-added forwarding action and an index parameter of the forwarding action; a processor connected to the receiver; and a non-transitory computer readable medium connected to the processor and having stored thereon instructions that, when executed, cause the processor to: create the look-up table according to the look-up table create message, the look-up table having the look-up mode in the look-up table create message; and add, according to the entry add message, the entry corresponding to the entry add message to the look-up table using an idle entry that is determined according to the index parameter and the look-up mode of the look-up table, the entry comprising the to-be-added forwarding action and the index parameter.
A forwarding device in a communications network consists of a receiver, a processor, and a non-transitory computer readable medium. The receiver gets "create lookup table" messages from a controller (including a table identifier and lookup mode). The receiver also gets "add entry" messages from the controller (including the forwarding action and an index parameter). The processor, guided by instructions on the memory, creates the lookup table with the specified lookup mode. It also adds entries, using an available entry that is found based on the index parameter and the lookup mode. Each entry comprises the forwarding action and index parameter.
9. The forwarding device according to claim 8 , wherein the look-up mode in the look-up table create message received by the receiver comprises one of a linear look-up mode, a hash look-up mode, a longest match look-up mode, and a mask look-up mode.
The forwarding device from the previous description specifies that the lookup mode included in the "create lookup table" message can be one of the following: linear lookup, hash lookup, longest match lookup, or mask lookup.
10. The forwarding device according to claim 9 , wherein the look-up mode of the look-up table is the linear look-up mode, wherein the index parameter comprises a keyword; and wherein the instructions causing the processor to add, according to the entry add message, the entry corresponding to the entry add message to the look-up table comprise instructions that, when executed, cause the processor to: obtain an idle entry from the look-up table by using the keyword as an index; and write the forwarding action into the idle entry.
In the forwarding device with a linear lookup mode, the index parameter is a keyword. The processor adds entries by using the keyword to directly index into the table, finding an unused entry. Then, it writes the forwarding action into this unused entry.
11. The forwarding device according to claim 9 , wherein the look-up mode of the look-up table is the hash look-up mode, wherein the index parameter comprises a keyword; and wherein the instructions causing the processor to add, according to the entry add message, the entry corresponding to the entry add message to the look-up table comprise instructions that, when executed, cause the processor to: obtain a bucket index by performing a hash operation on the keyword, and obtain a hash bucket from the look-up table according to the bucket index; and write the forwarding action and the keyword into an idle entry in the hash bucket.
In the forwarding device with a hash lookup mode, the index parameter is a keyword. To add an entry, the processor calculates a bucket index from the keyword using a hash function. It then uses that index to find a specific hash bucket in the table and writes both the forwarding action and the keyword into an empty entry within that bucket.
12. The forwarding device according to claim 9 , wherein the look-up mode of the look-up table is the longest match look-up mode, wherein the index parameter comprises a keyword and a mask length; and wherein the instructions causing the processor to add, according to the entry add message, the entry corresponding to the entry add message to the look-up table comprise instructions that, when executed, cause the processor to: obtain a longest match index by performing a first operation on the keyword and the mask length; find an idle entry from the look-up table according to the longest match index; and write the forwarding action, the keyword, and the mask length into the idle entry.
In the forwarding device using longest match lookup mode, the index parameter includes both a keyword and a mask length. Adding an entry involves the processor performing an operation on both the keyword and the mask length to determine the longest match index, finds an available entry, and writes the forwarding action, the keyword, and the mask length into the found entry.
13. The forwarding device according to claim 9 , wherein the look-up mode of the look-up table is the mask look-up mode, wherein the index parameter comprises a keyword and a mask; and wherein the instructions causing the processor to add, according to the entry add message, the entry corresponding to the entry add message to the look-up table comprise instructions that, when executed, cause the processor to: obtain an idle entry from a ternary content addressable memory according to the keyword and the mask; and write the forwarding action, the keyword, and the mask into the idle entry.
In the forwarding device using a mask lookup mode, the index parameter is a keyword and a mask. To add the forwarding action, the processor locates an unused entry within a ternary content addressable memory (TCAM) based on the keyword and mask, and it writes the forwarding action, keyword and the mask to that TCAM entry.
14. The forwarding device according to claim 8 , wherein the non-transitory computer readable medium further has stored thereon instructions that, when executed, cause the processor to: extract a keyword of a packet in response to the packet jumping to the look-up table; look up, by using the look-up mode corresponding to the look-up table, an entry corresponding to the keyword; and execute a forwarding action in the entry corresponding to the keyword.
The forwarding device, in addition to creating and populating lookup tables, also performs packet processing. When a packet is sent to the lookup table, the processor extracts a keyword from the packet, uses the table's lookup mode to find a corresponding entry, and executes the forwarding action specified in that entry.
15. A controller, comprising: a transmitter configured to send a look-up table create message to a forwarding device disposed in a communications network, so that the forwarding device creates a look-up table according to the look-up table create message, wherein the look-up table create message comprises an identifier of the look-up table and a look-up mode of the look-up table, the look-up mode of the look-up table indicating how a look-up is performed in the look-up table; and wherein the transmitter is further configured to send an entry add message to the forwarding device, so that the forwarding device adds an entry to the look-up table according to the entry add message, the entry add message comprising a to-be-added forwarding action and an index parameter of the forwarding action, wherein the entry comprises the to-be-added forwarding action and the index parameter, and the entry is added using an idle entry determined according to the index parameter and the look-up mode.
A controller sends commands to a forwarding device to manage lookup tables. It sends a "create lookup table" message that includes a table identifier and the lookup mode. It also sends "add entry" messages, containing a forwarding action and index parameter, to populate the table. The forwarding device uses the index parameter and lookup mode to determine where to add the new entry, which contains the forwarding action and the index parameter.
16. A forwarding device, comprising: a processor, configured to execute a software program; a wireless communication module connected to the processor and configured to receive a message sent by a controller over a communications network and send the message sent by the controller to the processor for processing; and a non-transitory computer readable memory connected to the processor and configured to store a software program and data, wherein the stored software program, when executed, causes the processor to perform: receiving look-up table create messages sent by the controller for creating look-up tables, wherein each of the look-up table create messages comprises an identifier of a corresponding look-up table and a look-up mode of the corresponding look-up table, and the look-up mode of the corresponding look-up table indicates how a look-up is performed in the corresponding look-up table, and wherein at least two of the look-up tables have different look-up modes, and at least one of the look-up tables has a look-up mode that performs a look-up without using a mask matching technique; receiving an entry add message sent by the controller for adding an entry in a first look-up table of the look-up tables, wherein the entry add message comprises a to-be-added forwarding action and an index parameter of the forwarding action for the entry; creating the look-up tables according to the look-up table create messages, each of the look-up tables having a look-up mode indicated in a corresponding look-up table create message; and adding, according to the entry add message, the entry corresponding to the entry add message to the first look-up table, the entry being added using an idle entry in the first look-up table that is determined according to the index parameter of the forwarding action and a look-up mode of the first look-up table, and the entry comprising the to-be-added forwarding action and the index parameter.
A forwarding device has a processor, wireless communication, and memory. The processor runs a program to create and manage lookup tables based on messages from a controller. Each "create lookup table" message includes an identifier and a lookup mode, and the device supports multiple tables with different lookup modes, including at least one that doesn't use mask matching. "Add entry" messages specify the forwarding action and index for a specific table. The device creates the tables as instructed and adds entries to them, using the index and lookup mode to find an available location for each new entry.
17. The forwarding device according to claim 16 , wherein a look-up mode in a look-up table create message received by the processor comprises one of a linear look-up mode, a hash look-up mode, a longest match look-up mode, and a mask look-up mode.
The forwarding device mentioned above supports various lookup modes. The lookup mode in the "create lookup table" message can be one of the following: linear lookup, hash lookup, longest match lookup, or mask lookup.
18. The forwarding device according to claim 16 , wherein the stored software program, when executed, further causes the processor to: extract a keyword of a packet in response to the packet jumping to the first look-up table; look up, by using the look-up mode corresponding to the first look-up table, an entry corresponding to the keyword; and execute a forwarding action in the entry.
The forwarding device, besides managing lookup tables, also forwards packets. When a packet needs to be processed using a particular table, the device extracts a keyword from the packet, uses the table's lookup mode to find a matching entry based on the keyword, and then executes the forwarding action found in that entry.
19. A controller, comprising: a processor, configured to execute a software program; a wireless communication module connected to the processor and configured to send a message to a forwarding device, and send a message of the processor to the forwarding device; and a non-transitory computer readable memory connected to the processor and configured to store a software program and data, wherein the stored software program, when executed, causes the processor to perform: sending look-up table create messages to the forwarding device, so that the forwarding device creates look-up tables according to the look-up table create messages, wherein each of the look-up table create messages indicates an identifier of a corresponding look-up table and a look-up mode of the corresponding look-up table, and the look-up mode of the corresponding look-up table indicates how a look-up is performed in the corresponding look-up table, and wherein at least two of the look-up tables have different look-up modes, and at least one of the look-up tables has a look-up mode that performs a look-up without using a mask matching technique; and sending an entry add message to the forwarding device, so that the forwarding device adds an entry to a first look-up table in the look-up tables, wherein the entry add message comprises a to-be-added forwarding action and an index parameter of the forwarding action, the entry being added using an idle entry in the first look-up table that is determined according to the index parameter of the forwarding action and a look-up mode of the first look-up table, and the entry comprising the to-be-added forwarding action and the index parameter.
A controller manages lookup tables on a forwarding device by sending messages over wireless communication. The controller sends "create lookup table" messages, each with an identifier and lookup mode, creating multiple tables potentially with different lookup modes, including at least one that doesn't use mask matching. To populate a table, the controller sends "add entry" messages with the forwarding action and index parameter. The forwarding device uses this info to add a new entry to the table, using the index and lookup mode to determine the entry's location.
20. A forwarding system, comprising: a controller; and a forwarding device disposed in a communications network, wherein the forwarding device is signally connected to the controller; wherein the controller is configured to send a look-up table create message to the forwarding device for creating a look-up table, wherein the look-up table create message comprises an identifier of the look-up table and a look-up mode of the look-up table, the look-up mode of the look-up table indicating how a look-up is performed in the look-up table; wherein the controller is further configured to send an entry add message to the forwarding device for adding an entry in the look-up table, wherein the entry add message comprises a to-be-added forwarding action and an index parameter of the forwarding action; wherein the forwarding device is configured to receive the look-up table create message; wherein the forwarding device is further configured to create the look-up table according to the look-up table create message and set the look-up table by using the look-up mode; and wherein the forwarding device is further configured to determine an idle entry in the look-up table according to the index parameter and the look-up mode, and write the forwarding action and the index parameter into the idle entry to add the entry in the look-up table.
A forwarding system has a controller and a forwarding device connected in a network. The controller sends "create lookup table" messages to the forwarding device, including a table identifier and a lookup mode. The controller also sends "add entry" messages, which contain a forwarding action and an index parameter. The forwarding device creates the lookup table using the provided identifier and lookup mode, then uses the index parameter and lookup mode to find an available entry in the table. It then writes the forwarding action and the index parameter into the available entry.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
June 24, 2015
July 11, 2017
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.