text:
在种用于在网络设备中执行精确匹配查找的方法中，在该网络设备接收网络分组。 In the method for performing the exact-match lookup species in a network device, a network device receives the packets in the network. 至少基于所接收到的网络分组的报头中所包括的数据确定用于该网络分组的查找关键字。 Data header based at least on the received network packet included in the search key for determining the network packet. 至少基于该查找关键字的大小从多个可能散列函数中选择个散列函数，并且使用所选择的散列函数对该查找关键字执行散列操作以计算散列查找关键字分段。 The search key based on at least the size of the hash function selected from a plurality of possible hash functions, and using the selected lookup hashing the hash function to calculate a hash lookup key operation key segment. 使用该散列查找关键字分段来查询数据库以提取出精确地对应于该查找关键字的数值。 Using the hash key lookup segment to query the database to extract corresponds exactly to the search key value.
 本申请要求于2013年4月11日提交的题为“Exact Match with Variable Key Sizes”的美国临时申请No .61/811011以及于2014年1月2日提交的题为“Exact Match with Variable Key Sizes”的美国临时申请No.61/923093的权益，其公开通过引用结合于此。  This application claims entitled to April 11, 2013 filed "Exact Match with Variable Key Sizes" US Provisional Application No .61 / 811011 entitled to January 2, 2014 filed "Exact Match with Variable Key Sizes "US provisional application No.61 / 923093, the disclosure of which is incorporated herein by reference.
 本申请涉及于2012年8月31日提交的题为“Method and Apparatus For TCAM Based Lookup”的美国专利申请No. 13/966962，于2013年1月9日提交的题为“Exact Match Lookup In Network Switch Device”的美国专利申请No. 13/737608,以及于2013年8月28 日提交的题为“Exact Match Hash Lookup Databases in Network Switch Devices”的美国专利申请No. 14/012834,上述申请的公开通过引用结合于此。  The present application relates entitled to August 31, 2012 filed Exact Match "Method and Apparatus For TCAM Based Lookup" US Patent Application No. 13/966962, entitled "on January 9, 2013 filed US Patent Lookup in Network Switch Device ", US Patent application No. 13/737608, entitled to August 28, 2013 filed" Exact Match Hash Lookup Databases in Network Switch Devices "application No. 14/012834, above disclosure of which is incorporated herein by reference.
 本公开总体上涉及网络设备，更特别地涉及网络设备中的精确匹配查找。 Relates to devices on a network  The present disclosure generally, and more particularly relates to a network device in an exact match lookup.
 诸如网络交换机、桥接器、路由器、边缘设备等的网络设备经常采用存储与该网络设备所处理的分组相关联的各种类型的信息的查找表。  Various types of lookup table associated with the packet information such as a network switch, bridge, router, network edge devices and the like often employ a storage device with the network device handles. 该网络设备在处理分组时经常在查找表中执行搜索/查找以作出各种处理决策或确定(例如，对分组归类，要将分组转发至哪个端口，等等）。 The network device when processing packets often in a lookup table to perform a search / find to make decisions or to determine the various processing (for example, packet classification, to forward the packet to which port, etc.). 通常，针对分组的查找根据与该分组相关联的关键字来执行。 In general, look for the group to perform a keyword related to the packet-linked. 该关键字通常包括来自该分组的报头的信息，而且有时包括可能并未包括在报头中的其它信息，诸如进入接口。 The keyword usually includes information from the packet header, and may sometimes include other information not included in the header, such as incoming interface. 该关键字例如被用来搜索表格，并且有关该分组的信息（例如，该分组的转发信息或者指示一些其它动作的信息)从被该关键字所标识的表格条目所获取。 The keyword, for example, be used to search the table, and the packet information (e.g., the packet forwarding information indicating some of the information or other actions) acquired from the table entries are identified by the keyword.
 —些查找表使用内容可寻址存储器(CAM)(例如，三元CAM (TCAM))，其一般被用于“屏蔽”搜索/查找。  - look-up table using a content addressable memory (the CAM) (e.g., ternary CAM (TCAM)), which is generally used to "mask" the search / lookup. 然而，近年来，网络设备越来越多地开始执行“精确匹配”查找。 However, in recent years, more and more network equipment to begin the implementation of "exact match" search. 虽然基于CAM的表格可以被用于精确匹配查找，但是与基于随机访问存储器(ram)的表格一诸如使用静态RAM (SRAM)所实施的表格一相比，它们通常对于这样的查找不太有效（例如，在面积和功耗方面）。 While based CAM tables can be used to find an exact match, but the table-based random access memory (RAM) is used as a form of static RAM (SRAM) as compared to an embodiment, they are generally less effective for this lookup ( For example, the area and power consumption). 精确匹配查找目前被用来执行任意多种不同的分组处理操作，诸如分组归类、 作出转发或路由决策、服务质量归类、策略控制列表应用、隧道终止操作等。 Finding an exact match is currently used to perform any of a variety of different packet-processing operations, such as packet classification, forwarding, or to make routing decisions, quality of service classification, policy control list of applications, tunnel termination operation. 此外，由于各种各样的可能处理操作，精确匹配查找可能要去使用具有不同关键字大小的多种不同类型的关键字。 Further, since the wide variety of possible processing operations, using the exact-match lookup may go to many different types of keywords having different key sizes. 例如，典型地，基于介质访问控制(MAC)地址和虚拟局域网(VLAN)标识符的桥接查找使用60位的关键字，而针对I Pv4地址的查找使用32位的关键字，针对IPv6地址的路由的查找则使用128位的关键字，等等。 For example, typically, based on media access control (MAC) address and a virtual bridged LAN (VLAN) identifier used to find the key 60, the key 32 used for the address lookup I Pv4, for routing IPv6 address Find 128-bit key is used, and so on. 为了应对各种关键字大小，一些常规的网络设备将所有较短关键字补充为最大的所支持关键字大小的位长度，或者提供存储在不同存储器中的单独查找表，其中每个表格仅由单一固定大小的关键字进行索引。 In response to various key sizes, some conventional network devices will be shorter all the keywords added to the maximum size supported by the keyword bit length, stored in different memory or provided in a separate lookup tables, wherein each table only by single fixed-size keyword index. 然而，这两种技术通常在存储器资源的利用方面都是低效的，这最终会增大电路面积和/或功耗。 However, both techniques are generally inefficient in the use of memory resources, which ultimately increase the circuit area and / or power consumption. 例如，就前者的技术而言，即使相对短的关键字也占据与长关键字相同数量的查找表存储器。 For example, the former technology, even if a relatively short keywords are also occupied by the same number of key length lookup table memory. 此外，由于每个表格/关键字大小将需要的条目数量和/或关键字大小的分布通常并非是事先已知的，所以使用后者的技术的系统设计人员通常无法确定将有效利用查找存储器资源的每查找表/关键字大小的条目数量。 Further, since the distribution of each form / size would be required number of key entries, and / or the size of the keyword is not usually known in advance, so the use of the latter techniques system designers often can not determine the effective use of resources lookup memory looking at each table / keyword size of the number of entries.
在一个实施例中，一种用于在网络设备中执行精确匹配查找的方法，包括在该网络设备接收网络分组;至少基于所接收到的网络分组的报头中所包括的数据确定该网络分组的查找关键字;至少基于该查找关键字的大小从多个可能散列函数中选择一个散列函数;使用所选择的散列函数对该查找关键字执行散列操作以计算散列查找关键字分段;并且使用该散列查找关键字分段来查询数据库以提取出精确地对应于该查找关键字的数值。  In one embodiment, a method for performing the exact-match lookup in a network device, the network device including receiving network packets; based at least on the header of the received network packet data included in determining the search key network packet; based at least on the size of the search key the hash function may be selected from a plurality of hash functions; using the selected lookup hashing the hash function to calculate a hash operation to find keywords keyword segment; and using the hash lookup segment key to query the database to extract corresponds exactly to the search key value. 在另一个实施例中，一种网络设备包括多个接口、存储数据库的查找存储器、以及耦合至该多个接口的分组处理器。  In one embodiment, a network device comprises a plurality of interfaces, the memory storing a database lookup, and a packet processor coupled to the plurality of interfaces in the other embodiments. 该分组处理器被配置为对经由该多个接口中的至少一些所接收的网络分组进行处理，并且包括关键字生成单元，关键字生成单元被配置为至少基于所接收到的网络分组的报头中所包括的数据确定经由该多个接口之一所接收到的网络分组的查找关键字。 The packet processor is configured to at least some of the network packets received via the plurality of interfaces for processing, and key generating unit comprises a header, key generating unit is configured to at least based on the received network packet determining data included in the search key received via one of the plurality of interfaces of the network packet. 该分组处理器还包括关键字搜索单元，其被配置为至少基于该查找关键字的大小从多个可能散列函数中选择一个散列函数，使用所选择的散列函数对该查找关键字执行散列操作以计算散列查找关键字分段，并且使用该散列查找关键字分段来查询数据库以提取出精确地对应于该查找关键字的数值。 The packet processor further includes a keyword search unit configured to based at least on the size of the search key is selected from a plurality of possible hash function hash function, using the selected search key the hash function performed hashing operations to calculate a hash lookup key segments, and the segment using the hash lookup key to query the database to extract corresponds exactly to the search key value.
在另一个实施例中，一种用于在网络设备中执行精确匹配查找的方法，包括在该网络设备接收网络分组;至少基于所接收到的网络分组的报头中所包括的数据确定该网络分组的查找关键字;使用两个或更多散列函数对该查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段;并且使用该两个或更多散列关键字分段来查询在两个或更多存储器组之间进行分布的数据库以提取出精确地对应于该查找关键字的数值。  In another embodiment, a method for performing the exact-match lookup in a network device, the network device including receiving network packets; data header based on the received network packet included in determining at least the search key network packet; hash functions using two or more of the two or more search key hash operation performed to calculate two or more hash lookup key segment; and using the two or more hash key to query the database segments distributed between two or more memory banks to extract corresponds exactly to the search key value. 查询该数据库包括使用该两个或更多散列查找关键字分段来访问该两个或更多存储器组以标识两个或更多匹配分段;获取与该两个或更多匹配分段中的至少一个相关联的至少一个指针;并且使用该至少一个指针将匹配分段中的至少两个进行组合以标识该数据库中的匹配条目，精确地对应于该查找关键字的数值是与该匹配条目相关联的数值。 The use of the database query includes two or more segment hash lookup key to access the two or more memory banks to identify two or more matching segments; obtaining two or more of the matching segment at least one of the at least one associated pointer; and the value is used to identify the at least two combined matching entry in the database, corresponds exactly to the search key the matching segment of the at least one pointer is matching value associated with entries.
在另一个实施例中，一种网络设备包括多个接口、存储在两个或更多存储器组之间进行分布的数据库的查找存储器，以及耦合至该多个接口的分组处理器。  In another embodiment, a network device comprises a plurality of interfaces, the memory storing a database lookup distributed between two or more memory banks, and a packet processor coupled to the plurality of interfaces. 该分组处理器被配置为对经由该多个接口中的至少一些所接收的网络分组进行处理。 The packet processor is configured to at least some of the plurality of received network via the packet interface for processing. 该分组处理器包括关键字生成单元和关键字搜索单元，关键字生成单元被配置为至少基于所接收到的网络分组的报头中所包括的数据确定经由该多个接口之一所接收到的网络分组的查找关键字。 The processor includes a packet generating unit keywords and keyword search unit key generation unit is configured based on the header data of the received network packet included in determining at least one of the plurality of received via the network interface Find keywords grouped. 该关键字搜索单元被配置为使用两个或更多散列函数对该查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段，并且使用该两个或更多散列关键字分段来查询该数据库以提取出精确地对应于该查找关键字的数值。 The keyword searching unit is configured to use a hash function to the two or more search keys perform two or more hash operation to compute a hash lookup key two or more segments, and using the two more segments or hash key to query the database to extract corresponds exactly to the search key value. 该关键字搜索单元被配置为至少通过使用该两个或更多散列查找关键字分段来访问该两个或更多存储器组以标识两个或更多匹配分段，获取与该两个或更多匹配分段中的至少一个相关联的至少一个指针，并且使用该至少一个指针将匹配分段中的至少两个进行组合以标识该数据库中的匹配条目来查询该数据库，精确地对应于该查找关键字的数值是与该匹配条目相关联的数值。 The keyword search unit configured to at least two or more of the hash lookup key segment to access the two or more memory banks to identify by using two or more matching sections, acquiring the two or more segments matching the at least one of the at least one associated pointer, and using the at least one pointer to match at least two segments are combined to identify a matching entry in the database to query the database, corresponds precisely Find keyword value to the value of the matching entry is associated.
 在另一个实施例中，一种用于在网络设备中填充精确匹配查找表的方法，包括确定要存储在该网络设备的数据库中的查找关键字，该数据库在两个或更多存储器组之间进行分布。  In another embodiment, a method for filling in a network device exact-match lookup table, comprising determining the search key to be stored in a database in the network device, the database in two or more distributed between the memory groups. 该方法还包括至少基于该查找关键字的大小（i)从该两个或更多存储器组之间选择第一存储器组，并且（ii)从多个可能散列函数中选择一个散列函数，使用所选择的散列函数对该查找关键字执行散列操作以计算第一散列查找关键字分段，将该第一散列查找关键字分段存储在所选择的第一存储器组中，并且将对应于该查找关键字的一个或多个散列查找关键字分段存储在该两个或更多存储器组中的一个或多个后续存储器组中。 The method further includes based at least on the size of the key to find (i) selecting from a first memory bank between the two or more memory banks, and (ii) selecting a hash function from a plurality of possible hash function, using a hash function to the selected search key operations performed to calculate a first hash key hash lookup segment, the first memory a first set of keywords hash lookup segment in the selected memory, and the search key corresponding to the hash of a segment stored in the two or more memory banks or memory banks in a subsequent plurality of the one or more search key.
 在另一个实施例中，一种网络设备包括多个接口、存储在两个或更多存储器组之间进行分布的数据库的查找存储器、以及耦合至该多个接口的分组处理器。  In another embodiment, a network device comprises a plurality of interfaces, the memory storing a database lookup distributed between two or more memory banks, and a packet processor coupled to the plurality of interfaces. 该分组处理器被配置为对经由该多个接口中的至少一些所接收的网络分组进行处理。 The packet processor is configured to at least some of the plurality of received network via the packet interface for processing. 该分组处理器包括关键字生成单元以及关键字插入单元，关键字生成单元被配置为至少基于所接收到的网络分组的报头中所包括的数据确定经由该多个接口之一所接收到的网络分组的查找关键字。 The packet processor includes a key generation unit, and the keyword insertion unit key generation unit is configured based on the header data of the received network packet included in determining at least one of the plurality of received via the network interface Find keywords grouped. 该关键字插入单元被配置为至少基于该查找关键字的大小（i)从该两个或更多存储器组之间选择第一存储器组，并且（ii)从多个可能散列函数中选择一个散列函数，使用所选择的散列函数对该查找关键字执行散列操作以计算第一散列查找关键字分段，将该第一散列查找关键字分段存储在所选择的第一存储器组中，并且将对应于该查找关键字的一个或多个散列查找关键字分段存储在该两个或更多存储器组中的一个或多个后续存储器组中。 The key insertion unit is configured to at least based on the size of the search key is (i) selecting from a first memory bank between the two or more memory banks, and (ii) selecting a hash function from a plurality of possible hash function, the hash function using the selected search key performs the operation to calculate a first hash key hash lookup segment, the first segment hash lookup key is stored in a first selected memory banks, and the search key corresponding to one or more of the hash lookup key segment stored in a memory of the two or more groups of one or more subsequent memory banks.
在另一个实施例中，一种用于在网络设备中填充精确匹配查找表的方法，包括确定要存储在该网络设备的数据库中的查找关键字，该数据库在两个或更多存储器组之间进行分布。  In another embodiment, a method for filling in a network device exact-match lookup table, comprising determining the search key to be stored in a database in the network device, the database in two or more distributed between the memory groups. 该方法还包括使用两个或更多散列函数对该查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段，至少包括使用第一散列函数计算第一散列查找关键字分段，并且使用第二散列函数计算第二散列查找关键字分段。 The method further comprises using two or more search key the hash function performed two or more hash operation to compute a hash lookup key two or more segments, comprising at least a first hash function using calculating a first hash key lookup segment, using the second hash function to calculate a second hash lookup key segment. 该方法还包括将该第一散列查找关键字分段存储在该两个或更多存储器组中的第一存储器组中，将该第二散列查找关键字分段存储在该两个或更多存储器组中的第二存储器组中，并且将指针与该第一散列查找关键字分段相关联，该指针指示该第二散列查找关键字分段在该第二存储器组中的位置。 The method further includes the hash lookup in a first of the two or more memory banks in the memory a first set of keywords stored in the segment, the second segment hash lookup key is stored in the two or more memory bank a second memory bank, and to find the pointer to the first segment associated with the hash key, the second pointer indicates that the key hash lookup segment in the second memory bank position.
 在另一个实施例中，一种网络设备包括多个接口，以及存储在两个或更多存储器组之间进行分布的数据库的查找存储器。  In one embodiment, a network device comprises a plurality of interfaces, and the storage memory to find a database distributed between two or more memory banks in another embodiment. 该两个或更多存储器组至少包括第一存储器组和第二存储器组。 The two or more memory groups comprises at least a first memory group and a second memory bank. 该网络设备还包括耦合至该多个接口的分组处理器。 The network device further includes a packet processor coupled to the plurality of interfaces. 该分组处理器被配置为对经由该多个接口中的至少一些所接收的网络分组进行处理。 The packet processor is configured to at least some of the plurality of received network via the packet interface for processing. 该分组处理器包括关键字生成单元和关键字插入单元，该关键字生成单元被配置为至少基于所接收到的网络分组的报头中所包括的数据确定经由该多个接口之一所接收到的网络分组的查找关键字。 The processor includes a packet generating unit keywords and keyword insertion unit, the key generating unit configured to receive, via one of the plurality of interfaces based on the data header of the received network packet included in the determined at least to network packet search key. 该关键字插入单元被配置为至少通过使用第一散列函数计算第一散列查找关键字分段，并且使用第二散列函数计算第二散列查找关键字分段而使用两个或更多散列函数对该查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段。 The key insertion unit is configured to at least a first hash function calculated by using a first hash key lookup segment, using the second hash function to calculate a second hash lookup key segment and two or more multi hash function to the two or more search key to perform two or more hash lookup key segment or hash operation to compute. 该关键字插入单元还被配置为将该第一散列查找关键字分段存储在第一存储器组中，将该第二散列查找关键字分段存储在第二存储器组中，并且将指针与该第一散列查找关键字分段相关联，该指针指示该第二散列查找关键字分段在该第二存储器组中的位置。 The keyword insertion unit is further configured to hash the first search key segment stored in the first memory bank, the second segment hash lookup key is stored in the second memory bank, and the pointer lookup key segment associated with the first hash, the hash pointer indicates the second search key segment in the second memory bank location.
 图1是根据一个实施例的利用多散列查找表执行各种查找操作的示例网络设备的框图。  FIG. 1 is an embodiment using a lookup table lookup to perform various operations block diagram of an example network device multiple hashes.
 图2是根据一个实施例的被用来依据第一精确匹配查找技术存储图1的多散列查找表的示例存储器组的框图。  FIG. 2 is an embodiment of a block diagram is used to retrieve multiple hash lookup table stored in the example memory bank art FIG. 1 according to the first match exactly.
 图3是根据一个实施例的被用来依据第二精确匹配查找技术存储图1的多散列查找表的示例存储器组的框图。  FIG. 3 is an embodiment of a block diagram is used to retrieve multiple hash lookup table stored in the example memory bank art FIG. 1 according to a second match exactly.
 图4是根据一个实施例的用于使用第一技术执行精确匹配查找的示例方法的流程图。  FIG. 4 is a flowchart illustrating a method of performing the exact-match lookup in a technique for using the first embodiment.
 图5是根据一个实施例的用于使用第一技术填充精确匹配查找表的示例方法的流程图。  FIG. 5 is a flowchart illustrating a method for using a lookup table according to a first embodiment of filling exact matching technique.
 图6是根据一个实施例的用于使用第二技术执行精确匹配查找的示例方法的流程图。  FIG. 6 is a flowchart illustrating a method of performing the exact-match lookup in a technique for using a second embodiment.
 图7是根据一个实施例的用于使用第二技术填充精确匹配查找表的示例方法的流程图。  FIG. 7 is a flowchart for a second matching technique using exact exemplary method of filling a lookup table according to an embodiment.
在以下所描述的实施例中，具有不同大小（例如，位长度)的查找关键字被有效存储在统一存储器(例如，存储器组的共用集合)之中而并不要求较短的关键字被补充至最长所支持关键字的长度。 Search key  In the embodiment described below, a different size (e.g., bit length) is in a unified memory (e.g., a common set of memory groups) among the key without requiring a shorter effective storage words are made up to a maximum length supported keywords. 在这些实施例中的一些中，多散列、精确匹配查找表跨多个存储器组进行分布。 In some of these embodiments, multiple hash, exact-match lookup table distributed across multiple memory banks. 在一个实施例中，每个存储器组或者多个存储器组的一个或多个群组中的每一个使用不同的散列函数进行访问（例如，用于填充或搜索存储在(多个)组中的查找表的一部分）。 In one embodiment, one or more groups each memory bank or a plurality of memory banks each using a different hash function to access (e.g., stored in the search for filling or (s) in the group part of the look-up table). 根据第一精确匹配查找技术，在一个实施例中，散列表根据关键字大小进行定义，其中每个散列表是使用单个散列函数进行访问（为了关键字插入和关键字搜索）的一个或多个存储器组的虚拟/逻辑分组。 According to a first technique to find an exact match, in one embodiment, a hash table is defined according to the size of the keyword, wherein each of the hash table is accessed using a single hash function (for keyword search and keyword insertion) of one or more virtual / logical grouping of memory banks. 在这些实施例中的一些中，并且受到表格条目的可用性的影响，具有最小大小的关键字能够被插入到对应于存储器组的散列表中，而较大的关键字则能够被插入到对应于两个或更多存储器组的连续分块的散列表中。 Influence the availability of some of these embodiments, and by table entries, minimum size of the key can be inserted into the group corresponding to memory hash table, and the larger the key can be inserted into corresponding two or more hash tables successive memory block group. 在一些实施例中，对应于较大关键字的每个散列表基于关键字大小而被限制为存储器组的特定集合，并且用来访问散列表的特定散列函数取决于采用哪个存储器组的集合。 In some embodiments, each hash table corresponding to the larger size of the keyword based on the keyword set is limited to a specific memory bank, the hash table is used to access the particular hash function is dependent on which set of memory banks using . 在一个实施例中，例如，每个散列表使用与对应于该散列表的一个或多个存储器组的分组中的第一存储器组相关联的散列函数进行访问。 In one embodiment, for example, each hash table using the hash function for accessing the hash table corresponding to the packet or a plurality of memory banks of the first memory associated with the group.
在一个实施例中，根据第二精确匹配查找技术，较大关键字能够以更为灵活的方式被插入到各个存储器组中（例如，并不被限制为存储器组的连续分块），其中指针被用来指示不同存储器组中的各个散列关键字分段之间的关联。  In one embodiment, an exact match lookup in accordance with a second technique, the larger key can be inserted in a more flexible manner to the respective memory groups (e.g., not restricted to a continuous block of memory banks) wherein pointers are used to indicate the association between the respective hash key segments in different memory banks. 在一个这样的实施例中，查找通过如下方法来执行:利用对应于每个存储器组的散列函数对较大关键字进行散列，标识该存储器组中的任意匹配分段，并且使用与该匹配分段相关联的一个或多个指针（以及其它信息，在一些实施例中，诸如分段数量和/或关键字大小)重构针对该较大关键字提供精确匹配的适当条目。 In one such embodiment, the lookup is performed by the following method: hashing larger keywords, identify any matching segment of the memory bank corresponding to each memory bank by using a hash function, and uses the matching segment associated with one or more pointers (as well as other information, in some embodiments, such as a segment number and / or size keywords) to provide accurate reconstruction of the larger keyword match for the proper entry.
图lj根据一个实施例的利用这里所描述的可变关键字大小的查找技术的示例网络设备10的高度简化框图。  According to a highly simplified block diagram of a lj technique using a lookup variable key-size embodiment described herein an exemplary embodiment of the network device 10. 网络设备10通常是连接两个或更多计算机系统、网络分段、子网等的计算机联网设备。 Network devices 10 are typically connected to two or more computer systems, network segmentation, subnets and other computer networking equipment. 在各个实施例中，网络设备10是桥接设备、路由器设备、交换机设备， 或者被配置为在联网环境内进行操作的任意其它适当网络设备。 In various embodiments, the network device 10 is a bridge device, a router device, a switch device, or configured to operate in any networking environment other suitable network devices. 图1的实施例中所示的网络设备10包括端口12。 Embodiment illustrated embodiment the network device 10 includes a port 12 in FIG. 1. 通常，在一些实施例中，端口12包括物理、虚拟和/或逻辑接口，诸如物理端口、虚拟端口、隧道接口等。 In general, in some embodiments, the port 12 comprises physical, virtual and / or logical interfaces, such as physical ports, virtual ports, and tunnel interface. 在一些实施例中，每个端口12是能够用作入口端口和出口端口的双向端口。 In some embodiments, each port 12 is operable as an inlet port and an outlet port bidirectional port. 在其它实施例中，一些或全部端口12专用于作为入口端口或出口端口。 In other embodiments, some or all of the ports 12 dedicated to the port as an inlet or outlet port. 虽然图1仅示出了十个端口，但是在其它实施例中，网络设备10可以包括多于十个的端口或者少于十个的端口。 Although FIG. 1 shows only 10 ports, but in other embodiments, the network device 10 may include a port than the port of ten or less than ten.
 网络设备10还包括分组处理器14。  Network device 10 further includes a packet processor 14. 分组处理器14通常被配置为处理经由一个或多个端口12所接收和/或传送的网络分组。 The packet processor 14 via a packet network is typically configured with one or more ports 12 received and / or transmitted to process. 在各个实施例中，分组处理器14包括一个或多个分组处理单元ie，其被配置为对所接收到的分组和/或表示所接收到的分组的描述符执行分组处理操作。 In various embodiments, the packet processor 14 includes one or more packet processing units IE, configured for the received packet and / or represent a description of the received packet operators perform packet processing operations. 在至少一些情形中，（多个)分组处理单元16中的至少一个执行要求使用分组信息(例如，分组报头和/或描述符信息)来执行搜索/查找以便确定要对该分组采取或者关于其采取的动作的处理操作。 In at least some cases, at least one actuator (s) the packet processing unit 16 requires to perform the search / lookup using packet information (e.g., packet header and / or descriptor information) in order to determine the packet or take on its processing operations take action. 在一个实施例中，例如，（多个)分组处理单元16包括执行用于将分组向端口12中的一个或多个出口端口进行Layer 2转发的查找的桥接单元、执行查找以确定要对所接收的分组应用哪一种策略的分类单元、执行用于分组的Layer 3路由的查找的路由单元、执行用于隧道传输的分组的拆包的查找的隧道终止单元、和/或出于其它目的执行查找的一个或多个其它单元。 In one embodiment, for example, (multiple) packet processing execution unit 16 includes a bridge unit for the Layer 2 packets forwarded to locate the port 12 in the one or more outlet ports, to determine where to perform a lookup of their application of the received packet classification policy which means, Layer 3 routing lookup is performed for packet routing means for finding the tunnel performs unpacking tunneled packet termination unit, and / or for other purposes performing a lookup or more other units. 在一些实施例中，两个或更多的分组处理单元16使用不同大小的关键字执行查找。 In some embodiments, two or more packet processing unit 16 using the key to perform a lookup of different sizes. 例如，在一个实施例中，桥接单元使用对应于MAC地址和VLAN 标识符/标签的60位的关键字执行查找，转发和/或分类单元使用对应于双重VLAN标签的24位关键字执行查找，隧道终止单元使用适用于特定隧道协议/类型（例如，MACinMAC、 VPLS、TRILL、VXLAN等)的关键字大小执行查找，等等。 For example, in one embodiment, the bridging unit 60 using the key corresponding to the MAC address and a VLAN identifier / tag lookup is performed, forwarding and / or the classification unit 24 using the key corresponding to the double VLAN tag lookup is performed, tunnel termination size of the execution unit keyword used for a particular tunneling protocol / type (e.g., MACinMAC, VPLS, TRILL, VXLAN etc.) lookup, and the like. 附加地或者备选地，在一些实施例中， (多个）分组处理单元16中的至少一个被单独配置为使用不同大小的关键字执行查找。 Additionally or alternatively, in some embodiments, (s) the packet processing unit 16 is configured to perform at least one single keyword lookup to different sizes. 例如，在一个实施例中，路由单元被配置为执行使用不同关键字大小的多种类型的查找，包括使用对应于IPv4地址的32位关键字的查找，使用对应于IPv6地址的128位关键字的查找，以及使用通过向IPv4和/或IPv6地址增加虚拟路由器转发(VRF)索引而被加长的关键字的查找。 For example, in one embodiment, the routing unit is configured using a variety of different types of keywords to perform a lookup sizes, including the use of lookup IPv4 address corresponding to the 32-bit key, the use of IPv6 address corresponding to the 128-bit key Find and use the keyword by adding to the virtual router IPv4 and / or IPv6 address forwarding (VRF) index is lengthened look.
 为了执行至少一些所需查找，分组处理器14包括关键字生成单元20、关键字搜索/ 插入单元22以及存储多散列查找表的查找存储器24。  In order to perform at least some of the required lookup, the packet processor 14 includes a key generating unit 20, a keyword search / insertion unit 22 and a memory 24 storing a plurality of lookup hash table lookup. 在各个实施例中，关键字生成单元20 和/或关键字搜索/插入单元22耦合至（多个)分组处理单元16中执行查找的每个单元，并且耦合至(多个)分组处理单元16中执行查找的单元的子集中的每一个，或者被配置为对所有(多个)分组处理单元16进行服务。 In various embodiments, the key generating unit 20 and / or keyword search / unit is inserted into each packet processing unit 16 is coupled to perform a lookup (s) unit 22, coupled to the processing unit and the packet (s) 16 executing the subset of cells to find each or all configured to (s) for the service packet processing unit 16.
 为了确定要对分组执行或关于其执行的动作，关键字生成单元20使用分组信息来针对该分组生成关键字。  In order to determine the actions performed on the packet or on its implementation, the key generating unit 20 uses the packet information to generate keywords for the packet. 在一个实施例中，例如，关键字生成单元2〇基于决定适当动作所需的分组报头信息来生成关键字，上述报头信息诸如MAC地址、VLAN或双重VLAN标签、或者IPv4或IPv6地址。 In one embodiment, for example, based on the decision key generating unit 2〇 packet header information required for proper operation of generating the keyword, the above header information such as MAC address, VLAN or double VLAN tag, or IPv4 or IPv6 address. 附加地或者备选地，在一个实施例中，关键字生成单元20基于非报头信息生成关键字，上述非报头信息诸如分组经由其进入到网络设备1〇的接口（例如，端口12的接口）。 Additionally or alternatively, in one embodiment, the key generating unit 20 generates key information based on the non-header, the above-described non-header information such as the packet enters via its interface to the network device 1〇 (e.g., interface port 12) . 关键字搜索/插入单元22利用所生成的关键字对多散列查找表26进行搜索，并且（向(多个)分组处理单元16中指示该搜索的单元)返回分组处理信息，该单元能够利用该分组处理信息来执行所期望的处理操作。 Keyword search / insert key section 22 using the generated plurality of hash lookup table search 26, and (the search unit 16 to indicate (s) the packet processing unit) return packet processing information, the cell can be utilized the packet processing information to perform the desired processing operations. 在一个实施例中，关键字搜索/插入单元22不仅搜索多散列查找表26中的条目，而且还利用新的条目对多散列查找表26进行填充(例如，将关键字和数值/动作插入到多散列查找表26中），和/或去除旧的条目（例如，基于老化准则）。 In one embodiment, a keyword search / insertion unit 22 searches not only multi-entry lookup hash table 26, but using new multi-entry lookup hash table 26 is populated (e.g., keywords and values / operation inserted into the multiple hash lookup table 26), and / or removing old entries (e.g., based on the aging criteria). 如将要在下文中更为详细描述的，多散列查找表26存储对应于不同关键字大小的条目。  As will be described in more detail below, the hash lookup table 26 stores multiple entries corresponding to the different sizes of the keyword. 在各个实施例中，每个不同关键字大小或者至少一些不同关键字大小中的每一个对应于不同类型的搜索/查找，并且多散列查找表26因此是多用途数据库。 In various embodiments, each of a different size, or at least some of the keywords for each different key sizes corresponding to different types of search / lookup, the hash lookup table 26 and the multi-purpose database therefore. 例如，在一个实施例中，多散列查找表26存储与转发动作相关联的条目，以及与隧道终止动作相关联的条目， 并且因此用作转发表和隧道终止表。 For example, in one embodiment, multiple hash lookup table 26 stores forwarding entry associated with the operation, and the operation entry associated with the tunnel termination, and thus serves as a tunnel forwarding table and termination table. 在其它实施例中，每个不同关键字大小对应于相同的一般类型的搜索/查找。 In other embodiments, each different key sizes corresponding to the same general type of search / lookup. 例如，在一些实施例中，多散列查找表26仅存储与路由动作(例如， 在一个实施例中，对应于32位的IPv4地址的动作以及对应于128位的IPv6地址的动作)相关联的条目。 For example, in some embodiments, (e.g. motion operation, in one embodiment, corresponds to a 32-bit IPv4 addresses and corresponding to the 128-bit IPv6 address) 26 stores only the lookup table associated with the routing operation of multiple hash entry.
在图1所示的实施例中，多散列查找表26被细分为存储在查找存储器24的四个不同存储器组30-1至30-4之中的四个散列表部分。  In the embodiment illustrated in Figure 1, multiple hash lookup table 26 lookup memory is subdivided in four groups 24 of four different memory hash portion 30-1 to 30-4 in storage. 在一个实施例中，存储器组30-1至30-4中的每一个是查找存储器24内的不同物理存储器组。 In one embodiment, memory bank 30-1 to 30-4 are each a different physical memory bank lookup in the memory 24. 在一个实施例中，查找存储器24 (包括存储器组30-1至30-4)是静态随机访问存储器(SRAM)。 In one embodiment, the lookup memory 24 (30-1 to 30-4 comprises a memory group) is a static random access memory (SRAM). 在其它实施例中，查找存储器24是不同的适当存储器，例如诸如动态RAM (DRAM)。 In other embodiments, different lookup memory 24 is suitable memory, such as dynamic RAM (DRAM). 在一个实施例中，存储器组30-1至30-4中的每个散列表部分使用存储器组30-1至30-4中相对应的不同的一个存储器组进行访问。 In one embodiment, memory bank 30-1 to 30-4 each hash table using the memory part 30-1 to 30-4 set corresponding to a different group of memory access. 在一个实施例中，能够存储在多散列查找表26中的数值/动作条目的数量等于能够存储在多散列查找表26中的最小大小的关键字的最大数量。 In one embodiment, can be stored in a number of 26 values / entry operation of multiple hash lookup table is equal to the maximum number of keywords can be stored in the minimum size of the plurality of hash lookup table 26. 在一些实施例中，多散列查找表26的数值/动作包括指向与关键字相关联的属性的指针，或者包括表示属性自身的数据。 In some embodiments, multiple hash values lookup table 26 / attribute includes a pointer pointing operation associated with the keyword or attribute including data representing itself.
 分组处理器14包括一个或多个有形/物理处理器或者包括在后者之内。  The packet processor 14 comprises one or more tangible / or physical processors included in the latter. 例如，在第一实施例中，分组处理器14包括多个软件驱动的处理器，它们被部署为管道中的分级，被配置为对通过管道输送的分组进行处理。 For example, in the first embodiment, the packet processor 14 includes a plurality of software-driven processor, they are deployed as a hierarchical pipeline, configured to packets transported by the pipeline process. 在一个实施例中，管道的每个分级接收分组、处理情境，以及基于该情境在分级执行一种或多种处理操作所需的代码。 In one embodiment, each of the received packet classifying duct, process context, and the context in the classification based on the code to perform one or more desired processing operations. 在一个这样的实施例中， (多个)分组处理单元16被实施为相应的管道分级。 In one embodiment, (s) the packet processing unit 16 is implemented such embodiments rated respective conduits. 此外，在一个实施例中，关键字生成单元20和/或关键字搜索/插入单元22被实施为管道分级之外的一个或多个加速器(例如，一个或多个硬件加速器电路）。 Further, in one embodiment, the key generating unit 20 and / or keyword search / insertion unit 22 is implemented as one or more accelerators (e.g., one or more hardware accelerators circuits) outside of the pipe grade.
 在第二实施例中，分组处理器14包括多个软件驱动的运行至完成处理器/核心，其中每个核心被配置为在处理后续分组之前执行针对相应分组的基本上所有处理。  In the second embodiment, the packet processor 14 includes a plurality of software drivers to run to completion processor / core, where each core is configured to perform processing prior to the subsequent treatment of the corresponding packets for substantially all of the packets. 在一个这样的实施例中，（多个)分组处理单元16被实施为分组处理器14的单个核心内的相应软件模块。 In one such embodiment (s) the packet processing unit 16 is implemented as software modules within a respective single core processor 14 packet. 此外，在一个实施例中，关键字生成单元20和/或关键字搜索/插入单元22被实施为处于分组处理器14之外的一个或多个加速器(例如，一个或多个硬件加速器电路）。 Further, in one embodiment, the key generating unit 20 and / or keyword search / insertion unit 22 is implemented as one or more accelerators in addition to the packet processor 14 (e.g., a hardware accelerator, or more circuits) . 在一个实施例中，关键字生成单元20和/或关键字搜索/插入单元22被多个核心用来执行与不同分组相关联的查找操作。 In one embodiment, the key generating unit 20 and / or keyword search / inserting unit 22 is used to perform a plurality of core lookup operation associated with a different packet.
在以上所描述的第一和第二实施例中的一些之中，软件驱动的处理器被配置为读取并执行存储在有形的非瞬态计算机可读存储器(例如，只读存储器(ROM)、随机访问存储器(RAM)等)上的指令。  In the first embodiment and the second embodiment described above in some of the software-driven processor is configured to read and execute instructions stored in a tangible, non-transitory computer-readable memory (e.g., read only memory (ROM), a random access memory (RAM) and the like on the instruction). 在一些实施例中，该指令包括计算机可读指令，当被处理器所执行时，其使得该处理器执行这里所描述的（多个)分组处理器任意的各种动作。 In some embodiments, the computer readable instructions comprising instructions which, when executed by a processor, cause the processor to perform various acts described herein to any packet processor (s) of.
在第三实施例中，分组处理器14包括以硬件实施的分组处理官道，上还使仵诸如一个或多个专用集成电路(ASIC)或者任意其它适当（多种)类型的（多个)硬件电路。  In the third embodiment, the packet processor 14 includes a packet processing Guandao implemented in hardware, but also to make the opponent as one or more application specific integrated circuits (ASIC), or any other suitable (s) of type ( s) hardware circuits. 在一个这样的实施例中，（多个)分组处理单元16被实施为相应的管道分级。 In one embodiment, (s) the packet processing unit 16 is implemented such embodiments rated respective conduits. 此外，在一个实施例中，关键字生成单元20和/或关键字搜索/插入单元22被实施为管道分级之外的一个或多个电路。 Further, in one embodiment, the key generating unit 20 and / or keyword search / insertion unit 22 is implemented as one or more circuits outside the pipe grade.
现在将针对两种备选技术/实施例对关键字搜索/插入单元22关于填充以及搜索多散列查找表26两方面的操作进行描述。  Two alternative embodiments will now be made for the technology / examples of the keyword search / fill insertion unit 22 and a search on multiple hash table lookup operation 26 both will be described. 在一些实施例中尤其适用于其中大多数关键字被预期具有最小关键字大小的第一精确匹配查找技术参考图2的示例实施例进行描述。 In some embodiments, particularly suitable for the majority of which precisely match the first keyword is expected to have a minimum size of a keyword lookup technique 2 with reference to FIG exemplary embodiment will be described. 在一些实施例中提供对于关键字大小的分布不可知的更为一般的解决方案的第二种备选精确匹配查找技术则参考图3的示例实施例进行描述。 In some embodiments provide for an exact match more general second alternative solution agnostic size distribution keyword lookup technique the example 3 will be described with reference to FIG embodiment.
首先参考图2,其图示了第一精确匹配查找技术的一个示例实施例，所看到的是， 查找存储器24的每个存储器组30-1至30-4存储多散列查找表26的相应部分，其中每个存储器组30-1至30-4被配置为在有限数量的散列表地址的每一个之中存储多达一个的散列关键字分段。  Referring first to Figure 2, which illustrates a first example of exact-match lookup art embodiment is seen, lookup memory 24 of each memory bank 30-1 to 30-4 stores a plurality of hash lookup corresponding portions of the table 26, wherein each memory bank 30-1 to 30-4 are configured in each of up to a limited number stored in a hash table addresses hash key segment. 如将从随后的描述所清楚的，在一个实施例中，“散列关键字分段”针对具有最小大小的关键字对应于整个关键字，或者针对具有较大大小的关键字则对应于该关键字的一部分。 As apparent from the ensuing description, in one embodiment, "a hash key segment" having a minimum size for a key corresponding to the entire keyword, or keyword for having a large size corresponds to the part of the key. 在一个实施例中，各个散列表部分中的每个地址在应用相对应的散列函数时对应于单个散列数值，并且每个存储器组30-1至30-4具有等于单个散列关键字分段的大小(位计数)的宽度。 In one embodiment, each of the addresses of the respective portions in the hash table corresponding to the application of a hash function corresponding to a single hash value, and each memory bank 30-1 to 30-4 having a single hash key is equal to the width of the segment size (bit count) of.
在图2的实施例中，存储器组30-1的散列表部分包括均能够保存单个散列关键字分段的五个地址5〇-1至5〇-5,存储器组30-2的散列表部分包括均能够保存单个散列关键字分段的五个地址52-1至52_5,存储器组3〇_3的散列表部分包括均能够保存单个散列关键字分段的五个地址54-1至54_5,并且存储器组30-4的散列表部分包括均能够保存单个散列关键字分段的五个地址56-1至56_5。  In the embodiment of FIG. 2, the portion of the memory hash table group 30-1 comprises five addresses are capable of holding a single hash key segment 5〇 5〇-1 to-5, memory banks 30-2 the hash table includes a portion of each segment can hold a single hash keys 52-1 to 52_5 five address, the hash table portion of the memory includes a set 3〇_3 are capable of holding five segment address of a single hash key 54-1 to 54_5, and the hash portion of the memory group 30-4 comprises five addresses are capable of holding a single hash key segment 56-1 to 56_5. 图2 (和图1)的多散列查找表26被示为仅包括四个散列表部分(存储在四个存储器组3〇中），每个散列表部分包括五个地址，这仅是为了帮助进行解释。 2 (and FIG. 1) of the plurality hash lookup table 26 is shown as including only four hash portion (stored in the four memory banks 3〇), each hash table address portion comprises five, this is only for help explain. 然而，在其它实施例中，多散列查找表26包括存储在其它数量的存储器组30 (例如，2、3、 5、6等)之中的其它数量的散列表部分，和/或每个散列表部分包括能够保存散列关键字分段的不同数量的地址(例如，256、1000等）。 However, in other embodiments, multiple hash lookup table 26 includes other numbers stored in the memory bank 30 (e.g., 2, 3, 5, 6, etc.) other numbers among the hash portion, and / or each hash portion comprises a different number of addresses can be stored (e.g., 256,1000, etc.) hash key segment.
当根据第一精确匹配查找技术以及图2的示例实施例进行操作时，关键字搜索/插入单兀22通过接收关键字(例如，从关键字生成单元2〇)以及要被插入到多散列查找表26之中的相关联信息而填充多散列查找表26。  When looking art example of FIG. 2 and the exact matching of the first embodiment according to the operation, the keyword search / Wu insert 22 by receiving a single keyword (e.g., from the key generation unit 2〇) and to be inserted into multi-associated information into a hash lookup table 26 to fill more than a hash lookup table 26. 例如，在一个实施例中，关键字包括分组的地址和VLAN标识符，并且与关键字相关联的信息包括端口12中要向其转发以该mac地址为目的地(并且具有该VLAN标识符）的分组的一个或多个出口端口。 For example, in one embodiment, the packet including a keyword address and VLAN identifier, and information associated with the keyword comprises a port 12 to which is forwarded to the destination mac address (and having the VLAN identifier) one or more outlet ports of the packet. 在一个实施例中，关键字生成单兀2〇还生成关键字大小的指示符(例如，位计数或者表示大小范围的指示符，等等），并且将该指示符连同关键字一起或者作为关键字的一部分提供至关键字搜索/插入单元22。 In one embodiment, the key generating unit further generates an indicator Wu 2〇 key size (e.g., an indicator indicating a bit count or size range, etc.), and the indicator or as a key together with the key portion of the word is provided to a keyword search / insertion unit 22. [00、38^在一个实施例中，关键字搜索/插入单元22基于关键字大小(例如，使用关键字生成单兀20所提供的关键字大小指不符)标识/选择一个或多个散列表，其中每个不同散列表对应于不同散列函|女。 [00,38 ^ In one embodiment, the search keywords / key insertion unit 22 based on the size (e.g., Wu keyword using the keyword generation unit 20 provides the size of the finger does not match) the identification / selection of one or more of a hash table embodiment , wherein each different hash table corresponds to a different hash function | female. 例如，在一个实施例中，当插入具有最小关键字大小的关键字时，关键字搜索/插入单元22标识/选择四个散列表60-1至60-4，这些散列表均存储在不同存储器组30-1至30-4中并且均对应于不同散列函数幻―丨至於-以图丨）。 For example, in one embodiment, when the key is inserted having a smallest key size, a keyword search / insertion unit 22 identification / selection four hash table 60-4 to 60-1, the hash table is stored in a different memory in 30-1 to 30-4 and each group corresponds to a different hash functions magic - Shu As - in FIG Shu). 在一个实施例中，该最小关键字大小是在被插入多散列查找表26之中时仅被散列为(散列关键字分段50、52、54和56 中的)单个散列关键字分段的那些关键字的大小。 In one embodiment, the smallest key size when inserted into multiple hash lookup table 26 only to hash (hash key segments 50,52, 54 and 56) a single hash key the size of those keywords word segments. 在一些实施例中，关键字生成单元20提供补充以确保所有关键字都至少具有最小关键字大小。 In some embodiments, the key generating unit 20 to ensure all keywords are supplemented with keywords at least a minimum size. 在其中要插入最小大小的关键字的一些实施例和情形中，关键字搜索/插入单元22通过使用相应的散列函数32-1至32-4对整个关键字进行散列而访问每个散列表60-1至60-4,并且在不会产生冲突的情况下(例如，在一个实施例中，如果该散列表并未已经在所计算的地址/散列值包括不同关键字的散列关键字分段)将该散列关键字插入到散列表60之一中。 In some embodiments and situations where the minimum size to be inserted in the keywords, the keyword search / insertion unit 22 accesses each hash function by using the corresponding hash key 32-1 to 32-4 of the entire hashing list 60-1 to 60-4, and in the case where a conflict does not occur (e.g., in one embodiment, if the hash list is not already included in the address of different keywords calculated / hash value of the hash key fragment) hash key is inserted into the one of the hash table 60. 在一个实施例中，关键字搜索/插入单元22还将指示该关键字为最小大小的关键字的信息存储在条目中。 In one embodiment, a keyword search / insertion unit 22 also stores information indicating that the key is a keyword in the entry of minimum size. 图2图示了其中具有最小关键字大小的关键字被作为散列关键字分段“A”在地址52-1成功插入到散列表60-2中的情形。 FIG 2 illustrates the case where a keyword having a smallest key size is used as a hash key segment "A" in the case where the address 52-1 successfully inserted into the hash table 60-2.
 在一些实施例中，关键字搜索/插入单元22每次一个地向关键字应用散列函数32-1至32_4(并且确定是否可能插入到散列表6〇-1至60-4中相对应的一个之中），并且仅在当前散列操作并未导致关键字插入的情况下才执行其余的散列函数。  In some embodiments, the keyword search / insertion unit 22 one at a time applying a hash function to the key 32-1 32_4 (and determines whether the hash table may be inserted into 6〇-1 to 60-4 a corresponding in), and is performed only remaining hash function in the current hash operation does not cause keyword insertion. 在其它实施例中，关键字搜索/插入单元22并行地对关键字应用散列函数32_1至32_4中的每一个，并且进行检查以查看是否每个散列表60-1至60-4都能够存储该关键字。 In other embodiments, the keyword search / insertion unit 22 in parallel to the keyword hash function is applied to each of the 32_1 32_4, and checks to see whether each hash table 60-1 to 60-4 capable of storing this keyword. 在其中多于一个的散列表60-1至60-4具有可用地址的一些实施例和情形中，关键字搜索/插入单元22将该关键字插入到散列表6〇-1至60-4中被填充最多的一个之中。 In which more than one hash table 60-1 to 60-4 and the case of some embodiments, having available addresses, search keywords / key insertion unit 22 is inserted into the hash table 6〇-1 to 60-4 It is among the most filling a. 附加地或者备选地，在一些实施例中，关键字搜索/插入单元22采用“布谷鸟(cuckoo)”算法，其中只要之前所存储的关键字能够被移动至新的散列表，则关键字即使在存在冲突的情况下也被插入。 Additionally or alternatively, in some embodiments, a keyword search / insertion unit 22 using "Cuckoo (Cuckoo)" algorithm, wherein as long as the keywords previously stored can be moved to a new hash table, the keyword It is also inserted even in the event of a conflict. 在一些实施例中，结合这里所描述的技术实施美国专利申请No. l3A376〇8和/或美国专利申请No. 14/012834中所描述的任意适当的关键字插入的（多种)技术或(多种)算法。 In some embodiments, the techniques described herein in conjunction with any suitable embodiment of key U.S. Patent Application No. l3A376〇8 and / or U.S. Patent Application No. 14/012834 described insertion (s) or techniques ( variety) algorithm.
在一个实施例中，针对两倍于最小关键字长度(或者例如被关键字生成单元20补充为两倍于最小关键字长度)的关键字，关键字搜索/插入单元22标识/选择两个散列表62-1和62-2,它们均对应于存储器组30-1至30-4的不同配对，并且均对应于不同的散列函数32-1至32-4。  In one embodiment, for twice the smallest key length (or the key generating unit 20, for example, added to twice the minimum length of the keyword) of the keyword, keyword search / insertion unit 22 identification / selection two hash tables 62-1 and 62-2, all of which correspond to different pairs of memory banks 30-1 to 30-4, and corresponds to a different hash function 32-1 to 32-4. 在一个实施例中，在搜索到具有两倍于最小关键字长度的关键字时，用来访问对应于散列表62-1和62_2的存储器组的配对的散列函数是对应于被用来存储该散列表的第一存储器组的散列函数。 In one embodiment, when the searched keywords having the twice the minimum length of the key used to access the hash table corresponding to the pair of memory banks 62-1 and 62_2 of the hash function is used to store corresponding to the hash function of the hash table of the first memory bank. 例如，在图2的示例实施例中，用于散列表62-1的散列函数是对应于存储器组30-1的散列函数（g卩，散列函数32-1)，并且用于散列表62-2的散列函数是对应于存储器组30_3的散列函数（即，散列函数32-3)。 For example, in the exemplary embodiment of FIG. 2 embodiment, a hash function of the hash table 62-1 corresponding to the memory bank 30-1 is a hash function (g Jie, the hash function 32-1), and for bulk 62-2 is a list of the hash function corresponding to the memory bank 30_3 hash functions (i.e., the hash function 32-3). 在其它实施例中，针对每个散列表使用不同的散列函数(例如，诸如被用来存储该散列表的最后的存储器组）。 In other embodiments, a different hash function (e.g., such as a memory is used to store the last set of the hash table) for each hash table.
在其中要插入两倍于最小关键字大小的关键字的一些实施例和情形中，关键字搜索/插入单元22通过使用散列函数32-1对整个关键字进行散列以访问存储在存储器组30-1 中的散列表部分，并且还通过使用散列函数32-1对整个关键字进行散列以访问存储在存储器组3〇_2中的散列表部分从而访问散列表62-1。 Some embodiments and the case  in which the key is to be inserted at twice the smallest key size, a keyword search / insertion unit 2232-1 to access the stored hashed by using a hash of the entire key function group hash table in the memory part 30-1, and also by using a hash function hash key 32-1 to access the entire hash table is stored in the memory portion of the group 3〇_2 to access the hash table 62- 1. 类似地，在一个实施例中，关键字搜索/插入单元22通过使用散列函数32-3对整个关键字进行散列以访问存储在存储器组30-3中的散列表部分，并且还通过使用散列函数32_3对整个关键字进行散列以访问存储在存储器组30-4中的散列表部分从而访问散列表62_2。 Similarly, in one embodiment, a keyword search / insertion unit 2232-3 hashed to access the hash table stored in the memory section 30-3 for the entire group of keywords by using a hash function, and also by using 32_3 hash function hashes the entire keyword hash table to access the storage section of the memory banks 30-4 to access the hash table 62_2. 如果将不会导致冲突（例如，在一个实施例中， 如果该散列表中任一个组成的散列表部分在所产生的地址/散列值处都不包括散列关键字分段），则散列关键字随后以两个相邻散列关键字分段的形式而被插入到散列表62-1或62- 2之一。 If not cause a conflict (e.g., in one embodiment, if any of the hash table address portion of a hash of the resulting composition / hash value of the hash key segment not included), the bulk then list of keywords in the form of two adjacent segments hash key is inserted into one hash table 62-1 or 62-2. 在一个实施例中，关键字搜索/插入单元22还将指示该关键字两倍于最小大小的信息存储在条目之中。 In one embodiment, a keyword search / insertion unit 22 also indicates that the key information storing twice the minimum size among the entries. 图2图示了如下情形，其中具有两倍于最小关键字大小的第一关键字作为散列关键字分段“B1”和“B2”而分别在地址50-2和52-2而被成功插入到散列表62-1之中， 并且具有两倍于最小关键字大小的第二关键字作为散列关键字分段“C1”和“C2”而分别在地址54-3和56-3而被成功插入到散列表62-2之中。 Figure 2 illustrates a situation, wherein a first key having twice the smallest key size as the hash key segment "B1" and "B2" respectively in the address 50-2 and 52-2 are successfully 62-1 inserted into the hash table, and a second key twice the smallest key size as the hash key segments "C1" and "C2" respectively in the address 54-3 and 56-3 It was successfully inserted into the hash table 62-2. 如在图2的示例实施例和情形中所看到的，针对特定散列表的每个散列表部分使用相同的散列函数（例如，针对存储器组30-1和30-2中所存储的散列表部分使用散列函数32-1)使得每个散列关键字分段被存储在每个散列表部分内的相同地址/散列值。 As seen in the case of the examples and in the exemplary embodiment of FIG. 2, each hash table section uses the same hash function (e.g., memory bank 30-1 and 30-2 are stored in bulk for a specific hash table using a hash function list portion 32-1) such that each segment is the same hash key addresses stored in the hash table for each part / hash value.
 在一些实施例中，关键字搜索/插入单元22每次一个地向关键字应用散列函数32-1和32-3 (并且确定是否可能插入到相对应的一个散列表62-1或62-2之中），并且仅在第一散列函数32-1并未导致关键字插入的情况下才执行第二散列函数32-3。  In some embodiments, the keyword search / insertion unit 22 each time a keyword hash function applied to the 32-1 and 32-3 (and determines whether it is possible to insert a corresponding hash table 62-1 or 62-2 in), and the second hash function is performed only 32-3 in the first case did not lead to 32-1 hash function keyword insertion. 在其它实施例中， 关键字搜索/插入单元22并行地将两个散列函数32-1和32-3应用于该关键字，并且进行检查以查看散列表62-1和62-2是否都能够存储关键字。 In other embodiments, the keyword search / insertion unit 22 in parallel to the two hash functions is applied to the key 32-1 and 32-3, and checks to see whether the hash table 62-1 and 62-2 are keywords can be stored. 在其中两个散列表62-1和62-2在组成的散列表部分内都具有可用地址的一些实施例和情形中，关键字搜索/插入单元22将该关键字插入到散列表62-1和62-2中被填充最多的一个之中。 In some embodiments and situations where two hash tables 62-1 and 62-2 have address available in the part of the hash table, the keyword search / insertion unit 22 is inserted into the keyword hash table 62-1 and 62-2 is filled in one of the largest. 附加地或者备选地，在一些实施例中，关键字搜索/插入单元22采用“cuckoo”算法，其中只要之前所存储的关键字能够被移动至新的散列表，则关键字即使在存在冲突的情况下也被插入。 Additionally or alternatively, in some embodiments, a keyword search / insertion unit 22 using "cuckoo" algorithm, wherein as long as the keywords previously stored can be moved to a new hash table, the keyword even if there is a conflict also in a case is inserted. 在一些实施例中，结合这里所描述的技术实施美国专利申请No. 13/737608和/或美国专利申请No. 14/012834中所描述的任意适当的关键字插入的(多种)技术或(多种)算法。 In some embodiments, the techniques described herein in conjunction with embodiments of U.S. Patent Application No. 13/737608 and / or U.S. Patent Application No. 14/012834 any suitable keywords described insertion (s) or techniques ( variety) algorithm.
 在一个实施例中，针对三倍于最小关键字长度(或者例如被关键字生成单元20补充为三倍于最小关键字长度）的关键字而言，关键字搜索/插入单元22标识/选择对应于存储器组30-1至30-3的散列表64以及散列函数32-1至32-4之一。  In one embodiment, three times for the smallest key length (or the key generating unit 20 for example, is added three times the smallest key length) in terms of keywords, the keyword search / insertion unit 22 identifies the / selection corresponds to one of the memory banks 32-4 to 30-3 30-1 hash table 64 and the hash function 32-1. 在一个实施例中，在搜索具有三倍于最小关键字长度的关键字时，用来访问对应于散列表64的这三个存储器组中的每一个的散列函数是对应于被用来存储该散列表的第一存储器组的散列函数。 In one embodiment, when searching for a keyword having three times the smallest key length, corresponding to a hash function used to access the hash table 64 of the three memory banks corresponding to each of the memory is used the hash function of the hash table of the first memory bank. 例如，在图2的示例实施例中，用于散列表64的散列函数是对应于存储器组3〇_1的散列函数(即，散列函数32-1)。 For example, in the exemplary embodiment of FIG. 2 embodiment, the hash function is a hash table 64 corresponding to the memory bank 3〇_1 hash function (i.e., the hash function 32-1). 在其它实施例中，针对每个散列表使用不同散列函数(例如，诸如被用来存储散列表的最后的存储器组）。 In other embodiments, a different hash function (e.g., as the last memory bank for storing a hash table) for each hash table. 在其中要插入三倍于最小关键字大小的关键字的一些实施例和情形中，关键字搜索/插入单元22通过使用相同散列函数32-1对整个关键字进行散列以访问存储在存储器组30-1至30-3中的三个散列表部分中的每一个来访问散列表64。 Some embodiments and situations in which the key is to be inserted three times the minimum size of the keyword, the keyword search / insertion unit 2232-1 hashed stored in the memory to access the entire hash function by using the same key three hash portions 30-1 to 30-3 in the group access to each of the hash table 64. 如果将不会导致冲突(例如，在一个实施例中，如果该散列表中的三个组成的散列表部分在所产生的地址/散列值处都不包括散列关键字分段），则散列关键字随后以三个相邻散列关键字分段的形式而被插入到散列表64之中。 If not cause a conflict (e.g., in one embodiment, if the hash portion of the three hash list composed of the generated address / hash value of the hash key segment not included), the followed by three form a hash key hash keys adjacent segment is inserted into the hash table 64. 在一些实施例中，关键字搜索/插入单元22采用“cuckoo” 算法，其中只要之前所存储的关键字能够被移动至新的散列表，则关键字即使在存在冲突的情况下也被插入。 In some embodiments, the keyword search / insertion unit 22 using "cuckoo" algorithm, wherein as long as the keywords previously stored can be moved to a new hash table, the key is inserted even in the event of a conflict. 在一些实施例中，结合这里所描述的技术实施美国专利申请N〇• IV 737608和/或美国专利申请No .14/012834中所描述的任意适当的关键字插入的（多种)技术或（多种)算法。 In some embodiments, the techniques described herein in conjunction with embodiments of U.S. Patent Application N〇 • IV 737608 and / or U.S. Patent Application any suitable keyword No .14 / 012834 described insertion (s) or techniques ( variety) algorithm. 在一个实施例中，关键字搜索/插入单兀22还将指不该关键字为二倍于最小大小的信息存储在条目之中。 In one embodiment, a keyword search / Wu single insertion means 22 should also twice the keyword in the entry information stored in the minimum size. 图2图示了其中具有三倍最小关键字大小的关键字作为散列关键字分段“D1”、“D2”和“D3”分别在地址50-4、52-4和54-4被成功插入到散列表64之中的情形。 Figure 2 illustrates a key having three times the smallest key size as the hash key segment "D1", "D2" and "D3" are successfully address 50-4,52-4 and 54-4 inserted into the hash table 64 in the case. 同样，针对特定散列表的每个散列表部分使用相同的散列函数(例如，针对存储器组30-1至30-3中所存储的每个散列表部分使用散列函数32-1)使得每个散列关键字分段被存储在每个散列表部分内的相同地址/散列值。 Similarly, using the same hash function for each hash table a particular portion of the hash table (e.g., 30-1 for a memory bank using a hash function to each of the hash table stored in section 30-3 32-1) so that each of a hash key segments within the same address is stored in each hash table part / the hash value.
在一个实施例中，针对四倍于最小关键字长度(或者例如被关键字生成单元20补充为四倍于最小关键字长度）的关键字而言，关键字搜索/插入单元22标识/选择对应于存储器组30-1至30-4的散列表66以及散列函数32-1至32-4之一。  In one embodiment, for four times the smallest key length (for example 20 or supplemental key generating unit is a key four times the minimum length) in terms of keywords, the keyword search / insertion unit 22 identifies the / selection corresponds to one of the memory banks 32-4 to 30-1 and 30-4 of the hash table 66 hash function 32-1. 在一个实施例中，在搜索具有四倍于最小关键字长度的关键字时，用来访问对应于散列表66的这四个存储器组中的每一个的散列函数是对应于被用来存储该散列表的第一存储器组的散列函数。 In one embodiment, when searching for a keyword having four times the minimum length of the key used to access the hash table corresponding to the four memory banks 66 in each of the hash function is used to store corresponding to the hash function of the hash table of the first memory bank. 例如，在图2的示例实施例中，用于散列表66的散列函数是对应于存储器组30-1的散列函数(g卩，散列函数32-1)，这是因为存储器组30-1是其中存储散列关键字的第一部分的第一存储器组。 For example, in the exemplary embodiment of FIG. 2 embodiment, the hash function is a hash table 66 corresponding to the memory bank 30-1 hash function (g Jie, 32-1 hash function), this is because the memory banks 30 -1 wherein a first portion of a first hash key storage memory banks. 在其它实施例中，针对每个散列表使用不同散列函数（例如，诸如被用来存储散列表的最后的存储器组）。 In other embodiments, a different hash function (e.g., as the last memory bank for storing a hash table) for each hash table. 在其中要插入四倍于最小关键字大小的关键字的一些实施例和情形中，关键字搜索/插入单元22通过使用相同散列函数32-1对整个关键字进行散列以访问存储在存储器组30-1至30-4中的四个散列表部分中的每一个来访问散列表66。 Some embodiments and situations in which the key is to be inserted four times the minimum size of the keyword, the keyword search / insertion unit 2232-1 hashed stored in the memory to access the entire hash function by using the same key four hash portions 30-1 to 30-4 in the group access to each of the hash table 66. 如果将不会在任意存储器组30中的相对应位置导致冲突(例如，在一个实施例中，如果该散列表中的四个组成的散列表部分在所产生的地址/散列值处都不包括散列关键字分段），则散列关键字随后以四个相邻散列关键字分段的形式而被插入到散列表64之中。 If not correspond to any position in the memory 30 results in a conflict set (e.g., in one embodiment, if the hash table address portion of the hash table in the four component generated / hash value is not at including hash key segment), the hash key followed by four adjacent segments form hash key is inserted into the hash table 64. 在一些实施例中，关键字搜索/插入单元22采用“cuckoo”算法，其中只要之前所存储的关键字能够被移动至新的散列表，则关键字即使在存在冲突的情况下也被插入。 In some embodiments, the keyword search / insertion unit 22 using "cuckoo" algorithm, wherein as long as the keywords previously stored can be moved to a new hash table, the key is inserted even in the event of a conflict. 在一些实施例中，结合这里所描述的技术实施美国专利申请No. 13/737608和/或美国专利申请No. 14/012834中所描述的任意适当的关键字插入的（多种)技术或(多种)算法。 In some embodiments, the techniques described herein in conjunction with embodiments of U.S. Patent Application No. 13/737608 and / or U.S. Patent Application No. 14/012834 any suitable keywords described insertion (s) or techniques ( variety) algorithm. 在一个实施例中，关键字搜索/插入单元22还将指示该关键字为四倍于最小大小的信息存储在条目之中。 In one embodiment, a keyword search / insertion unit 22 also indicates that the keyword is four times the minimum size of the information stored in the entry. 图2图示了其中具有四倍最小关键字大小的关键字作为散列关键字分段“El”、“E2”、“E3”和“E4”分别在地址50-5、52-5、54-5和56-5 被成功插入到散列表66之中的情形。 Figure 2 illustrates a segment as a hash key "El", "E2", "E3" and "E4" respectively in the address keyword 50-5,52-5,54 having four times the smallest key size -5 and 56-5 were successfully inserted into the situation in the hash table 66. 同样，针对特定散列表的每个散列表部分使用相同的散列函数（即，针对存储器组30-1至30-4中所存储的每个散列表部分使用散列函数32-1)使得每个散列关键字分段被存储在每个散列表部分内的相同地址/散列值。 Similarly, using the same hash function for each hash table a particular portion of the hash table (i.e., memory bank 30-1 for using a hash function to each of the hash table stored in section 30-4 32-1) so that each of a hash key segments within the same address is stored in each hash table part / the hash value.
 如图2中所看到的，在一个实施例中，该第一精确匹配查找技术在一些情形中能够选择不同的散列函数来访问单独的一个存储器组30,其中该选择基于查找关键字的大小。  seen in Figure 2, in one embodiment, the first technique exact-match lookup in some cases be able to select a different hash function to access a single memory bank 30, wherein the selection is based on lookup the size of the keyword. 例如，在图2的示例实施例中，在搜索具有最小关键字大小的查找关键字时使用散列函数32-2来访问存储器组30-2,但是在搜索具有两倍、三倍或四倍于最小关键字大小的查找关键字时则使用散列函数32-1。 For example, in the exemplary embodiment of FIG. 2, the smallest key size having a search key in the search using the hash function 32-2 to 30-2 when the memory bank access, but searching with twice, three or four times if a search keyword in the minimum size of the hash function 32-1. 作为另一个示例，在一个实施例中，在搜索具有最小关键字大小的查找关键字时使用散列函数32-4来访问存储器组30-4，在搜索具有两倍于最小关键字大小的查找关键字时使用散列函数32-3,并且在搜索具有四倍于最小关键字大小的查找关键字时则使用散列函数32-1。 Using a hash function as another example, in one embodiment, the minimum search key in the search key having a size of 32-4 to 30-4 accesses the memory group, a lookup twice the minimum size of the search keywords use keyword hash function 32-3, 32-1 and then use the hash function when searching find keywords have four times the minimum key size.
在一些实施例中，针对特定关键字大小所提供的散列表在存储相对应的散列关键字分段的存储器组的方面能够有所重叠。  In some embodiments, for a particular keyword hash table size is provided in the memory segment corresponding to the hash key memory bank can overlap. 然而，在图2的示例实施例中，各种散列表被限制到特定存储器组30而使得并没有针对单个关键字大小的两个散列表被存储或部分存储在相同的存储器组中。 However, in the example of FIG. 2 embodiment, various hash table is limited to the particular memory bank 30 so that no two hash tables for the size of individual keywords stored or partially stored in the same memory bank. 例如，在一个实施例中，两倍于最小关键字大小的关键字无法被插入到存储器组30_2和30-3中所存储的散列表之中，并且三倍于最小关键字大小的关键则无法被插入到存储在存储器组30-2、30-3和30-4中的散列表之中。 Key example, in one embodiment, at twice the smallest key size key can not be inserted into the hash table 30_2 memory banks 30-3 and stored, and three times the smallest key size is not It is inserted into a group stored in the memory 30-2, 30-3 and 30-4 in the hash table. 更一般地，在具有类似于存储器组30的N个存储器组的一些实施例中，针对具有大小K倍于最小关键字大小(K是整数，并且K[i]是散列关键字的第i个分段)的关键字的（多个)散列表被部署为使得一个或多个散列表中的每一个的第一散列关键字分段(K)被存储在B，B[K]，B[2K]，B[3K]，…，B [max_location]，其中B[i]是第i个存储器组，其中max_location等于NK-mod (N/K)，并且其中每个散列表的散列关键字分段K[i]被存储在作为存储散列表的K散列关键字分段的存储器组上方的第i个存储器组的存储器组中。 More generally, in some embodiments, a memory having a similar set of N memory group 30, the hash key for the i having the smallest key size K times the size (K is an integer, and K [i] is segments) of the keyword (s) are deployed to the hash table such that a first hash key segment or a plurality of hash tables each one of the (K ) is stored in a B  , B [K], B [2K], B [3K], ..., B [max_location], where B [i] is the i-th memory groups, wherein max_location equals NK-mod (N / K), and wherein each hash key hash table segments K [i] is stored as a hash table of K  is the i-th memory bank group of memory above the memory bank hash keys stored in the segment. 在一些实施例中，以这种方式部署散列表防止了错误肯定（g卩，其中针对并非确实在多散列查找表中具有条目的关键字而错误地返回匹配条目的情形）。 In some embodiments, the hash table is deployed in this manner prevents false positives (g Jie, which is not really in for a keyword look-up table having multiple entries in the hash and returns an error situation matching entries). 应用上述一般规则的一个示例实施例对应于图2中所看到的各个散列表。 An example of application of the above embodiment corresponds to the general rule can be seen in Figure 2 the various embodiments hash table. 作为另一个示例，向具有六个存储器组（即，N = 6)的实施例应用该一般规则针对双倍于最小关键字大小的关键字产生三个非重叠散列表，针对三倍于最小关键字大小的关键字产生两个非重叠散列表，针对四倍于最小关键字大小的关键字产生一个散列表，针对五倍于最小关键字大小的关键字产生一个散列表，并且针对六倍于最小关键字大小的关键字产生一个散列表。 As another example, the general rules apply to the embodiment has six memory banks (i.e., N = 6) generating three non-overlapping hash key for doubling the smallest key size for three times the minimum critical word size to produce two non-overlapping keyword hash table, is generated for the smallest key in the key four times the size of a hash table, a hash table is generated for the smallest key size of the key five times, and six times for the minimum size of the keyword keyword generates a hash table. 当然，在任意的这些实施例中，无需针对并未预期使用的关键字大小定义或提供散列表。 Of course, any of these embodiments, without the need for the intended use of keywords does not define or provide hash table size.
如以上所提到的，在一些实施例中，关键字搜索/插入单元22基于哪些散列表被填充最多而插入关键字，和/或使用cuckoo算法插入关键字。  As mentioned above, in some embodiments, a keyword search / insertion unit 22 based on which the hash table is filled up and the insertion key, and / or insertion key algorithm cuckoo. 在其中实施cuckoo算法的一些实施例中，关键字搜索/插入单元22无论原有关键字是否比新关键字更小、相等或更大都能够清空现有条目以存储新的关键字/条目。 In some embodiments in which the embodiment cuckoo algorithm, the search keyword / key insertion unit 22 regardless of whether the original is smaller than the new keyword, equal to or greater can be cleared prior to the entry of new keyword storage / entry. 在一个实施例或情形中，例如，关键字搜索/插入单元22能够将具有两倍最小关键字大小的新的关键字插入到相邻存储器组中的一对地址中， 这是通过清空那些地址之一或二者处的最小大小的关键字，通过清空同样具有两倍最小关键字大小的同一对地址的关键字，或者通过清空具有至少三倍最小关键字大小的同一对地址（以及另外的一个或多个地址)的关键字来实现的。 In one embodiment or scenario, for example, a keyword search / insertion unit 22 having a new keyword can be twice the size of the smallest key is inserted into a group of adjacent memory address, the address of which is that by emptying the minimum size at one or both of a keyword, the same keyword by emptying also has twice the smallest key size for the address, or by emptying the smallest key at least three times with the same address size (as well as additional one or more addresses) keywords to achieve.
在该第一精确匹配查找技术的一些实施例中，如以上关于表格填充/关键字插入所描述的，关键字搜索/插入单元22使用相同散列表和散列函数(S卩，如通过关键字大小所定义的)执行搜索/查找。  In some embodiments of the first exact-match lookup art, as described above with respect to the form fill / keyword insertion as described, the keyword search / insertion unit 22 uses the same hash function and hash table (S Jie, such as ) performs a search defined by the size of the keywords / search. 例如，在一个实施例中，针对最小大小的关键字对散列表60进行搜索，针对具有两倍最小大小的关键字对散列表62进行搜索，针对具有三倍最小大小的关键字对散列表64进行搜索，并且针对具有四倍最小大小的关键字对散列表66进行搜索。 For example, in one embodiment, the minimum size for the keyword hash table 60 searches for the hash table 62 to search for a keyword has twice the minimum size for keywords having three times the minimum size of the hash table 64 search, and search for the hash table 66 for the keyword has four times the minimum size. 在其中针对特定关键字大小提供多个散列表的一个实施例中，在利用具有该关键字大小的关键字进行搜索时对每个散列表进行并行搜索。 Wherein a plurality of the hash table size for a specific keyword one embodiment, with the use of parallel search for each hash table when the keyword search keyword size. 例如，在图2的示例实施例中，在针对具有两倍最小关键字大小的关键字执行查找时对散列表62-1和62-2进行并行搜索。 For example, in the exemplary embodiment of FIG. 2 embodiment, a parallel search of the hash tables 62-1 and 62-2 at the time of performing a lookup for keywords with twice the smallest key size. 在备选实施例中，以串行方式对散列表进行搜索直至找到匹配条目。 In an alternative embodiment, a serial manner to the hash table to search until it finds a matching entry.
在一个实施例中，查找匹配在针对特定关键字所计算的所有散列关键字分段与特定散列表中的相对应地址处所存储的所有条目都匹配的情况下得以实现。  In one embodiment, to find a match is achieved when all the computed hash key for a particular segment and all keywords corresponding to the entry address stored at a particular hash list are matched. 例如，在其中使用具有两倍最小关键字大小的关键字执行查找的一个实施例和情形中，当散列函数32-3分别在地址54-3和56_3形成散列关键字分段C1和C2时返回匹配。 For example, where a keyword having a keyword performed twice the minimum size of a lookup embodiment examples and case, when a hash function 32-3 and 54-3 are formed in the address segment 56_3 hash keys C1 and C2 return match. 在一些实施例中，每个散列关键字分段连同指示对应于该条目的关键字的大小的信息一起进行存储以便减少或消除错误肯定。 In some embodiments, each segment hash keys together with the information indicating the size of the entry corresponding to the keyword is stored together so as to reduce or eliminate false positives. 例如，在一个实施例和情形中，散列关键字分段“B1”和“B2”（分别处于地址50-2 和52_2)均连同指示该分段属于双倍最小大小的关键字的条目的信息一起存储在相应存储器组中。 For example, in one embodiment, and in the case, the segment hash key "B1" and "B2" (and 52_2 respectively in the address 50-2) each segment along with an indication that the entry belongs to double the minimum size of keywords information is stored in the corresponding memory bank. 在一个实施例中，关键字搜索/插入单元22在检测到匹配时获取到该关键字大小信息，并且使用该关键字大小信息来确定匹配是否有效。 In one embodiment, a keyword search / insertion unit 22 acquires a match is detected the size of the key information, and uses this information to determine the size of the keyword matching is valid. 例如，在其中关键字搜索/插入单元22使用最小大小的关键字执行查找的一个实施例和情形中，应用散列函数32-2导致地址/散列值52-2,其同样恰好对应于已经存储在多散列查找表26中的较大关键字的散列位置之一（“B2”）。 For example, in one embodiment, the case 22 and the minimum size of a keyword performed using lookup keyword search / insertion unit, applying the hash function causes the address 32-2 / 52-2 hash value, which corresponds exactly to the same has been hash stored in one location more than 26 keywords in the larger hash lookup table ( "B2"). 在该实施例/情形中，关键字搜索/插入单元22获取与散列关键字分段“B2”相关联的关键字大小信息，并且使用该信息来确定该匹配对于最小大小关键字的搜索并不有效。 In this embodiment / the case, the keyword search / insertion unit 22 acquires the hash key segment "B2" size information associated with the keyword, and use this information to determine the minimum size matching the search keyword and It is not valid.
[OOM]接下来参考图3,其图示了第二精确匹配查找技术的一个示例实施例，所看到的是，查找存储器24的存储器组30-1至30-4中的每一个同样存储多散列查找表26的相应部分，其中每个存储器组30-1至30-4同样被配置为在有限数量的散列表地址中的每一个中存储多达一个的散列关键字分段。 [The OOM] Referring next to FIG. 3, which illustrates a second exemplary embodiment exact-match lookup techniques embodiment, is seen, the lookup memory 24 of the memory banks 30-1 to 30-4 each storing the same multi-lookup hash table corresponding portion 26, wherein each memory bank 30-1 to 30-4 is similarly configured for each of a limited number stored in the hash table address up to a segment of the hash key. 在一个实施例中，当应用相对应的散列函数时，各个散列表部分的每个地址对应于单个散列值，并且存储器组30-1至30-4中的每一个具有等于单个散列关键字分段的大小(位计数)的宽度。 In one embodiment, when the application corresponding to the hash function, the hash table for each address of each portion corresponds to a single hash value, and the memory banks 30-1 to 30-4 each having a single hash equals the width of the segment key size (bit count) of.
不同于图2,图3并未示出每个散列表部分中的所有可能地址位置，而是仅图示了在特定情形中被主动用来存储散列关键字分段的各个地址中的一些。  Unlike FIG. 2, FIG. 3 does not show all possible positions each hash table address portion, but shows only the respective addresses are used to store the active segment of the hash keys in a particular situation Some. 然而，与图2以及第一精确匹配查找技术相同，注意，在各个不同实施例中，每个散列表部分能够包括均能够保存散列关键字分段的任意适当数量的地址(例如，256、1000等）。 However, to find the exact same as the first 2, and FIG matching technology is noted that in various embodiments, each hash table capable of holding portion can include any suitable number of each address (e.g., hash key segments 256, 1000, etc.). 同样与图2以及第一精确匹配查找技术相同，多散列查找表26的其它实施例包括存储在其它数量的存储器组30 (例如，2、 3、5、6等)之中的其它数量的散列表部分。 2 and the same first look exactly the same as FIG matching technique, multiple hash lookup table 26. Other embodiments include other numbers of other numbers stored in the memory bank 30 (e.g., 2, 5, 6, etc.) of hash part.
当根据第二精确匹配查找技术以及图3的示例实施例进行操作时，关键字搜索/插入单元22通过首先接收要被插入到多散列查找表26的条目之中的关键字和相关联信息(例如，诸如以上结合图2和第一精确匹配查找技术所描述的关键字类型和/或大小中的任意一种)来填充多散列查找表26。  When the find technical and example of Figure 3 according to a second embodiment operates an exact match, a keyword search / insertion unit 22 receives the first to be inserted into multiple search keys in the hash table entry 26 and associated information (e.g., such as described above in conjunction with FIGS exact-match lookup and a first keyword technique described type and / or any one size or 2) to fill multiple hash lookup table 26. 在一个实施例中，关键字生成单元20还生成关键字大小的指示符(例如，位计数或者表示大小范围的指示符等），并且将该指示符连同关键字一起或者作为其一部分提供给关键字搜索/插入单元22。 In one embodiment, the key generating unit 20 also generates a key indicator of the size (e.g., an indicator indicating a bit count or size range, etc.), and the indicator, together with the key as the key or part thereof is supplied to the word Search / insertion unit 22.
 在一个实施例中，关键字搜索/插入单元22无论关键字大小如何都向所接收到的关键字应用散列函数32-1至32-4中的每一个，并且确定相对应的散列表部分中的哪一个具有可用地址。  In one embodiment, a keyword search / insertion unit 22 regardless of the size of keywords are received by the keyword hash function is applied to each of the 32-1 32-4, and determines the corresponding hash portion which has available addresses. 如果，针对K倍于最小关键字大小的关键字而言，能够在存储器组30的至少K个不同的组中获得散列值/地址，则关键字搜索/插入单元22将相应散列关键字分段插入到K 个不同存储器组30中的每一个之中。 If,, it is possible to obtain a hash value / address at least K different groups of memory banks 30 for K times the smallest key size in terms of keywords, the keyword search / inserting unit 22 corresponding hash key segment is inserted into K different memory banks 30 in each of. 而第一精确匹配查找技术(针对图2的示例实施例）则仅将较大关键字的散列关键字分段插入到相邻存储器组30中所存储的散列表部分之中，在至少一些实施例中，第二精确匹配查找技术允许较大关键字的散列关键字分段被存储在任意可用存储器组30的地址之中（多达每个存储器组30—个地址）。 And the first exact-match lookup technique (for the example embodiment of FIG. 2) only the larger hash key inserted into the key segment portions adjacent memory hash table 30 stored in the group, at least some of the embodiment, the exact-match lookup second technique allows greater keyword hash key segments are in the address of any group 30 of memory available (up to 30- addresses each memory bank) is stored. 在这些实施例中的一些中，放松对于可接受的散列关键字分段位置的限制允许查找存储器24至少在空间利用方面得到更为有效的利用。 In some of these embodiments, the relaxed allowing for an acceptable limit position hash key lookup memory segment 24 to get at least more efficient use of space utilization. 然而，在一个实施例中，针对大于最小关键字大小的关键字，关键字搜索/插入单元22通过连同每个散列关键字分段（除了最后分段)一起存储指针而使用附加的存储器。 However, in one embodiment, the keywords for the keyword is greater than the minimum size, a keyword search / insert 22 together with each of the hash key segment (except the last segment) is stored together with the pointer by the use of additional memory cells. 在一个实施例中，该指针被用来将对应于单个关键字的每个散列关键字分段进行连接。 In one embodiment, the pointers are used to correspond to a single hash key segment of each keyword connection. 另外，在一些实施例中，关键字搜索/插入单元22连同至少一些散列关键字分段存储其它信息，诸如关键字大小的指示符和/或对应于单个关键字的一系列散列关键字分段内的片段数量的指示符。 Further, in some embodiments, the keyword search / or other information inserting unit together with at least some of the hash key storage segment 22, such as a key indicator of the size and / or number of keywords corresponding to a single hash key indicator segment number within a segment. 如以下将更为详细描述的，该指针（以及如果存在的话，关键字大小和/或片段数量的指示符)允许所存储的关键字在执行搜索时被重构。 As will be described in more detail, the pointer (and, if present, the key size and / or number of indicator segments) allows the stored keyword when performing a search is reconstructed.
在图3的示例实施例和情形中，关键字搜索/插入单元22成功地将对应于最小大小的关键字的散列关键字分段“A”插入到存储器组30-2中所存储的散列表部分的地址80-1 中，成功地将对应于两倍于最小大小的关键字的散列关键字分段“B1”和“B2”插入到存储器组30-1和30-3中分别所存储的散列表部分的地址82-1和82-2中，成功地将对应于两倍于最小大小的关键字的散列关键字分段“C1”和“C2”插入到存储器组30-2和30-4中分别所存储的散列表部分的地址S4-1和S4_2中，成功地将对应于三倍于最小大小的关键字的散列关键字分段“〇1”、“〇2”和“〇3”插入到存储器组30-1、30-3和30-4中分别所存储的散列表部分的地址86-1、86_2和86_3中，并且成功地将对应于四倍于最小大小的关键字的散列关键字分段“El”、“E2”、“E3”和“E4”插入到存储器组30-1、30-2、30_3和30 Hash key segment  In the exemplary embodiment of FIG. 3 and a case, the keyword search / insertion unit 22 successfully minimum size corresponding to the keyword of "A" is inserted into the memory bank 30-2 80-1 hash table address portion stored successfully keyword corresponding to twice the minimum size of the hash key segment "B1" and "B2" is inserted into the memory banks 30-1 and 30-3 address hash portion, respectively, stored in 82-2 and 82-1, successfully twice the minimum size corresponding to the keyword hash key segments "C1" and "C2" is inserted into the memory bank 30-2 and 30-4 of the hash table address portion are respectively stored in S4-1 and S4_2 successfully keyword corresponding to three times the minimum size of the hash key segment "〇1", " 〇2 "and" 〇3 "into the hash table address portion of the memory banks, respectively, 30-1,30-3 and 30-4 and stored 86-1,86_2 86_3, and successfully corresponding to four times hash key segment to the minimum size of the keyword "El", "E2", "E3" and "E4" is inserted into the memory 30 and set 30-1,30-2,30_3 -4中分别所存储的散列表部分的地址88-1、88_2、88_3和88_4中。 -4 88-1,88_2,88_3 hash address portion stored separately and 88_4. 在一个实施例中，图3中的散列关键字分段之间的各种箭头表示随散列关键字分段存储在该箭头的源头处的指针。 In one embodiment embodiment, the segments between the various arrows in FIG hash keys with the hash key segment 3 represents the pointer stored at the source of the arrow. 例如，在图3的实施例和情形中，存储器组30-1的地址82-1存储从“B1”到“B2”的指针，存储器组30-2的地址84-1存储从“C1”到“C2”的指针，等等。 For example, in the case of the embodiment and FIG. 3, the memory bank address storage 30-1 82-1 from "B1" pointer "B2", the memory bank address memory 84-1 30-2 from "C1" to "C2" pointers, and the like.
 在一些实施例中，关键字搜索/插入单元22基于哪个散列表部分被填充最多而插入关键字，和/或使用cuckoo算法插入关键字。  In some embodiments, the keyword search / insertion unit 22 which is based in part on the hash table is filled up and the insertion key, and / or insertion key algorithm cuckoo. 在一些实施例中，结合这里所描述的技术实施美国专利申请No. 13/737608和/或美国专利申请No. 14/012834中所描述的任意适当的关键字插入的（多种)技术或（多种)算法。 In some embodiments, the techniques described herein in conjunction with embodiments of U.S. Patent Application No. 13/737608 and / or U.S. Patent Application No. 14/012834 any suitable keywords described insertion (s) or techniques ( variety) algorithm. 在其中实施cuckoo算法的一些实施例中，关键字搜索/插入单元22无论原有关键字的大小如何都能够清空现有条目以存储新的关键字/条目。 In some of these embodiments algorithm cuckoo embodiment, a keyword search / insertion unit 22 regardless of the size of the original key can be how to empty prior to the entry of new keyword storage / entry.
 在第二精确匹配查找技术的一些实施例中，关键字搜索/插入单元22通过使用相应的散列函数32-1至32-4访问存储在存储器组30-1至30-4中的散列表部分来执行搜索/ 查找。  Some embodiments find an exact match in the second technique, the keyword search / insertion unit 22 by using the corresponding hash function to access memory banks 32-1 to 32-4 30-1 to 30-4 store the portion of hash table to perform a search / find. 在一些实施例中，关键字搜索/插入单元22标识多散列查找表26中位于所产生的地址/散列值处的分段，并且获取与那些匹配分段相关联的任意指针。 In some embodiments, the keyword search / insertion unit 22 identifies the plurality hash lookup address 26 positioned generated segment / hash value at the table, and acquires arbitrary matching those associated pointer segment. 在一些实施例中，关键字搜索/插入单元22还针对一个或多个匹配分段中的每一个获取其它信息，诸如关键字大小和/或分段数量的指示符。 In some embodiments, the keyword search / insertion unit 22 further acquires for each of the one or more segments matching the additional information, keywords indicator size and / or number of such segments. 在一个实施例中，关键字搜索/插入单元22随后使用匹配分段、 指针以及(如果存在)关键字大小和/或分段数量信息来标识多散列查找表26中的哪些分段对应于哪些关键字/条目。 In one embodiment, a keyword search / insertion unit 22 then uses the matching segment, pointers, and keywords size and / or number of segment information (if present) to identify multiple hash lookup table 26 which corresponds to a segment which keywords / entry. 在一个实施例中，如果针对具有大小为K倍于最小关键字大小的所搜索关键字标识出K个匹配分段，并且如果那K个匹配分段经由适当指针进行连接(和/或包括适当的关键字大小和/或分段数量指示符以指示每个匹配的分段是单个关键字条目的一部分），则对应于该K个匹配分段的条目被标识为匹配条目，并且关键字搜索/插入单元22 获取对应于该条目的数值。 In one embodiment, if the identified matching segments K, K, and if that segment via appropriate matching for the search key with the pointer size is K times the size of the smallest key connection (and / or comprise suitable keyword entry size and / or number of segments of each matching segment indicator to indicate that the entry is part of a single key), K corresponds to the matching segments is identified as matching entry, and the keyword search / insertion unit 22 acquires the value corresponding to the entry.
 参考图3的示例情形，在一个实施例中，如果散列函数32-1在地址86-1形成散列关键字分段，散列函数32-3在地址86-2形成散列关键字分段，并且散列函数32-4在地址86-3 形成散列关键字分段（即分别与分段D1、D2和D3相关联的地址），则关键字搜索/插入单元22针对大小三倍于最小关键字大小的关键字标识匹配条目。  Referring to FIG. 3 example scenario, in one embodiment, if the hash function 32-1 86-1 formed in the address segment hash key, the hash function hash address formed 32-3 86-2 keyword segment, the hash function and hash key segment 32-4 is formed in the address 86-3 (i.e. the segments D1, D2 and D3 associated address), the keyword search / insertion unit 22 for three times the size of the keyword keyword identifies the minimum size of the matching entry. 然而，在一个实施例中，关键字搜索/插入单元22仅在获取到从D1到D2的指针以及从D2到D3的指针和/或获取到指示D1为三个分段中的第一个，D2为三个分段中的第二个并且D3为三个分段中的第三个的信息之后才将对应于D1、D2和D3的条目标识为“匹配”条目。 However, in one embodiment, a keyword search / insertion unit 22 acquired only from D1 to D2, and the pointer from the pointer to the D3 and D2 / D1 or acquired as indicated in the first three segments, D2 is the second of three segments after the third and D3 is information in only three segments corresponding to D1, D2 and D3 entries labeled "match" entry. 在一个这样的实施例/情形中，利用散列函数32_2进行散列的结果是无关的，因为关键字搜索/插入单元22能够(基于指针、所搜索关键字的已知大小和/或与匹配分段相关联的关键字大小和/或分段数量信息)辨别出任何匹配分段都不对应于匹配条目的一部分。 In one such embodiment / case, 32_2 hashed using a hash function result is irrelevant, because a keyword search / insertion unit 22 can be (based on the pointer, the known size of the key and / or matching the search keywords associated segment size and / or number of segment information) to identify the part of any matching segment does not correspond to the matching entry.
在其中关键字搜索/插入单元22针对大小三倍于最小关键字大小的关键字执行查找的另一个实施例和情形中，散列函数32-1在地址S2-1形成散列关键字分段，散列函数32_2在地址80-1形成散列关键字分段，散列函数32_3在地址部-3形成散列关键字分段，并且散列函数32_4并未形成匹配分段。  In another where a keyword search / lookup key insertion unit 22 performs three times the size of the smallest key size for the embodiments and situations, the hash function hash key 32-1 are formed in the address S2-1 word segment, the address in the hash function 32_2 hash key segment 80-1 is formed, the hash function 32_3 -3 portion is formed in the address segment hash key and hash function matching segment 32_4 is not formed. 在该实施例/情形中，虽然标识出三个匹配分段，但是关键字搜索/插入单元22并未标识出匹配条目。 In this embodiment / the case, while the matching segment three identified, but a keyword search / insertion unit 22 does not identify a matching entry. 在一个实施例中，关键字搜索/插入单元22 排除地址82-K80-1和86-3处的匹配分段，原因在于它们并未被指针所连接，和/或它们并未包括与所搜索关键字相匹配的其它信息（例如，在一个实施例中，由于关键字搜索/插入单元22确定匹配分段A、B1和B2中的每一个与并不与所搜索关键字的关键字大小指示符相匹配的关键字大小指示符相关联）。 In one embodiment, a keyword search / negative matching segment insertion unit 22 address and 82-K80-1 at 86-3, because they are not connected to the pointer, and / or they do not include the search other information that matches the keyword (e.g., in one embodiment, since the keyword search / inserting unit 22 determines a match with each of the segment does not indicate the size of the keyword search keyword a, B1 and B2 character match keywords associated with the size indicator).
在一些实施例中，（对应于图2的示例实施例的)第一精确匹配查找技术或(对应于图3的示例实施例的）第二精确匹配查找技术结合其它查找技术来使用。  In some embodiments, (corresponding to an example embodiment of FIG. 2) or a first exact-match lookup technique (FIG. 3 corresponds to the example embodiment) of the second exact-match lookup technique used in conjunction with other search techniques . 例如，在一些实施例中，查找存储器24是根据以上所描述的第一或第二精确匹配查找技术的任意实施例执行精确匹配查找的SRAM，并且另一个存储器(例如，三元内容可寻址存储器(TCAM))则被用来执行屏蔽搜索和/或其它精确匹配搜索。 For example, in some embodiments, the lookup memory 24 is an SRAM look any technique performs exact-match lookup of the embodiment according to the first or second embodiment described above exact matches, and the other memory (e.g., ternary content-addressable memory (the TCAM)) were used to perform a search screen and / or other exact match search. 在一个实施例中，根据在美国专利申请No. 13/ 966962中所描述的任意适当技术，并行于SRAM精确匹配查找来使用TCAM查找。 In one embodiment, in accordance with U.S. Patent Application No. 13 any suitable technique / 966962 describes, in parallel to SRAM exact-match lookup is used to find TCAM.
图4是根据一个实施例的使用第一技术执行精确匹配查找的示例方法100的流程图。  FIG. 4 is a flowchart of an exemplary method of using the technique according to the first embodiment performs exact-match lookup 100. 方法100例如在诸如图1的网络设备10的网络设备中实施。 The method of embodiment 100, for example, a network device such as network device 10 of FIG.
在框102,在实施方法1〇〇的网络设备接收网络分组。  In block 102, the network device receives 1〇〇 network packets embodiment method. 在一个实施例中，该网络分组经由该网络设备的接口（例如，图1的端口12之一）而被分组处理器(例如，图1的分组处理器14)所接收。 In one embodiment, the network packet via the interface of the network device (e.g., one of the ports 12 in FIG. 1) is a packet processor (e.g., the packet processor 14 of FIG. 1) received.
 在框104,例如，至少基于该网络分组的报头中所包括的数据和/或其它信息针对在框102所接收的网络分组确定查找关键字，上述其它信息诸如接收到该网络分组的接口。  In block 104, e.g., based on at least the header of the network packet included in the data and / or other information for the network packets at block 102 determined that the received search key, the above-described other information such as receiving the network packet interface. 在一个实施例中，例如，框104由关键字生成单元来实施，诸如图1的关键字生成单元20。 In one embodiment, for example, block 104 is implemented by the key generating means, such as a key generation unit 20 of FIG. 例如，在一些实施例中，查找关键字基于MAC地址、VLAN或双重VLAN标签、IPv4或IPv6地址、隧道信息和/或报头内的任意其它适当信息来确定。 For example, in some embodiments, a search key based on the MAC address, VLAN or double VLAN tag, address, and optionally in the IPv4 or IPv6 tunneling header information and / or other suitable information to determine.
在框106,至少基于查找关键字大小从多个可能的散列函数中选择一个散列函数。  In block 106, based at least on the search key to select the size of the hash function from a plurality of possible hash functions. 在一个实施例中，例如，框1〇6由关键字搜索单元所实施，诸如图1的关键字搜索/插入单元22。 In one embodiment, for example, implemented by a block 1〇6 keyword searching unit, such as a keyword search of FIG. 1 / insertion unit 22. 在一些实施例中，散列函数通过标识/选择散列表(例如，在一个实施例中，通过使用查找关键字大小来确定所要访问的散列表的索引），并且选择对应于存储该散列表的至少一部分的第一存储器组的散列函数而被选择。 In some embodiments, the hash function by identifying / selecting a hash table (e.g., in one embodiment, by using the keyword lookup to determine the size of the hash table index to be accessed), and selects the corresponding stored hash table at least a portion of the hash function of the first memory bank is selected. 在其它实施例中，例如，以另一种适当方式基于关键字大小来选择散列函数，诸如选择对应于存储该散列表的至少一部分的最后存储器组的散列函数。 In other embodiments, for example, in another suitable way to select the size of the hash function based on keywords, such as the selection of the hash table corresponding to the storage of the last hash function of at least a portion of memory banks. 在一些实施例中，查找关键字大小并不是关键字的确切大小，而是用作对应于该查找关键字的单个数据库条目的散列关键字分段的数量的指示符。 In some embodiments, the size of the key to find the exact size is not a keyword, but as a single database entry corresponding to the search key the hash key indicator of the number of segments. 在一个实施例中，在框106基于查找关键字确定关键字大小。 In one embodiment, the size is determined based on a keyword search key at block 106. 在另一个实施例中，关键字大小的指示符在框1〇4 生成并且被附属至查找关键字，包括在其中或者以其它方式与之相关联。 In another embodiment, a keyword generated in block size indicator and the affiliated 1〇4 to the search key included therein or otherwise associated therewith.
[00M]在框1〇8,使用在框1〇6所选择的散列函数对查找关键字执行散列操作以计算出散列查找关键字分段。 [00M] In block 1〇8, at block 1〇6 using the selected search key to perform a hash function to calculate a hash operation key hash lookup segment. 例如，在一个实施例中，框108由关键字搜索单元来实施，诸如图丨的关键字搜索/插入单元22。 For example, in one embodiment, block 108 is implemented by the keyword searching unit, such as a keyword search of FIG Shu / insertion unit 22.
在框110,使用在框1〇8所计算的散列查找关键字分段来查询数据库以提取出精确地对应于查找关键字的数值。  In block 110, the lookup key used to query the database to extract the segment corresponds exactly to the search key values at block 1〇8 the computed hash. 例如，在一个实施例中，框110由关键字搜索单元来实施，诸如图1的关键字搜索/插入单元22。 For example, in one embodiment, block 110 is implemented by the keyword searching unit, such as a keyword search of FIG. 1 / insertion unit 22. 在一个实施例中，在框110所查询的数据库在两个或更多存储器组(例如，SRAM或其它适当存储器一诸如图丨的查找存储器以一的两个或更多存储器组)之间进行分布。 In one embodiment, at block 110 the database query in a group of two or more memories (e.g., SRAM or other suitable memory of FIG Shu lookup memory to a group of two or more memories, such as a) in between distributed. 例如，在其中从N个可能的散列函数(其中N是大于丨的整数）中选择散列函数(在框106)的一个实施例中，在框11〇所查询的数据库在均对应于N个可能散列函数中不同的一个的N个存储器组之间进行分布。 An example embodiment, in which the N possible hash function (where N is an integer greater than Shu) is selected hash function (at block 106), the database is queried at block 11〇 corresponds to the N possible hash function among different one of the N memory groups distributed. 在一些实施例中，该数据库通过使用散列查找关键字分段来访问两个或更多存储器组中的至少两个不同的组中的每一个而被查询。 In some embodiments, the database search keys to access each segment is a query of two or more memory banks at least two different groups by using a hash. ^一些实施例中，在框108所计算的散列查找关键字分段具有等于两个或更多存储器组中的每一个的宽度的大小(位长度）。 ^ Some embodiments, looking up in block 108 the computed hash key segments having two or equal size (bit length) of a width more memory banks each.
在一些实施例中，在框110查询数据库包括并行地并且使用散列查找关键字分段来访问两个或更多存储器组中的两个或更多不同组中的每一个以标识两个或更多的相应匹配分段，获取与该两个或更多匹配分段中的至少一个相关联的至少一个关键字大小指示符，并且至少基于两个或更多匹配分段以及(多个)关键字大小指示符而标识该数据库中的匹配分段。  In some embodiments, at block 110 the database query includes a parallel key and a hash lookup segment to access two or more memory banks each of two or more different groups to identify two or more corresponding matching segment, to obtain the two or more segments matching at least one of the at least one keyword associated with the size indicator, based on at least two or more segments, and the matching ( s) and key size indicator identifying matching segment of the database. 在一个这样的实施例中，精确地对应于查找关键字的数值是与所标识的匹配条目相关联的数值。 In one such embodiment, it corresponds exactly to find the key value is a value associated with the matching entry in the identified.
在一些实施例中，方法100包括并未在图4中看到的一个或多个另外的框。  In some embodiments, the method 100 includes not seen in FIG. 4 one or more additional blocks. 例如，在一个实施例中，方法100包括类似于框106和108的另外的框，但是其用于选择对应于该数据库中的不同散列表的不同散列函数，以及用于计算不同的散列查找关键字分段。 For example, in one embodiment, the method 100 includes additional block 106 and similar to block 108, but it corresponds to the database for selecting a different hash functions different hash table, and for calculating a hash different Find keyword segments. 在一个实施例和/或情形中，在类似于框110的框中使用不同的散列查找关键字分段来查询数据库，但是并未标识出匹配条目，并且因此没有提取出精确地对应于查找关键字的数值。 In the embodiment and / or in the case of an embodiment, analogous to look in a different frame box hash key segment 110 to query the database, but does not identify the matching entry, and thus is not extracted corresponds exactly to find value keywords.
图5是根据一个实施例的用于使用第一技术填充精确匹配查找表的示例方法12〇的流程图。  FIG. 5 is a flowchart of an example method 12〇 using a first technique for filling an exact-match lookup table embodiment. 例如，方法12〇例如在诸如图1的网络设备10的网络设备中实施。 For example, in the embodiment, for example, a method 12〇 network device such as network device 10 of FIG.
在框122,确定要被存储在分布于两个或更多存储器组(例如，SRAM或其它适当存储器的两个或更多存储器组)之间的数据库中的查找关键字。  In block 122, the lookup key is determined to be stored in a database located in two or more memory banks (e.g., SRAM or other suitable memory two or more memory banks) in between. 在一个实施例中，框122例如由诸如图1的关键字生成单元20的关键字生成单元来实施。 In one embodiment, block 122 may be implemented by a key generating unit key generating unit 20 of FIG. 1 for example. 例如，在一些实施例中，查找关键字基于MAC地址、VLAN或双重VLAN标签、IPv4或IPv6地址、隧道信息和/或报头内的任意其它适当信息和/或基于例如诸如接收到分组的接口的其它信息来确定。 For example, in some embodiments, a search key based on the MAC address, VLAN or double VLAN tag, address, and any IPv4 or IPv6 tunnel / or information within the header other suitable information and / or based on an interface such as for example the received packet is other information to determine.
在框124,至少基于在框122所确定的查找关键字的大小从两个或更多存储器组中选择第一存储器组，并且从多个可能散列函数中选择一个散列函数。  In block 124, based at least on the size of the search key selection block 122 determines a first memory bank from two or more memory banks, and a hash function selected from a plurality of possible hash functions. 例如，在一个实施例中，框124由诸如图1的关键字搜索/插入单元22的关键字插入单元来实施。 For example, in one embodiment, the block 124 of FIG. 1, such as a search keyword / key insertion unit 22 to implement insertion unit. 例如，在其中从n 个可能的散列函数(其中N是大于1的整数)中选择散列函数的一个实施例中，该数据库在均对应于N个可能散列函数中不同的一个的N个存储器组之间进行分布。 For example, where the n possible hash function (where N is an integer greater than 1) hash function selected one embodiment, the database corresponds to the hash function N possible different one of N for distribution among the memory banks. 在一些实施例中，该第一存储器组是被用来存储对应于该查找关键字的散列查找关键字分段的K个存储器组中的第一个，并且所选择的散列函数通过标识/选择该第一存储器组（或者通过标识/选择在该第一存储器组开始的散列表，等等)而被选择。 In some embodiments, the first set of memory is used to store hashes corresponding to the search key to find the first key segment of the K memory banks, and a hash function selected by identifying / selecting the first memory bank (or by identifying / selecting the first hash table in the memory set start, etc.) is selected. 在一个实施例中，关键字大小在框124基于查找关键字确定。 In one embodiment, the key size is determined at block 124 based on the lookup key. 在另一个实施例中，关键字大小的指示符在框122生成并且被附属至查找夫键字，包括在其中或者以其它方式与之相关联。 In another embodiment, the size of the key at block 122 and the indicator generation to find the affiliated husband key word included therein or otherwise associated therewith.
[0071 ]在框126，使用在框124所选择的散列函数对查找关键字执行散列操作以计算出第一散列查找关键字分段。  In block 126, the hash function used at block 124 performs selection of a search key hash operation to calculate a first hash key lookup segment. 例如，在一个实施例中，框丨26由诸如图丨的关键字搜索/插入单元22的关键字插入单元来实施。 For example, in one embodiment, such as illustrated by the block 26 Shu Shu keyword search / insertion unit key insertion unit 22 to FIG. 在一些实施例中，在框12e所计算的第一散列查找关键字分段具有等于两个或更多存储器组中的每一个的宽度的大小(位长度)。 In some embodiments, the first hash computed at block 12e search key segment having a width equal to the size of two or more memory banks each (bit length).
在框130，对应于该查找关键字的一个或多个其它散列查找关键字分段被存储在该两个或更多存储器组中的一个或多个后续存储器组中。  In block 130, corresponding to one or more of the other hash lookup keyword search key segments are stored in a memory of the two or more groups of one or more subsequent memory banks. 例如，在一个实施例中，框13〇由诸如图1的关键字搜索/插入单元22的关键字插入单元来实施。 For example, in one embodiment, by the keyword search such as block 13〇 FIG. 1 / insertion unit key insertion unit 22 to FIG. 在一个实施例中，该一个或多个后续存储器组与在框124所选择的第一存储器组相邻。 In one embodiment, the one or more subsequent memory groups in the first memory block group 124 adjacent to a selected. 在其中在插入大于最小关键字大小的关键字时使用相同散列函数来访问多个存储器组中的每一个的实施例中，存储在后续(例如，相邻)存储器组中的一个或多个其它散列查找关键字分段中的每一个精确地等于该第一散列查找关键字分段。 Using the same hash function wherein the insertion key is larger than the minimum size of the key to access a plurality of memory banks embodiments each, the subsequent storage (e.g., adjacent) memory banks in one or more of other hash lookup key segments each exactly equal to the first key hash lookup segment. 在其它实施例中，一个或多个其它散列查找关键字分段使用不同散列函数来计算，因此不同于第一散列查找关键字。 In other embodiments, one or more other segments using different search keys hash function to calculate a hash, so different from the first hash lookup key.
在一些实施例中，方法120包括并未在图5中看到的一个或多个另外的框。  In some embodiments, method 120 includes not seen in FIG. 5, one or more additional blocks. 例如，在一个实施例中，方法12〇包括类似于框124和126的另外的框，但是对应于在框130所存储的一个或多个其它散列查找关键字分段。 For example, in one embodiment, the method comprises 12〇 similar to block 124 and another block 126, but the segment corresponding to the search key at a block 130 or more other stored hash. 作为另一个示例，在一个实施例中，方法120进一步包括其中确定数据库中的一个或多个现有条目是否能够移动至该数据库中新的位置的框。 As another example, in one embodiment, method 120 further comprises determining whether the database and wherein one or more existing entries in the database can be moved to a new block location. 在一个这样的实施例和情形中，（多个)现有条目是对应于比在框122所确定的查找关键字更大的另一个查找关键字的单个条目，或者对应于比在框122所确定的查找关键字更小的两个或更多其它查找关键字的两个或更多条目。 In one embodiment, such a case and, (s) existing entry corresponding to the search key is larger than the other block 122 the determined search key a single entry, or corresponding to the ratio at block 122 Find keywords identified two smaller two or more other search keywords or more entries. 此外，在一个实施例中，在框128存储第一散列查找关键字分段(和/或在框13〇存储一个或多个其它散列查找关键字分段）响应于一个或多个现有条目中的每一个能够移动至该数据库中新的位置而执行。 Further, in one embodiment embodiment, the search key 128 is stored in block segment first hash (and / or segment in the search key 13〇 storage block or other hash) in response to one or more existing each entry has a database and can be moved to the new location is performed.
 图6是根据一个实施例的使用第二技术执行精确匹配查找的示例方法140的流程图。  FIG. 6 is a flowchart illustrating an example method 140 according to a second embodiment using the technique of the embodiment performs exact-match lookup. 方法140例如在诸如图1的网络设备丨〇的网络设备中实施。 The method of embodiment 140, for example, a network device such as a network device Shu square in FIG. 1.
 在框142,在实施方法140的网络设备接收网络分组。  In block 142, the packet in a network device 140 of the embodiment method of receiving network. 在一个实施例中，该网络分组经由该网络设备的接口（例如，图1的端口12之一)而被分组处理器(例如，图1的分组处理器14)所接收。 In one embodiment, the network packet via the interface of the network device (e.g., one of the ports 12 in FIG. 1) is a packet processor (e.g., the packet processor 14 of FIG. 1) received.
 在框144,例如，至少基于该网络分组的报头中所包括的数据和/或其它信息针对在框142所接收的网络分组确定查找关键字，上述其它信息诸如接收到该网络分组的接口。  In block 144, e.g., based on at least the header of the network packet included in the data and / or other information for the network packets at block 142 determined that the received search key, the above-described other information such as receiving the network packet interface. 在一个实施例中，例如，框144由关键字生成单元来实施，诸如图1的关键字生成单元20。 In one embodiment, for example, block 144 is implemented by the key generating means, such as a key generation unit 20 of FIG. 例如，在一些实施例中，查找关键字基于MAC地址、VLAN或双重VLAN标签、IPv4或IPv6地址、隧道信息和/或报头内的任意其它适当信息来确定。 For example, in some embodiments, a search key based on the MAC address, VLAN or double VLAN tag, address, and optionally in the IPv4 or IPv6 tunneling header information and / or other suitable information to determine.
在框146,使用两个或更多相应散列函数对(在框144确定的）查找关键字执行两个或更多散列操作以计算出两个或更多的相应散列查找关键字分段。  At block 146, two or more corresponding hash function (determined at block 144) the search key to perform two or more of hashing operations to two or more respective calculated hash lookup keyword segments. 例如，在一个实施例中，框14e由诸如图1的关键字搜索/插入单元22的关键字搜索单元来实施。 For example, in one embodiment, the frame 14e in FIG. 1, such as a keyword search / insertion unit keyword searching unit 22 is implemented.
 在框148 (包括框150、152和154)，使用在框146所计算的两个或更多散列查找关键字分段来查询数据库以提取出精确地对应于该查找关键字的数值。  In block 148 (including blocks 150, 152 and 154), in two or more segments hash lookup key to query the database to extract the block 146 corresponds exactly to the calculated search key value. 例如，在一个实施例中， 框148由诸如图1的关键字搜索/插入单元22的关键字搜索单元来实施。 For example, in one embodiment, be implemented by the block 148 of FIG. 1, such as a keyword search / insertion unit keyword searching unit 22. 在框148所查询的数据库在两个或更多存储器组(例如，SRAM或其它适当存储器的两个或更多存储器组)之间进行分布。 Distributed between two or more memory banks (e.g., SRAM or other suitable memory two or more memory banks) in block 148 the database query. 例如，在一个实施例中，该数据库在均对应于N个散列函数中不同的一个的N个存储器组之间进行分布，并且框14e的散列操作包括使用该N个不同散列函数的N个散列操作。 For example, in one embodiment, the database is distributed between both correspond to the hash function of the N N a different memory groups, and the frame 14e of the hash operation comprises using a different hash function N N hash operations. 此外，在一些实施例中，在框146所计算的每个散列查找关键字分段具有等于两个或更多存储器组中的每一个的宽度的大小(位长度）。 Further, in some embodiments, each hash lookup at block 146 the computed key segments having a width equal to the size of two or more memory banks each (bit length).
在框150,使用在框146所计算的散列查找关键字分段来访问两个或更多存储器组以标识出两个或更多相应的匹配分段。  In block 150, in block 146 the computed hash key lookup segment to access two or more memory banks to identify two or more respective matching segment. 在一些实施例中，该两个或更多存储器组全部被并行访问。 In some embodiments, the two or more memory banks are all parallel access. 在其它实施例中，该存储器组被至少部分顺序地访问。 In other embodiments, the memory bank is at least partially accessed sequentially.
 在框152,获取与在框150所标识的匹配分段中的至少一个相关联的至少一个指针。  At block 152, obtain at least one pointer to at least one associated matching segment at block 150 the identified. 在一个实施例中，所获取的（多个)指针至少包括与匹配分段中的第一匹配分段相关联的第一指针，其中该第一指针指示匹配分段中的第二匹配分段在存储器组中的位置。 In one embodiment, the acquired (s) comprising at least a first pointer to a pointer associated with the first matching matching segment in the segment, wherein the first pointer indicates the second matching matching segment in the segment location in the memory group.
在框154,使用在框152所获取到的（多个)指针对在框15〇所标识的匹配分段中的至少两个进行组合以标识该数据库中的匹配条目。  In block 154, at block 152 using the acquired (s) means for matching segment in the block 15〇 identified at least two are combined to identify a matching entry in the database. 在一个实施例中，所重构/组合的关键字是否被确定为匹配条目至少部分取决于该查找关键字的大小。 Whether In one embodiment, the reconstructed / keyword combination is determined to be at least partially dependent of the matching entry to find the size of the keyword. 在一个实施例中，查找关键字的大小在框B4基于查找关键字自身来确定。 In one embodiment, the size of a lookup based on keywords in the search key block B4 itself determined. 在另一个实施例中，关键字大小的指示符在框144生成并且被附属至查找关键字，包括在其中或者以其它方式与之相关联。 In another embodiment, the size of the key at block 144 and the indicator generation is subsidiary to the lookup key, included therein or otherwise associated therewith. 在一个实施例中，（在框148提取的）精确地对应于查找关键字的数值是与所标识的匹配条目相关联的数值。 In one embodiment, the (extracted at block 148) corresponds exactly with the matching entry is a numerical value associated with the identified keywords to find values.
在一些实施例中，方法140包括并未在图6中看到的一个或多个另外的框。  In some embodiments, the method 140 includes not seen in FIG. 6 with one or more additional blocks. 例如，在一个实施例中，方法140进一步包括其中获取与匹配分段中的至少一个相关联的关键字大小指不符的框。 For example, in one embodiment, method 140 further comprises a frame wherein the size of the keyword matching segment in acquiring at least one associated finger inconsistent. 在一个这样的实施例中，框154包括使用所获取到的（多个)指针以及所获取到的关键字大小指示符对匹配分段进行组合。 In one such embodiment, block 154 includes using the acquired (s) and a pointer to the acquired keyword matching segment size indicator to be combined.
注意，方法140对应于其中搜索至少具有两倍于最小关键字长度的查找关键字的实施例和情形。  Note that the method 140 corresponds to a search wherein the case has at least twice the embodiment and the search key smallest key length. 在对应于最小长度的查找关键字的一些实施例和情形中，至少框152和154 被省略。 In the case of some embodiments and corresponding to a minimum length of the search key, at least 154, and block 152 is omitted.
图7是根据一个实施例的用于使用第二技术填充精确匹配查找表的示例方法160 的流程图。  FIG. 7 is a flowchart of an example method 160 for using a second technique to fill an exact-match lookup table embodiment. 例如，方法160例如在诸如图1的网络设备1 〇的网络设备中实施。 For example, a method embodiment 160, for example, such as a square in FIG. 1 of the network device the network device.
在框162,确定要被存储在分布于两个或更多存储器组(例如，SRAM或其它适当存储器的两个或更多存储器组)之间的数据库中的查找关键字。  In block 162, the lookup key is determined to be stored in a database located in two or more memory banks (e.g., SRAM or other suitable memory two or more memory banks) in between. 在一个实施例中，框162例如由诸如图1的关键字生成单元20的关键字生成单元来实施。 In one embodiment, block 162, for example, a key generating unit implemented keyword generation unit 20 of FIG. 1 for example. 例如，在一些实施例中，查找关键字基于MAC地址、VLAN或双重VLAN标签、IPv4或IPv6地址、隧道信息和/或报头内的任意其它适当信息和/或基于其它信息来确定，例如，上述其它信息诸如接收到分组的接口。 For example, in some embodiments, the lookup key MAC address, VLAN or double VLAN tag, the IPv4 or IPv6 address, and optionally in the header tunnel information and / or other suitable information and / or based on other information determined based on, e.g., the above-described other information such as the received packet to the interface.
在框W4,使用两个或更多散列函数对查找关键字执行两个或更多散列操作以计算出两个或更多相应的散列查找关键字分段。  In block W4, using two or more search key performs a hash function on the two or more two or more hash operation to calculate the corresponding hash key lookup segment. 例如，在一个实施例中，框164由诸如图1的关键字搜索/插入单元22的关键字插入单元来实施。 For example, in one embodiment, the block 164 of FIG. 1, such as a search keyword / key insertion unit 22 to implement insertion unit. 该散列查找关键字分段至少包括第一散列查找关键字分段和第二散列查找关键字分段。 The hash lookup key segment comprises at least a first segment and a second key hash lookup hash lookup key segment. 在一些实施例中，在框164所计算的散列查找关键字分段具有等于两个或更多存储器组中的每一个的宽度的大小(位长度）。 In some embodiments, the block 164 to find the computed hash key segment having a width equal to the size of two or more memory banks each (bit length). 山此8」、在枢166,该苐一散列查找关键字分段被存储（写入)到两个或更多存储器组中的第存储器组中。 This Mountain 8 ", the pivot 166, a hash lookup of the Ti key segments are stored (written) to two or more memory banks in the first memory bank. 在框168,该桌一散列查找关键字分段被存储(写入)到两个或更多存储器组中不同的第二存储器组中。 In block 168, a hash lookup tables the key segments are stored (written) to a group of two or more second memory in different memory banks. 例如，在一个实施例中，框丨明和“8由诸如图1的关键字搜索/插入单元22的关键字插入单元来实施。在一些实施例中，框丨明和ie8并行执行。在一些实施例和/或情形中，其中存储第二散列查找关键字分段的第二存储器组与存储第一散g查找关键字分段的第一存储器组并不相邻。在其它实施例和/或情形中，该第二存储器组与g 储第一散列查找关键字分段的第一存储器组相邻。 For example, in one embodiment, blocks Shu Ming and "8. In some embodiments, block Shu Meiwa ie8 performed in parallel by the implemented such as keyword search of FIG. 1 / key unit 22 is inserted into the insertion unit. In some embodiments and / or in the case where the second hashing the lookup key is stored in the second memory segment stores a first set of a first memory group to find scattered g keywords are not adjacent segments. in other embodiments and / or case, the second memory storing the first group g hash lookup of the first memory segment adjacent set of keywords.
在框170,指针被与第一散列查找关键字分段相关联。  In block 170, the pointer is to find a first segment associated with the hash key. 在一个实施例中，该指针指示第二散列查找关键字分段在第二存储器组中的位置(例如，在一个实施例中，指示第二散列查找关键字分段的地址）。 In one embodiment, the pointer of the second search key hash in the second memory segment set in a position (e.g., in one embodiment, indicate that the second hash address search key segment). 在一个实施例中，框17〇由诸如图1的关键字搜索/插入单元22 的关键字插入单元来实施。 In one embodiment embodiment, the search keywords such as a block in FIG 17〇 1 / insertion unit key insertion unit 22 to FIG. 在一个实施例中，该指针通过被写入到(第一存储器组内）与第一散列查找关键字分段相同的存储器位置/地址而与该第一散列查找关键字分段相关联。 In one embodiment, which is written to by the pointer (the first memory group) and the same first hash lookup key memory segment location / address search key segment associated with the first hash .
 在一些实施例中，方法160包括并未在图7中看到的一个或多个另外的框。 One or more additional blocks  In some embodiments, the method 160 includes not seen in FIG. 例如，在一个实施例和/或情形中，方法160包括类似于框I66或168的另外的框，但是其中第三散列查找关键字分段被存储在第三存储器组中（或者第三和第四散列查找关键字分段被存储在第三和第四存储器组中，等等）。 For example, in the embodiments and / or in the case of an embodiment, method 160 includes additional block similar to block 168 or I66, but wherein the third segment is a hash lookup key in a third memory bank (or the third and storage the fourth segment hash lookup key is stored in the third and fourth memory banks, and the like). 作为另一个示例实施例，方法160进一步包括其中关键字大小指示符至少与第一散列查找关键字分段和/或第二散列查找关键字分段相关联的框，和/ 或其中分段数量指示符至少与第一散列查找关键字分段和/或第二散列查找关键字分段相关联的框。 As another example embodiment, the method further comprises where the key 160 lookup size indicator and at least a first hash key segment and / or the second hash lookup key associated segment blocks, and / or wherein the partial the number of segments with at least a first key indicator hash lookup segment and / or the second segment hash lookup key associated frame.
 注意，方法160对应于其中具有至少两倍于最小关键字长度的查找关键字被插入数据库的实施例和情形。  Note that the method 160 corresponds to a search key having at least twice the minimum length of the key is inserted into the database embodiments and scenarios. 在对应于最小长度的查找关键字的一些实施例和情形中，至少框170被省略。 In the case of some embodiments and corresponding to a minimum length of the search key, at least block 170 is omitted.
 虽然已经参考具体示例对本发明进行了描述，但是其意在仅是说明性而并非是对本发明的限制，对于本领域技术人员将会显而易见的是，可以对所描述的实施例进行除了以上所明确描述的那些之外的变化、增加或删除而并不背离本发明的精神和范围。  Although reference to a specific example of the present invention has been described, but it is intended to be illustrative only and are not restrictive of the invention, the skilled person will be apparent that the embodiments may carried out as described except that variations of those other than those explicitly described above, additions or deletions without departing from the spirit and scope of the invention.
1. 一种用于在网络设备中执行精确匹配查找的方法，所述方法包括： 在所述网络设备接收网络分组； 至少基于所接收到的网络分组的报头中所包括的数据确定用于所述网络分组的查找关键字； 至少基于所述查找关键字的大小从多个可能散列函数中选择一个散列函数； 使用所选择的散列函数对所述查找关键字执行散列操作以计算散列查找关键字分段； 并且使用所述散列查找关键字分段来查询数据库以提取出精确地对应于所述查找关键字的数值。 1. A method for performing the exact-match lookup in a network device, the method comprising: receiving a packet in a network device of the network; based at least on data header of the received network packet included in determining the said network packet search key; lookup key based on the size of the hash function may be selected from at least a plurality of hash functions; using the selected hash function performs a hash operation on the search key to calculate hashing the lookup key segment; and using the segment hash lookup key to query the database to extract accurately the lookup value corresponding to the keyword.
2. 根据权利要求1所述的方法，其中使用所述散列查找关键字分段来查询数据库包括查询在两个或更多存储器组之间进行分布的数据库。 2. The method according to claim 1, wherein the segment hash lookup key to query the database comprises a database query is distributed between two or more memory banks.
3. 根据权利要求2所述的方法，其中： 选择散列函数包括从N个可能散列函数中选择所述散列函数，N是大于1的整数;并且使用所述散列查找关键字分段来查询数据库包括查询在N个存储器组之间进行分布的数据库，所述N个存储器组中的每一个对应于所述N个可能散列函数中的不同散列函数。 The method according to claim 2, wherein: said selecting comprises selecting a hash function from the hash function may be a hash function of the N, N is an integer greater than 1; and using the hash lookup key points segment comprises a database query to query a database distributed among the N memory groups, each of said N memory groups corresponding to said N possible different hash function hash function.
4. 根据权利要求2所述的方法，其中使用所述散列查找关键字分段来查询数据库包括使用所述散列查找关键字分段来访问所述两个或更多存储器组中的不同存储器组。 4. The method according to claim 2, wherein the segment hash lookup key to query the database comprises using the hash lookup key to access different segments of the two or more memory banks memory banks.
5. 根据权利要求2所述的方法，其中使用所述散列查找关键字分段来查询数据库包括： 并行地且使用所述散列查找关键字分段来访问所述两个或更多存储器组中的不同存储器组以标识两个或更多匹配分段； 获取与所述两个或更多匹配分段中的至少一个相关联的至少一个关键字大小指示符； 并且至少基于（i)所述两个或更多匹配分段和（ii)所述至少一个关键字大小指示符来标识所述数据库中的匹配条目，并且其中精确地对应于所述查找关键字的所述数值是与所述匹配条目相关联的数值。 5. The method according to claim 2, wherein the segment hash lookup key to query the database comprising: a segment of the hash lookup key to access said two or more parallel memories and using group different memory banks to identify two or more matching segments; obtaining the two or more segments matching at least one of the at least one keyword associated with or size indicator; and based on at least (i) the two or more matching segment and (ii) said at least one keyword size indicator to identify the matching entry in the database, and which corresponds exactly to the lookup value is the key the matching value associated with entries.
6. —种网络设备，包括： 多个接口； 存储数据库的查找存储器;和親合至所述多个接口的分组处理器，所述分组处理器被配置为对经由所述多个接口中的至少一些所接收的网络分组进行处理，其中所述分组处理器包括： 关键字生成单元，其被配置为至少基于所接收到的网络分组的报头中所包括的数据确定用于经由所述多个接口之一所接收到的网络分组的查找关键字； 关键字搜索单元，其被配置为： 至少基于所述查找关键字的大小从多个可能散列函数中选择一个散列函数， 使用所选择的散列函数对所述查找关键字执行散列操作以计算散列查找关键字分段， 并且使用所述散列查找关键字分段来查询数据库以提取出精确地对应于所述查找关键字的数值。 6. - kind of network device, comprising: a plurality of interfaces; lookup memory storing a database; and affinity to the plurality of interfaces of the packet processor, the packet processor is configured to, via the plurality of interfaces at least some of the network processes the received packet, wherein the packet processor comprises: a key generating unit configured to based at least on data header of the received network packet included in the plurality of determining via one search key interface received network packet; keyword searching unit is configured to: based at least on the size of the key to find a hash function is selected from a plurality of possible hash function, using the selected the hash function of the hash lookup key operations performed to calculate a hash lookup key segments, and the segment using the hash lookup key to query the database to extract exactly corresponding to the search key value.
7. 根据权利要求6所述的网络设备，其中： 所述查找存储器包括两个或更多存储器组;并且所述关键字搜索单元被配置为至少通过查询在所述两个或更多存储器组之间进行分布的数据库而使用所述散列查找关键字分段来查询数据库。 The network apparatus according to claim 6, wherein: said lookup memory comprises two or more memory groups; and the keyword searching unit is configured by querying the at least two or more memory banks database distribution between using the hash lookup key segments to query the database.
8. 根据权利要求7所述的网络设备，其中： 所述查找存储器包括N个存储器组，N是大于1的整数;并且所述关键字搜索单元被配置为从N个可能散列函数中选择所述散列函数，所述N个存储器组中的每一个对应于所述N 个可能散列函数中的不同散列函数，并且至少通过查询在所述N个存储器组之间进行分布的数据库而使用所述散列查找关键字分段来查询数据库。 8. The network device according to claim 7, wherein: said lookup memory comprising N memory sets, N being an integer greater than 1; and the keyword searching unit is configured to select from among the N possible hash function is the hash function, each of the N memory groups corresponding to said N possible different hash function hash function, and at least by querying distributed between the groups of N memory database using the hash lookup key segments to query the database.
9. 根据权利要求7所述的网络设备，其中所述关键字搜索单元被配置为至少通过使用所述散列查找关键字分段来访问所述两个或更多存储器组中的不同存储器组而使用所述散列查找关键字分段来查询所述数据库。 9. The network device according to claim 7, wherein the keyword searching unit is configured to at least said segment by using a hash lookup key to access said two or more different memory banks in the memory banks using the hash lookup key segments to query the database.
10. 根据权利要求7所述的网络设备，其中所述关键字搜索单元被配置为至少通过以下而使用所述散列查找关键字分段来查询所述数据库： 并行地且使用所述散列查找关键字分段来访问所述两个或更多存储器组中的不同存储器组以标识两个或更多匹配分段； 获取与所述两个或更多匹配分段中的至少一个相关联的关键字大小指示符;并且至少基于（i)所述两个或更多匹配分段和（ii)所述关键字大小指示符来标识所述数据库中的匹配条目，并且其中精确地对应于所述查找关键字的所述数值是与所述匹配条目相关联的数值。 10. The network device according to claim 7, wherein the keyword searching unit is configured by using at least the segment hash lookup key to query the database: the hash in parallel and using accessing the lookup key segment of the two or more different memory banks in the memory banks to identify two or more matching segments; obtaining the two or more of at least one associated matching segment of keyword size indicator; and based on at least (i) two or more of the matching segment and (ii) the size indicator to identify keyword matching entry in the database, and which corresponds exactly to the the search key is the value associated with the matching entry value.
12. —种用于在网络设备中执行精确匹配查找的方法，所述方法包括： 在所述网络设备接收网络分组； 至少基于所接收到的网络分组的报头中所包括的数据确定用于所述网络分组的查找关键字； 使用两个或更多散列函数对所述查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段;并且使用所述两个或更多散列查找关键字分段来查询在两个或更多存储器组之间进行分布的数据库以提取出精确地对应于所述查找关键字的数值，其中查询所述数据库包括： 使用所述两个或更多散列查找关键字分段来访问所述两个或更多存储器组以从所述两个或更多存储器组中获取两个或更多匹配分段，所述两个或更多匹配分段包括第一匹配分段和第二匹配分段， 获取与所述第一匹配分段对应的指针，其中所述指针指向所述第二匹配分段， 使用所述 12. - A method for performing a kind of exact-match lookup of the method in a network device comprising: a packet receiving network device in the network; based at least on data header of the received network packet included in determining the said network packet search key; hash function using two or more of the search key to perform two or more operations to calculate a hash hash lookup key two or more segments; and using the said two or more hash lookup key to query the database segments distributed between two or more memory banks to extract accurately the lookup value corresponding to the keyword, wherein querying the database comprises : using the two or more segments hash lookup key to access said two or more memory banks to obtain from the two or more memory banks of two or more matching segment, the said two or more matching segment comprises a first segment and a second matching segment matching, acquires a corresponding segment of the first matching pointers, wherein the pointer to the second matching segment, using the state 针确定所述第一匹配分段和所述第二匹配分段要被组合，以及将从所述两个或更多存储器组中获取的所述第一匹配分段和所述第二匹配分段进行组合以标识所述数据库中的匹配条目，精确地对应于所述查找关键字的数值是与所述匹配条目相关联的数值。 Determining a first matching needle segment and said second segment matching to be combined, and from the two or more memory banks acquired the first matching sub-segment and the second matching combining segments of said database to identify matching entries corresponds exactly to find the key value is the value associated with the matching entry.
13. 根据权利要求12所述的方法，其中： 执行两个或更多散列操作包括使用N个散列函数对查找关键字执行N个散列操作以计算出N个散列查找关键字分段，N是大于1的整数;并且查询数据库包括查询在N个存储器组之间进行分布的数据库，所述N个存储器组中的每一个对应于所述N个散列函数中的不同散列函数。 13. The method according to claim 12, wherein: performing a hash operation comprises two or more hash functions using N N hash lookup operations performed to calculate a keyword hash lookup key points N segment, N is an integer greater than 1; and query the database comprises a database query is distributed among the N memory groups, the N memory groups corresponding to said each of the N different hash hash functions function.
14. 根据权利要求12所述的方法，其中： 查询所述数据库进一步包括获取与所述两个或更多匹配分段中的至少一个相关联的关键字大小指不符;并且至少使用（i)所述指针和(ii)所述关键字大小指示符来确定至少所述第一匹配分段和所述第二匹配分段要被组合。 14. The method according to claim 12, wherein: the database query further comprises obtaining two or more matches with the at least one keyword associated with the size of the finger does not match the segment; and using at least (i) the pointers and (ii) said key size indicator determines the segment matching the at least first and second matched segment to be combined.
15. 根据权利要求12所述的方法，其中： 所述指针指示所述第二匹配分段在所述两个或更多存储器组中的位置。 15. The method according to claim 12, wherein: the pointer indicative of the matching segment in the second additional memory bank or the position of the two.
16. 一种网络设备，包括： 多个接口； 存储在两个或更多存储器组之间进行分布的数据库的查找存储器;和耦合至所述多个接口的分组处理器，所述分组处理器被配置为对经由所述多个接口中的至少一些所接收的网络分组进行处理，其中所述分组处理器包括： 关键字生成单元，其被配置为至少基于所接收到的网络分组的报头中所包括的数据确定用于经由所述多个接口之一所接收到的网络分组的查找关键字，和关键字搜索单元，其被配置为使用两个或更多散列函数对所述查找关键字执行两个或更多散列操作以计算两个或更多散列查找关键字分段，并且使用所述两个或更多散列查找关键字分段来查询所述数据库以提取出精确地对应于所述查找关键字的数值，其中所述关键字搜索单元被配置为至少通过以下而查询所述数据库使用所述两个或更多散列查找 16. A network device, comprising: a plurality of interfaces; memory lookup database stored in the distributed between two or more memory banks; and a plurality of interfaces coupled to the packet processor, the packet processor configured to at least some of the network packets received via the plurality of interfaces is processed, wherein the packet processor comprises: key generating means, which is arranged at least a packet header based on the received network determining data included in a search key received via one of the plurality of interfaces of the network packet, and keyword searching unit is configured to use two or more hash functions to find the key two or more words hashing operations performed to calculate two or more hash lookup key segment, and using the two or more segments hash lookup key to query the database to extract the exact to find values corresponding to the keyword, wherein the keyword searching unit is configured to query the database and by using at least two or more of the hash lookup 键字分段来访问所述两个或更多存储器组以从所述两个或更多存储器组中获取两个或更多匹配分段，所述两个或更多匹配分段包括第一匹配分段和第二匹配分段， 获取与所述第一匹配分段对应的指针，其中所述指针指向所述第二匹配分段， 使用所述指针来确定所述第一匹配分段和所述第二匹配分段要被组合，以及将从所述两个或更多存储器组中获取的所述第一匹配分段和所述第二匹配分段进行组合以标识所述数据库中的匹配条目，精确地对应于所述查找关键字的所述数值是与所述匹配条目相关联的数值。 Segment keys to access said two or more memory banks to obtain from the two or more memory banks of two or more segments matching, the matching segment comprises two or more first matching segment and a second segment matching, obtaining the corresponding first matching segment pointer, wherein said pointer to the second matching segment, using the pointer to determine the first matched segment and matching the second segment to be combined, and the two or more from the group acquired in the first memory segment and said second matching combined to identify matching segment of the database matching entry, exactly corresponding to the value of the lookup is a key value associated with the entry of the match.
17. 根据权利要求16所述的网络设备，其中： 所述查找存储器存储在N个存储器组之间进行分布的数据库，N是大于1的整数;并且所述关键字搜索单元被配置为至少通过使用N个散列函数对所述查找关键字执行N个散列操作以计算出N个散列查找关键字分段而执行所述两个或更多散列操作，所述N个散列函数中的每一个对应于N个存储器组中的不同存储器组。 17. The network device according to claim 16, wherein: said memory stores a lookup database distributed among the N memory groups, N being an integer greater than 1; and the keyword searching unit is configured by at least using N hash functions perform two or more of the hashing operation on the hash lookup key performs an N-N operable to calculate the hash lookup key segments, the hash function of the N each of the memory groups corresponding to N different memory banks.
18. 根据权利要求16所述的网络设备，其中所述关键字搜索单元被配置为： 进一步通过获取与所述两个或更多匹配分段中的至少一个相关联的关键字大小指示符而查询所述数据库;并且至少使用（i)所述指针和（ii)所述关键字大小指示符来确定至少所述第一匹配分段和所述第二匹配分段要被组合。 18. The network device according to claim 16, wherein the keyword searching unit is configured to: further by obtaining the two or more keywords matching segment size indicator is associated with at least one of the querying the database; and using at least (i) said pointer and (ii) said key size indicator determines the segment matching the at least first and second matched segment to be combined.
19. 根据权利要求16所述的网络设备，其中所述指针指示所述第二匹配分段在所述两个或更多存储器组中的位置。 19. The network device according to claim 16, wherein the second pointer indicates the matching segment in the two or more memory banks or position.
21. —种用于在网络设备中填充精确匹配查找表的方法，所述方法包括： 确定要存储在所述网络设备的数据库中的查找关键字，所述数据库在两个或更多存储器组之间进行分布； 至少基于所述查找关键字的大小（i)从所述两个或更多存储器组之间选择第一存储器组，并且(ii)从多个可能散列函数中选择一个散列函数； 使用所选择的散列函数对所述查找关键字执行散列操作以计算第一散列查找关键字分段； 将所述第一散列查找关键字分段存储在所选择的第一存储器组中；并且将对应于所述查找关键字的一个或多个散列查找关键字分段存储在所述两个或更多存储器组中的一个或多个后续存储器组中。 21. - species for filling in a network device exact-match lookup table, the method comprising: determining a lookup key to be stored in a database in the network device, the database in two or more memory banks distributed between; based at least on the size of the key to find (i) selecting from a first set of memory between the two or more memory banks, and (ii) the hash function may be selected from a plurality of casual column functions; using the selected hash function for hashing the lookup key operation to calculate a first hash lookup key segment; of the first hash lookup key is stored in the selected segment a memory bank; and corresponding to one or more keywords to find the hash lookup is stored in a key segment of the two or more memory banks or subsequent plurality of memory banks.
22. 根据权利要求21所述的方法，其中将对应于所述查找关键字的一个或多个散列查找关键字分段存储在一个或多个后续存储器组中包括将对应于所述查找关键字的一个或多个散列查找关键字分段存储在所述两个或更多存储器组中与所选择的第一存储器组相邻的一个或多个存储器组中。 22. The method according to claim 21, wherein a key corresponding to the one or more lookup hash lookup key segment stored in one or more subsequent memory groups corresponding to the lookup comprising key a plurality of word or hash lookup key is stored adjacent to the first segment of the selected memory bank of the two or more memory banks in one or more memory banks.
23.根据权利要求21所述的方法，其中将对应于所述查找关键字的一个或多个散列查找关键字分段存储在一个或多个后续存储器组中包括将所述第一散列查找关键字分段存储在所述两个或更多存储器组中与所选择的第一存储器组相邻的一个或多个存储器组中的每一个中。 23. The method according to claim 21, wherein a key corresponding to the one or more lookup hash lookup key memory segment comprises one or more memory banks subsequent to the first hash a search key in memory adjacent to the first segment of the selected memory bank of the two or more memory banks or a plurality of memory banks each.
24. 根据权利要求21所述的方法，其中： 确定查找关键字包括确定要被存储在分布于所述网络设备的N个存储器组之间的数据库中的查找关键字，N是大于1的整数;并且选择散列函数包括从N个可能散列函数中选择所述散列函数，所述N个可能散列函数中的每一个对应于所述N个存储器组中的不同存储器组。 24. The method according to claim 21, wherein: determining comprises determining the lookup key to the lookup key is stored in the database is distributed between the network device of the N memory banks, N being an integer greater than 1 ; and selecting comprises selecting a hash function of the hash function from N possible hash function, the hash function N possible corresponding to each of the N memory bank different memory banks.
25. 根据权利要求21所述的方法，其中： 选择散列函数包括选择对应于所述第一存储器组的散列函数。 25. The method according to claim 21, wherein: selecting a hash function comprises selecting a memory bank corresponding to the first hash function.
26. 根据权利要求21所述的方法，进一步包括确定所述数据库中的一个或多个现有条目是否能够被移动至所述数据库中新的位置，所述一个或多个现有条目包括对应于大于所述查找关键字的另一个查找关键字的单个条目，或者对应于小于所述查找关键字的两个或更多其它查找关键字的两个或更多条目，其中： 将所述第一散列查找关键字分段存储在所选择的第一存储器组中包括响应于确定所述一个或多个现有条目能够被移动至所述数据库中新的位置而将所述第一散列查找关键字分段存储在所选择的第一存储器组中。 26. The method of claim 21, further comprising determining whether said database and one or more existing entries in the database can be moved to a new location, the one or more existing entry comprises the corresponding being greater than the search key to find other keywords single entry, or corresponds to less than the two or more items to find two or more other keywords of the search key, wherein: said first a hash lookup key memory segment comprising in response to determining the one or more existing entries in the database can be moved to a new location in the first memory group hashes are first selected Find the first memory segment set of keywords stored in the selected.
27.—种网络设备，包括： 多个接口； 存储在两个或更多存储器组之间进行分布的数据库的查找存储器;和耦合至所述多个接口的分组处理器，所述分组处理器被配置为对经由所述多个接口中的至少一些所接收的网络分组进行处理，其中所述分组处理器包括： 关键字生成单元，其被配置为至少基于所接收到的网络分组的报头中所包括的数据确定用于经由所述多个接口之一所接收到的网络分组的查找关键字，和关键字插入单元，其被配置为至少基于所述查找关键字的大小（i)从所述两个或更多存储器组之间选择第一存储器组，并且(ii)从多个可能散列函数中选择一个散列函数， 使用所选择的散列函数对所述查找关键字执行散列操作以计算第一散列查找关键字分段， 将所述第一散列查找关键字分段存储在所选择的第一存储器组中，并且将对应于所述查找 27.- kinds of network devices, comprising: a plurality of interfaces; memory lookup database stored in the distributed between two or more memory banks; and a plurality of interfaces coupled to the packet processor, the packet processor configured to at least some of the network packets received via the plurality of interfaces is processed, wherein the packet processor comprises: key generating means, which is arranged at least a packet header based on the received network determining data included in a search key received via one of the plurality of interfaces of the network packet, and keyword insertion unit is configured to at least based on the size of the key to find (i) from the selecting a first set of memory between two or more of said memory banks, and (ii) the hash function to select a hash function may be a hash function, using the selected search key from the plurality of hashing operative to calculate a first hash lookup key segments, the first segment hash lookup key is stored in the first memory bank is selected, and the corresponding lookup 键字的一个或多个散列查找关键字分段存储在所述两个或更多存储器组中的一个或多个后续存储器组中。 A plurality of key word or a hash lookup key is stored in a segment of said two or more memory banks or subsequent plurality of memory banks.
28.根据权利要求27所述的网络设备，其中所述关键字插入单元被配置为： 至少通过将对应于所述查找关键字的所述一个或多个散列查找关键字分段存储在所述两个或更多存储器组中与所选择的第一存储器组相邻的一个或多个存储器组中而将对应于所述查找关键字的一个或多个散列查找关键字分段存储在一个或多个后续存储器组中。 28. The network device according to claim 27, wherein said key insertion unit is configured to: at least by the lookup key corresponding to the one or more hash lookup key is stored in the segment two or more of said memory banks adjacent to the first memory bank a selected one or more of the memory banks corresponding to the search for a keyword or more hash lookup key is stored in segment one or more subsequent memory banks.
29. 根据权利要求27所述的网络设备，其中所述关键字插入单元被配置为： 至少通过将所述第一散列查找关键字分段存储在所述两个或更多存储器组中与所选择的第一存储器组相邻的一个或多个存储器组中的每一个中而将对应于所述查找关键字的一个或多个散列查找关键字分段存储在一个或多个后续存储器组中。 29. The network device according to claim 27, wherein said key insertion unit is configured to: at least by the first hash lookup key segment stored in the two or more memory banks a first memory bank of the selected one or more adjacent memory banks and each corresponding to one of the one or more hash lookup keyword search key segment stored in one or more subsequent memory group.
30. 根据权利要求27所述的网络设备，其中： 所述查找存储器存储分布于所述网络设备的N个存储器组之间的数据库，N是大于1的整数;并且所述关键字插入单元被配置为至少通过从N个可能散列函数中选择散列函数而选择所述散列函数，所述N个可能散列函数中的每一个对应于所述N个存储器组中的不同存储器组。 30. The network device according to claim 27, wherein: said memory stores a lookup in a database distributed among the set of N memory of the network device, N is an integer greater than 1; and said key insertion unit configured to select the at least the hash function by selecting a hash function from the hash function N is possible, the N possible hash functions each corresponding to the N memory bank different memory banks.
31.根据权利要求27所述的网络设备，其中所述关键字插入单元被配置为： 至少通过选择对应于所述第一存储器组的散列函数而选择散列函数。 31. The network device according to claim 27, wherein said key insertion unit is configured to: a hash function is selected by selecting the corresponding at least to the first memory bank of a hash function.
32.根据权利要求27所述的网络设备，其中： 所述关键字插入单元进一步被配置为确定所述数据库中的一个或多个现有条目是否能够被移动至所述数据库中新的位置，所述一个或多个现有条目包括对应于大于所述查找关键字的另一个查找关键字的单个条目，或者对应于小于所述查找关键字的两个或更多其它查找关键字的两个或更多条目；并且所述关键字插入单元被配置为至少通过响应于所述关键字插入单元确定所述一个或多个现有条目能够被移动至所述数据库中新的位置而将所述第一散列查找关键字分段存储在所选择的第一存储器组中而将第一散列查找关键字分段存储在所选择的第一存储器组中。 32. The network device according to claim 27, wherein: said key insertion unit is further configured in the database to determine whether the new location of said one or more database entries can be moved to an existing, the one or more larger than the existing entry comprises the corresponding keyword lookup find another single entry key, or corresponds to less than the two keywords to find two or more other search keywords or more items; and said key insertion unit is configured to insert at least in response to the key unit determines the one or more existing entries in the database can be moved to a new location in the first hash key lookup segment in the first memory and the selected group in the first memory a first set of keywords hash lookup segment in the selected memory.
33. —种用于在网络设备中填充精确匹配查找表的方法，包括： 确定要存储在所述网络设备的数据库中的查找关键字，所述数据库在两个或更多存储器组之间进行分布； 确定所述查找关键字的大小； 基于确定的所述查找关键字的大小来确定所述两个或更多存储器组之中存储所述查找关键字所需要的一定数量的存储器组； 使用两个或更多散列函数对所述查找关键字执行两个或更多散列操作以计算两个或更多散列值，至少包括使用第一散列函数计算第一散列值，并且使用第二散列函数计算第二散列值； 将所述查找关键字存储到确定的所述数量的存储器组，包括： 将所述查找关键字的第一分段存储在所述两个或更多存储器组中的第一存储器组中在对应于所述第一散列值的第一位置处； 将所述查找关键字的第二分段存储在所述两个或更多存储器组中的 33. - kind of a method for filling an exact match lookup table in a network device, comprising: determining a lookup key to be stored in a database in the network device, said database between two or more memory banks profile; determining the size of a lookup key; determining from among the two or more memory banks of the memory based on the determined size of the key of the lookup to find a certain amount of memory required set of keywords; using two or more hash functions to the two or more lookup key hash operation performed to calculate two or more hash values, comprising at least a first hash value is calculated using a first hashing function, and calculating a second hash value using the second hash function; the number of the lookup key is stored in the memory bank determined, comprising: the keyword searching the first memory segment or two more first memory bank corresponding to the memory bank at the first position of the first hash value; the two or more memory banks in the lookup key is stored in a second segment of 二存储器组中在对应于所述第二散列值的第二位置处;以及将与存储在所述第一存储器库中的所述查找关键字的所述第一分段相关联的指针存储在所述数据库中，所述指针指向所述查找关键字的所述第二分段在所述第二存储器组中的所述第二位置，指示所述查找关键字的所述第一分段和所述查找关键字的所述第二分段是同一查找关键字的不同分段，并且指示在所述查找表中执行查找时所述查找关键字的所述第一分段和所述查找关键字的所述第二分段要被组合以形成所述查找关键字。 At a second location in the second memory group corresponding to the second hash value; and the search key with the library stored in the first memory in the first memory segment associated pointer in the database, find the pointer to the key of the second segment in the second memory location of the second group, indicating that the first segment of the search key and the search key to find the second segments are different segments of the same key, and indicates in the look-up table to find the key and the lookup is performed to find a first segment the second segment of the keyword to be combined to form the lookup key.
34. 根据权利要求33所述的方法，进一步包括将关键字大小指示符与（i)所述查找关键字的第一分段和(ii)所述查找关键字的第二分段中的至少一个相关联。 34. The method of claim 33, further comprising a size indicator and a keyword (i) said first segment to find a second segment, and (ii) the keyword search key at least associated.
35. 根据权利要求33所述的方法，进一步包括将相应的分段数量指示符与（i)所述查找关键字的第一分段和(ii)所述查找关键字的第二分段中的至少一个相关联。 35. The method of claim 33, further comprising a respective segment number indicator of (i) a first segment of said lookup and (ii) a second segment of said lookup key in key at least one associate.
36. 根据权利要求33所述的方法，其中存储所述指针与所述查找关键字的所述第一分段包括将所述指针存储在所述第一存储器组内与所述查找关键字的所述第一分段相同的存储器位置。 36. The method according to claim 33, wherein said memory pointer of the search key and the search key comprises a first segment of the pointer stored in the first memory group and said the first segment of the same memory location.
37. 根据权利要求33所述的方法，其中将所述查找关键字的所述第二分段存储在第二存储器组中包括将所述查找关键字的所述第二分段存储在并不与所述第一存储器组相邻的第二存储器组中。 37. A method according to claim 33, wherein said second lookup segment to the keyword stored in the second memory bank comprises the searching for the keyword is not stored in the second segment adjacent to the first memory bank of the second memory bank.
38. 一种网络设备，包括： 多个接口； 存储在两个或更多存储器组之间进行分布的数据库的查找存储器，所述两个或更多存储器组至少包括第一存储器组和第二存储器组;和耦合至所述多个接口的分组处理器，所述分组处理器被配置为对经由所述多个接口中的至少一些所接收的网络分组进行处理，其中所述分组处理器包括： 关键字生成单元，其被配置为至少基于所接收到的网络分组的报头中所包括的数据确定用于经由所述多个接口之一所接收到的网络分组的查找关键字，和关键字插入单元，其被配置为_ 使用两个或更多散列函数对所述查找关键字执行两个或更多散列操作以计算两个或更多散列值，至少包括使用第一散列函数计算第一散列值，以及使用第二散列函数计算第二散列值， 将所述查找关键字存储到所确定的数量的存储器组，包括： 将所述 38. A network device, comprising: a plurality of interfaces; a memory storing a database lookup distributed between two or more memory banks, said two or more groups including at least a first memory and a second memory group memory group; and a packet processor coupled to the plurality of interfaces, the packet processor is configured to perform at least some of the network via the processing of the received packet in the plurality of interfaces, wherein said packet processor comprises : key generating means, which is configured to at least a header based on the data of the received network packet included in the search key for determining received via one of the plurality of interfaces of the network packet, and keywords insertion unit, which is configured to use two or more _ a hash function on the search key to perform two or more of hashing operations to calculate two or more hash values, comprising at least a first hash using calculating a first hash function value, and using a second hash function to calculate a second hash value, the lookup key is stored in the memory bank number identified, comprising: the 找关键字的第一分段存储在所述两个或更多存储器组中的所述第一存储器组中在对应于所述第一散列值的第一位置处， 将所述查找关键字的第二分段存储在所述两个或更多存储器组中的所述第二存储器组中在对应于所述第二散列值的第二位置处，以及其中所述关键字插入单元被进一步配置为将与存储在所述第一存储器组中的所述查找关键字的所述第一分段相关联的指针存储在所述数据库中，所述指针指向所述查找关键字的所述第二分段在所述第二存储器组中的所述第二位置，指示所述查找关键字的所述第一分段和所述查找关键字的所述第二分段是同一查找关键字的不同分段，并且指示在所述查找表中执行查找时所述查找关键字的所述第一分段和所述查找关键字的所述第二分段要被组合以形成所述查找关键字。 Get the keywords stored in the first segment of the two or more memory banks in a first memory bank at a first position corresponding to the first hash value, the lookup key at a second position of the second segment is stored in the two or more memory banks in a second memory bank corresponding to the second hash value, and wherein said key insertion unit the seek pointer is further configured to store a first segment of the keyword associated with the storage in the first memory group in the database, the pointer to the key of the lookup said second segment in said second memory bank a second position, indicating the search key to find the first segment and the second segment of the same keyword search key the different segments of the lookup, and indicates when performing a lookup in the lookup table, the lookup keyword searching for the first segment and the second segment to the keyword are combined to form a key word.
39. 根据权利要求38所述的网络设备，其中所述关键字插入单元进一步被配置为将（i) 关键字大小指示符和（ii)相应的分段数量指示符之一或二者与所述查找关键字的所述第一分段和所述查找关键字的所述第二分段相关联。 39. The network device according to claim 38, wherein said key insertion unit is further configured to one of (i) keyword size indicator and (ii) the number of the corresponding segment of the indicator or with both said first segment of said search key and the search key associated with the second segment.
40. 根据权利要求38所述的网络设备，其中所述关键字插入单元被配置为至少通过将所述指针存储在所述第一存储器组内与所述查找关键字的所述第一分段相同的存储器位置而将所述指针与所述查找关键字的所述第一分段相关联。 40. The network device according to claim 38, wherein said key insertion unit is configured to at least a search key by said pointer stored in said first memory group and the first segment of the the same memory location and the pointer to the search for the keyword associated with the first segment.

matches:
application No.61
Application No. 13
application No. 13
Application No. 14
Application No. 13
Application No. 14
Application No. 13
Application No. 14
Application No. 13
Application No. 14
Application No. 13