WO2018177184A1 - Method and device for implementing table lookup processing, apparatus, and storage medium - Google Patents

Method and device for implementing table lookup processing, apparatus, and storage medium Download PDF

Info

Publication number
WO2018177184A1
WO2018177184A1 PCT/CN2018/079946 CN2018079946W WO2018177184A1 WO 2018177184 A1 WO2018177184 A1 WO 2018177184A1 CN 2018079946 W CN2018079946 W CN 2018079946W WO 2018177184 A1 WO2018177184 A1 WO 2018177184A1
Authority
WO
WIPO (PCT)
Prior art keywords
entry
key value
crc
result
hash
Prior art date
Application number
PCT/CN2018/079946
Other languages
French (fr)
Chinese (zh)
Inventor
王林滨
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2018177184A1 publication Critical patent/WO2018177184A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's

Definitions

  • the present invention relates to, but is not limited to, data processing technology, and more particularly to a method, device, device, and storage medium for implementing table lookup processing.
  • the number of related entry items that the network switch chip needs to support is increasing, considering content addressable memory (CAM) and ternary content addressable memory (TCAM).
  • CAM content addressable memory
  • TCAM ternary content addressable memory
  • DDR Double Data Rate
  • the number of external DDRs will be limited. If the number of DDRs is limited, the number of DDR accesses needs to be reduced, and the hash (HASH) is not checked. If you need to check the table multiple times, if multiple entries coexist in a group of DDRs, different tables need to check the table multiple times, which also needs to occupy a huge DDR access bandwidth, which limits the efficiency of the table lookup and blocks.
  • the processing of the chip greatly reduces the processing performance of the chip.
  • the embodiments of the present invention provide a method, a device, a device, and a storage medium for implementing a table lookup process, which can reduce the occupation of pin resources and bandwidth resources and avoid the impact on chip processing performance.
  • An embodiment of the present invention provides a method for implementing a table lookup process, including:
  • the matching table address is determined according to the calculation result of the CRC polynomial
  • the hash table is returned to obtain the KEY value, and the table is processed according to whether the KEY value of the entry and the hash table return the KEY value.
  • determining whether the entry exists comprises:
  • the table lookup processing according to whether the KEY value of the entry and the hash check table return the KEY value are consistent:
  • the KEY value of the entry is consistent with the hash table return KEY value, and the entry is returned; the KEY value of the entry is inconsistent with the hash table return KEY value, and the entry is determined to be missed.
  • the method further includes:
  • the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
  • the method before the determining whether the entry exists by the cyclic redundancy check CRC polynomial calculation, the method further includes:
  • the packet parsing result includes a packet type.
  • the method before the determining whether the entry exists by the cyclic redundancy check CRC polynomial calculation, the method further includes:
  • the table continues to be checked, and when it is determined that the entry does not exist, the table check is stopped.
  • the configuring the third preset one of the Bloom filter tables comprises:
  • the third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
  • the embodiment of the present invention further provides an apparatus for implementing a table lookup process, including: a first determining unit, a matching table address unit, a hash address unit, and a table lookup processing unit;
  • the first determining unit is configured to: determine, according to the key KEY value of the entry, whether the entry exists by using a cyclic redundancy check CRC polynomial calculation;
  • the matching table address unit is configured to: when determining the existence of the entry, determine the matching table address according to the calculation result of the CRC polynomial;
  • the hash address unit is configured to: determine an off-chip hash HASH lookup table address according to a result of performing a table lookup on the matching table according to the determined matching table address;
  • the lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and perform a table lookup according to whether the KEY value of the entry and the hash check table return a KEY value.
  • the first determining unit is configured to:
  • the lookup table processing unit is configured to:
  • the KEY value of the entry is consistent with the return value of the hash table, and returning the entry; the KEY value of the entry And the hash table returns an inconsistency in the KEY value, determining that the entry misses.
  • the lookup table processing unit is further configured to:
  • the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
  • the apparatus further includes a setting mask unit, a mask selection unit, and a filtering unit; wherein
  • Setting a mask unit is configured to: set a second preset mask MASK according to the entry related to the service;
  • the mask selection unit is configured to: select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode;
  • the filtering unit is configured to: filter the invalid KEY value in the entry according to the selected MASK;
  • the packet parsing result includes a packet type.
  • the apparatus further includes a configuration unit, a second calculation unit, a second lookup unit, a second determination unit, and a second processing unit;
  • the configuration unit is configured to: configure a third preset Bloom filter table
  • the second calculating unit is configured to perform a CRC calculation on the KEY value of the entry to obtain a CRC result
  • the second look-up table unit is configured to: find all the Bloom filter tables by using the CRC result, and obtain a filter table result;
  • the second determining unit is configured to: determine, according to the result of the filtering table, whether the entry exists;
  • the second processing unit is configured to: when it is determined that the item exists, continue to look up the table, and determine that the item does not exist, stop searching the table.
  • the configuration unit is configured to:
  • the third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
  • Embodiments of the present invention provide an apparatus for implementing a table lookup process, including a memory and a processor, the memory storing a computer program executable on a processor, and the processor implementing the program when the program is executed The steps in the method of implementing table lookup processing.
  • Embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps in the method for implementing a lookup table process.
  • the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return
  • the KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent.
  • the method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
  • FIG. 1 is a flowchart of a method for implementing table lookup processing according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for implementing table lookup processing according to another embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for implementing table lookup processing according to still another embodiment of the present invention.
  • FIG. 4 is a structural block diagram of an apparatus for implementing table lookup processing according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for applying an example of the present invention.
  • FIG. 6 is a schematic diagram of a hardware entity of an apparatus for implementing table lookup processing according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for implementing table lookup processing according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
  • Step 100 Determine, according to a key (KEY) value of the entry, whether the entry exists by using a cyclic redundancy check (CRC) polynomial calculation;
  • KY key
  • CRC cyclic redundancy check
  • determining whether an entry exists includes:
  • the first preset number can be determined by a person skilled in the art according to the number of items supporting conflicts.
  • Step 101 When determining that an entry exists, determine a matching table address according to a calculation result of a CRC polynomial
  • Step 102 Determine, according to the determined matching table address, a result of performing a table lookup on the matching table, and determine an off-chip hash HASH lookup table address;
  • Step 103 Perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table return KEY value, and perform a table lookup process according to whether the KEY value of the entry and the hash check table return a KEY value.
  • the table lookup processing according to the KEY value of the entry and the return of the KEY value by the hash table include:
  • the KEY value of the entry is consistent with the KEY value returned by the hash table, and the entry is returned; the KEY value of the entry is inconsistent with the KEY value returned by the hash table, and the entry is determined to be missed.
  • the method of the embodiment of the present invention further includes:
  • the matching table of the embodiment of the present invention can be set in an off-chip double rate synchronous dynamic random access memory (DDR).
  • the method of the embodiment of the present invention may further include the process shown in FIG. 2:
  • Step 200 Set a second preset MASK according to the entry related to the service
  • Step 201 Select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode.
  • Step 202 Filter an invalid KEY value in the entry according to the selected MASK.
  • the packet parsing result may include a packet type.
  • the embodiment of the invention reduces the occupation of the pin resources and the bandwidth resources by filtering the invalid KEY values in the entries, and avoids the impact on the processing performance of the chip.
  • the content of the KEY is designed.
  • the most commonly used information in the TCP is the quintuple information.
  • the useless content can be effectively filtered by the MASK to prevent the search result from being incorrect; for example, some entries are only If the IP address is not associated with the port number, the entry will be incorrectly searched.
  • the content of the item that is not required to be considered in the entry may be filtered by the MASK according to the service involved in the entry, thereby avoiding the content that is not considered.
  • the method of the embodiment of the present invention may further include the process shown in FIG. 3:
  • Step 300 Configure a third preset broom filter table
  • configuring the third preset Bloom filter table in the embodiment of the present invention includes:
  • the Bloom filter table of the embodiment of the present invention can be placed in on-chip static random access memory (SRAM).
  • Step 301 Perform CRC calculation on the KEY value of the entry to obtain a CRC result.
  • Step 302 Search all the Bloom filter tables using the CRC result to obtain a filter table result
  • Step 303 Determine, according to the result of the filtering table, whether an entry exists.
  • Step 304 When it is determined that the entry exists, continue to check the table to determine that the entry does not exist, and stop checking the table.
  • the Bloom filter By filtering the entries that do not exist, the occupation of the pin resources and the bandwidth resources is reduced, and the impact on the processing performance of the chip is avoided.
  • the Bloom filter it is judged whether the entry exists. If the entry does not exist, it is directly sent to the central processing unit (CPU) for processing, without wasting the subsequent look-up table bandwidth; the bloom fitter generally uses the on-chip static random access memory (SRAM). ,Static Random Access Memory) implementation;
  • the bloom fitter generally performs multiple CRC calculations, and performs a query of the bloom fitter table according to the results of multiple CRCs. Only the results of multiple CRCs are found to be 1 item of the bloom fitter result; therefore, multiple checks are required. Tables generally do not need to support continuous processing per cycle. You can use this type of processing; for example, when four cycles are processed, four CRC functions are used to calculate the CRC value to find the result of the bloom fitter table.
  • the bloom fitter table handles the hash (HASH) conflict, which may have multiple bits (bits), and multiple bits represent the number of collisions;
  • HASH hash
  • a bloom fitter address supports 16 collisions, which requires 16 bits; at most, it takes 16 lookups to determine if an entry hits; if there is a rate requirement, then you cannot wait for a double rate synchronous dynamic random access memory to return.
  • the next read the worst case DDR read bandwidth will expand by 16 times, due to the high probability of HASH collision, DDR range bandwidth Swelling in more than two times, for the various types of DDR memory entry, the bandwidth expansion that is unacceptable.
  • steps 200-202 and the processing of steps 300-304 may be applied simultaneously in the embodiment of the present invention, or may be implemented as an embodiment separately.
  • the processing efficiency and precision are high, multiple sets of bloom fitter tables and multiple CRC functions can be used for processing, and only all the bloom fitters are hit for subsequent processing, otherwise, according to the loss (MISS). deal with;
  • the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return
  • the KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent.
  • the method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
  • the foregoing method for implementing table lookup processing is implemented in the form of a software function module, and is sold or used as a standalone product, it may also be stored in a computer readable storage medium.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • One network device is caused to perform all or part of the method described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • embodiments of the invention are not limited to any specific combination of hardware and software.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing the table lookup processing.
  • An embodiment of the present invention further provides an apparatus for implementing a table lookup process, including: a memory and a processor; wherein
  • the processor is configured to execute program instructions in the memory
  • the key (KEY) value of the entry is subjected to a first predetermined number of cyclic redundancy check (CRC) polynomial calculations;
  • the KEY value of the comparison entry is the same as the KEY value returned by the hash table.
  • the KEY value of the entry is consistent with the KEY value returned by the hash table, and the entry is returned; the KEY value of the entry and the KEY value.
  • the hash table returns an inconsistent KEY value, determining that the entry is missing.
  • FIG. 4 is a structural block diagram of an apparatus for implementing a table lookup process according to an embodiment of the present invention. As shown in FIG. 4, the method includes: a first determining unit, a matching table address unit, a hash address unit, and a table lookup processing unit;
  • the first determining unit is configured to: determine, according to the key KEY value of the entry, whether the entry exists by using a cyclic redundancy check CRC polynomial calculation;
  • the matching table address unit is configured to: when determining the existence of the entry, determine the matching table address according to the calculation result of the CRC polynomial;
  • the hash address unit is configured to: determine an off-chip hash HASH lookup table address according to a result of performing a table lookup on the matching table according to the determined matching table address;
  • the lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and perform a table lookup according to whether the KEY value of the entry and the hash check table return a KEY value.
  • the first determining unit is configured to:
  • the lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and the KEY value of the entry and the hash check table return a KEY value, and return Entry; the KEY value of the entry does not match the hash checklist return KEY value, determining that the entry is missing.
  • the lookup table processing unit is further configured to: send the entry to the central processing unit CPU when the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC Process it or process the item according to the preset rules.
  • the apparatus further includes a setting mask unit, a mask selection unit, and a filtering unit; wherein
  • the setting mask unit is configured to: set a second preset mask according to the entry related to the service setting;
  • the mask selection unit is configured to: select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode;
  • the filtering unit is configured to: filter the invalid KEY value in the entry according to the selected MASK; wherein the packet parsing result includes the packet type.
  • the apparatus further includes a configuration unit, a second calculation unit, a second lookup table unit, a second determination unit, and a second processing unit;
  • the configuration unit is configured to: configure a third preset Bloom filter table
  • the second calculating unit is configured to perform a CRC calculation on the KEY value of the entry to obtain a CRC result
  • the second lookup unit is configured to: find all Bloom filter tables using the CRC result, and obtain a filter table result;
  • the second determining unit is configured to: determine, according to the result of the filtering table, whether the entry exists;
  • the second processing unit is configured to: when it is determined that the entry exists, continue to look up the table, and determine that the entry does not exist, and stop checking the table.
  • the configuration unit is configured to configure a third predetermined Bloom filter table based on the number of entries supporting the conflict.
  • the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return
  • the KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent.
  • the method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
  • FIG. 5 is a flowchart of a method for applying an example of the present invention. As shown in FIG. 5, the method includes:
  • Step 500 configuring a MASK value, a working mode, and related enabling, and the like;
  • the operation mode, the related enablement, and the like can be set based on empirical values according to the art.
  • Step 501 Initialize a Bloom filter table content and match a table content
  • Step 502 After the initialization is completed, receiving an externally input data including an entry;
  • Step 503 According to the type of the input data, select a corresponding MASK value, and perform bitwise operation on the KEY value of the data and the MASK to obtain a KEY value after the bit and the operation;
  • Step 504 Perform two or more CRC polynomial calculations in parallel with the KEY value obtained by the operation, and obtain four CRC calculation results;
  • Step 505 using four CRC values to respectively check the corresponding four Bloom filter tables
  • Step 506 checking four Bloom filter tables to obtain return values of four Bloom filters
  • Step 507 Determine a hit or a miss according to the return values of the four Bloom filters; wherein, when the return values of the four Bloom filters are all 1, the hit is indicated, and one of the return values of the four bloom fitters exists. If it is not 1, it means that it is missing; when it is not hit, step 516 is performed; when it is hit, step 508 is performed;
  • Step 508 Perform 8 polynomial calculations of different CRCs according to the KEY value, and obtain CRC calculation results calculated by 8 CRC polynomials;
  • Step 509 Query the matching table according to the calculation result of the 0th CRC, obtain 16 matching values, compare the first CRC with 16 matching value values, and output a 16-bit comparison result;
  • This embodiment outputs a total of 16*7bit results
  • Step 510 Send, according to the 16-bit result, a final table lookup address calculated by seven CRC calculations;
  • the position of the first valid (1) is the offset value; the subsequent valid bits are not valid;
  • CRC1 to CRC7 are the same.
  • CRC1 is valid
  • the result of the output of CRC1 is used, and so on. If all are invalid, the processing is performed in a miss manner.
  • Step 511 Obtain 7 results of CRC1 to CRC7;
  • Step 512 determining whether the results of the seven CRC1 to CRC7 are valid; when the results of the seven CRC1 to CRC7 are all valid, step 513; if there is a mismatch between the results of the seven CRC1 to CRC7, step 516;
  • Step 513 Select a corresponding CRC value according to the priority and the valid flag.
  • Step 514 Find a matching value table according to the selected CRC value, and obtain a matching value and a KEY value as a return value;
  • Step 515 Matching the KEY value of the entry with the KEY value returned by the read table, and determining whether the match is matched; if the KEY value of the entry matches the KEY value returned by the read table, step 517 is performed; if the KEY value of the entry is read The KEY value returned by the table does not match, and step 516 is performed;
  • Step 516 Perform processing according to a preset rule.
  • Step 517 processing according to the result returned by the reading table.
  • FIG. 6 is a schematic diagram of a hardware entity of a device for performing table lookup processing according to an embodiment of the present invention.
  • the hardware entity of the device 600 includes: a processor 601, a communication interface 602, and a memory 603. ,among them
  • Processor 601 typically controls the overall operation of device 600.
  • Communication interface 602 can enable devices to communicate with other terminals or servers over a network.
  • the memory 603 is configured to store instructions and applications executable by the processor 601, and may also cache data to be processed or processed by the processor 601 and each module in the device 600, and may be flash memory (FLASH) or random access memory (Random Access). Memory, RAM) implementation.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units; they may be located in one place or distributed on multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a read only memory (ROM), a magnetic disk, or an optical disk, and the like, which can store program codes.
  • ROM read only memory
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a network device (which may be a computing device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a magnetic disk, or an optical disk.
  • the CRC polynomial calculation is used to determine whether the entry exists; when the entry is determined, the matching table address is determined according to the calculation result of the CRC polynomial; and the matching table is checked according to the determined matching table address.
  • the returned result determines the off-chip HASH lookup table address; according to the determined off-chip HASH lookup table address, the hash table is returned to obtain the KEY value, and the KEY value according to the entry and the hash check table return whether the KEY value is consistent or not.
  • Table processing thus, the items that need to be looked up are reduced, the occupation of pin resources and bandwidth resources is reduced, and the impact on chip processing performance is avoided.

Abstract

A method and device for implementing table lookup processing, an apparatus, and a storage medium. The method comprises: determining whether an entry exists according to a key value of the entry by means of a cyclic redundancy check (CRC) polynomial calculation (100); when it is determined that the entry exists, determining a matching table address according to the CRC polynomial calculation result (101); determining an off-chip hash table lookup address according to a result returned after table lookup is performed on a matching table according to the determined matching table address (102); and performing table lookup according to the determined off-chip hash table lookup address to obtain a hash table lookup return key value, and performing table lookup processing according to whether the key value of the entry is consistent with the hash table lookup return key value (103).

Description

一种实现查表处理的方法及装置、设备、存储介质Method, device, device and storage medium for realizing table lookup processing
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201710210525.1、申请日为2017年03月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本申请。The present application is filed on the basis of the Chinese Patent Application No. PCT Application No. PCT Application No. .
技术领域Technical field
本发明涉及但不限于数据处理技术,尤指一种实现查表处理的方法及装置、设备、存储介质。The present invention relates to, but is not limited to, data processing technology, and more particularly to a method, device, device, and storage medium for implementing table lookup processing.
背景技术Background technique
随着网络技术的发展,网络交换芯片需要支持的相关表项条目数量越来越多,考虑到内容寻址存储器(CAM,content addressable memory)和三态内容寻址存储器(TCAM,ternary content addressable memory)的成本因素,在表项很大的情况下,相关技术一般使用外挂双倍速率同步动态随机存储器(DDR,Double Data Rate)的方式进行查表处理。With the development of network technology, the number of related entry items that the network switch chip needs to support is increasing, considering content addressable memory (CAM) and ternary content addressable memory (TCAM). The cost factor, in the case of a large number of items, the related technology generally uses a double-rate synchronous dynamic random access memory (DDR, Double Data Rate) method for table lookup processing.
由于外挂DDR需要消耗较多的管脚资源,因此,外挂DDR的数量就会受到限制,DDR数量受到限制的情况下就需要减少DDR的访问次数,防止哈希(HASH)查表不中,出现需要多次查表的情况;如果多个表项共存于一组DDR内,不同的表项均需要多次查表时,还会需要占用巨大的DDR访问带宽,限制了查表的效率并堵塞芯片的处理,极大的降低芯片的处理性能。Since the external DDR needs to consume more pin resources, the number of external DDRs will be limited. If the number of DDRs is limited, the number of DDR accesses needs to be reduced, and the hash (HASH) is not checked. If you need to check the table multiple times, if multiple entries coexist in a group of DDRs, different tables need to check the table multiple times, which also needs to occupy a huge DDR access bandwidth, which limits the efficiency of the table lookup and blocks. The processing of the chip greatly reduces the processing performance of the chip.
综上,对于表项条目数量较多的情况,进行查表时存在占用过多的管脚资源、带宽资源、影响芯片的处理性能等问题。In summary, when there are a large number of entry entries, there are problems such as excessive pin resources, bandwidth resources, and processing performance of the chip when performing table lookup.
发明内容Summary of the invention
以下是对本发明详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is a summary of the subject matter described in detail herein. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种实现查表处理的方法及装置、设备、存储介质,能够降低了对管脚资源、带宽资源的占用、避免对芯片处理性能的影响。The embodiments of the present invention provide a method, a device, a device, and a storage medium for implementing a table lookup process, which can reduce the occupation of pin resources and bandwidth resources and avoid the impact on chip processing performance.
本发明实施例提供了一种实现查表处理的方法,包括:An embodiment of the present invention provides a method for implementing a table lookup process, including:
根据条目的键KEY值,通过循环冗余校验CRC多项式计算确定条目是否存在;Determining whether an entry exists by a cyclic redundancy check CRC polynomial calculation according to the key KEY value of the entry;
确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;When it is determined that the entry exists, the matching table address is determined according to the calculation result of the CRC polynomial;
根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;Determining the off-chip hash HASH lookup table address according to the result of checking the matching table according to the determined matching table address;
根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。According to the determined off-chip HASH lookup table address, the hash table is returned to obtain the KEY value, and the table is processed according to whether the KEY value of the entry and the hash table return the KEY value.
在其他的实施例中,所述确定条目是否存在包括:In other embodiments, determining whether the entry exists comprises:
将所述条目的KEY值进行第一预设次所述CRC多项式计算;Performing the CRC polynomial calculation by using the KEY value of the entry for a first preset time;
使用第0个所述CRC多项式的计算结果作为所述匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
将所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定所述条目存在。When the result returned by the matching table lookup table matches the calculation result of other CRC polynomials other than the 0th CRC, it is determined that the entry exists.
在其他的实施例中,所述根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理包括:In other embodiments, the table lookup processing according to whether the KEY value of the entry and the hash check table return the KEY value are consistent:
所述条目的KEY值和所述哈希查表返回KEY值一致,返回所述条目;所述条目的KEY值和所述哈希查表返回KEY值不一致,确定所述条目未 命中。The KEY value of the entry is consistent with the hash table return KEY value, and the entry is returned; the KEY value of the entry is inconsistent with the hash table return KEY value, and the entry is determined to be missed.
在其他的实施例中,所述方法还包括:In other embodiments, the method further includes:
所述匹配表查表返回的结果与除第0个CRC外的其他的所述CRC多项式的计算结果不匹配时,将所述条目上送到中央处理器CPU进行处理,或将所述条目根据预设规则进行处理。If the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC, the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
在其他的实施例中,所述通过循环冗余校验CRC多项式计算确定条目是否存在之前,所述方法还包括:In other embodiments, before the determining whether the entry exists by the cyclic redundancy check CRC polynomial calculation, the method further includes:
根据所述条目涉及业务设置第二预设个掩码MASK;Setting a second preset mask MASK according to the entry related to the service;
对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;For each entry, select a corresponding type of MASK according to the packet parsing result, service step, and/or application mode;
根据选择的MASK,对条目中无效的KEY值进行过滤;Filter the invalid KEY value in the entry according to the selected MASK;
其中,所述报文解析结果包括报文类型。The packet parsing result includes a packet type.
在其他的实施例中,所述通过循环冗余校验CRC多项式计算确定条目是否存在之前,所述方法还包括:In other embodiments, before the determining whether the entry exists by the cyclic redundancy check CRC polynomial calculation, the method further includes:
配置第三预设个布鲁姆过滤器表;Configuring a third preset Bloom filter table;
对所述条目的KEY值进行CRC计算,获得CRC结果;Performing a CRC calculation on the KEY value of the entry to obtain a CRC result;
使用所述CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;Use the CRC result to find all Bloom filter tables to get the filter table results;
根据所述过滤表结果判断所述条目是否存在;Determining whether the entry exists according to the result of the filtering table;
确定所述条目存在时,继续查表,确定所述条目不存在时,停止查表。When it is determined that the entry exists, the table continues to be checked, and when it is determined that the entry does not exist, the table check is stopped.
在其他的实施例中,所述配置第三预设个布鲁姆过滤器表包括:In other embodiments, the configuring the third preset one of the Bloom filter tables comprises:
根据支持冲突的条目数量配置第三预设个所述布鲁姆过滤器表。The third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
另一方面,本发明实施例还提供一种实现查表处理的装置,包括:第一判断单元、匹配表地址单元、哈希地址单元、查表处理单元;其中,On the other hand, the embodiment of the present invention further provides an apparatus for implementing a table lookup process, including: a first determining unit, a matching table address unit, a hash address unit, and a table lookup processing unit;
第一判断单元配置为:根据条目的键KEY值,通过循环冗余校验CRC多项式计算确定条目是否存在;The first determining unit is configured to: determine, according to the key KEY value of the entry, whether the entry exists by using a cyclic redundancy check CRC polynomial calculation;
匹配表地址单元配置为:确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;The matching table address unit is configured to: when determining the existence of the entry, determine the matching table address according to the calculation result of the CRC polynomial;
哈希地址单元配置为:根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;The hash address unit is configured to: determine an off-chip hash HASH lookup table address according to a result of performing a table lookup on the matching table according to the determined matching table address;
查表处理单元配置为:根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。The lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and perform a table lookup according to whether the KEY value of the entry and the hash check table return a KEY value.
在其他的实施例中,所述第一判断单元配置为:In other embodiments, the first determining unit is configured to:
将所述条目的KEY值进行第一预设次所述CRC多项式计算;Performing the CRC polynomial calculation by using the KEY value of the entry for a first preset time;
使用第0个所述CRC多项式的计算结果作为所述匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
将所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定所述条目存在。When the result returned by the matching table lookup table matches the calculation result of other CRC polynomials other than the 0th CRC, it is determined that the entry exists.
在其他的实施例中,所述查表处理单元配置为:In other embodiments, the lookup table processing unit is configured to:
根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,所述条目的KEY值和所述哈希查表返回KEY值一致,返回所述条目;所述条目的KEY值和所述哈希查表返回KEY值不一致,确定所述条目未命中。Performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table returning a KEY value, the KEY value of the entry is consistent with the return value of the hash table, and returning the entry; the KEY value of the entry And the hash table returns an inconsistency in the KEY value, determining that the entry misses.
在其他的实施例中,所述查表处理单元还配置为:In other embodiments, the lookup table processing unit is further configured to:
所述匹配表查表返回的结果与除第0个CRC外的其他的所述CRC多项式的计算结果不匹配时,将所述条目上送到中央处理器CPU进行处理,或将所述条目根据预设规则进行处理。If the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC, the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
在其他的实施例中,所述装置还包括设置掩码单元、掩码选择单元、 过滤单元;其中,In other embodiments, the apparatus further includes a setting mask unit, a mask selection unit, and a filtering unit; wherein
设置掩码单元配置为:根据所述条目涉及业务设置第二预设个掩码MASK;Setting a mask unit is configured to: set a second preset mask MASK according to the entry related to the service;
掩码选择单元配置为:对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;The mask selection unit is configured to: select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode;
过滤单元配置为:根据选择的MASK,对条目中无效的KEY值进行过滤;The filtering unit is configured to: filter the invalid KEY value in the entry according to the selected MASK;
其中,所述报文解析结果包括报文类型。The packet parsing result includes a packet type.
在其他的实施例中,所述装置还包括配置单元、第二计算单元、第二查表单元、第二确定单元和第二处理单元;其中,In other embodiments, the apparatus further includes a configuration unit, a second calculation unit, a second lookup unit, a second determination unit, and a second processing unit;
配置单元配置为:配置第三预设个布鲁姆过滤器表;The configuration unit is configured to: configure a third preset Bloom filter table;
第二计算单元配置为:对所述条目的KEY值进行CRC计算,获得CRC结果;The second calculating unit is configured to perform a CRC calculation on the KEY value of the entry to obtain a CRC result;
第二查表单元配置为:使用所述CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;The second look-up table unit is configured to: find all the Bloom filter tables by using the CRC result, and obtain a filter table result;
第二确定单元配置为:根据所述过滤表结果判断所述条目是否存在;The second determining unit is configured to: determine, according to the result of the filtering table, whether the entry exists;
第二处理单元配置为:确定所述条目存在时,继续查表,确定所述条目不存在时,停止查表。The second processing unit is configured to: when it is determined that the item exists, continue to look up the table, and determine that the item does not exist, stop searching the table.
在其他的实施例中,所述配置单元配置为:In other embodiments, the configuration unit is configured to:
根据支持冲突的条目数量配置第三预设个所述布鲁姆过滤器表。The third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
本发明实施例提供一种实现查表处理的设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现所述的一种实现查表处理的方法中的步骤。Embodiments of the present invention provide an apparatus for implementing a table lookup process, including a memory and a processor, the memory storing a computer program executable on a processor, and the processor implementing the program when the program is executed The steps in the method of implementing table lookup processing.
本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现所述一种实现查表处理的方法中 的步骤。Embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps in the method for implementing a lookup table process.
与相关技术相比,本申请技术方案包括:根据条目的键(KEY)值,通过循环冗余校验(CRC)多项式计算确定条目是否存在;确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希(HASH)查表地址;根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。本发明实施例方法减少了需要查表的条目,降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。Compared with the related art, the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return The KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent. The method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the invention will be set forth in the description which follows, The objectives and other advantages of the invention may be realized and obtained by means of the structure particularly pointed in the appended claims.
附图说明DRAWINGS
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification, which together with the embodiments of the present application are used to explain the technical solutions of the present invention, and do not constitute a limitation of the technical solutions of the present invention.
图1为本发明一实施例实现查表处理的方法的流程图;1 is a flowchart of a method for implementing table lookup processing according to an embodiment of the present invention;
图2为本发明另一实施例实现查表处理的方法的流程图;2 is a flowchart of a method for implementing table lookup processing according to another embodiment of the present invention;
图3为本发明再一实施例实现查表处理的方法的流程图;FIG. 3 is a flowchart of a method for implementing table lookup processing according to still another embodiment of the present invention; FIG.
图4为本发明实施例实现查表处理的装置的结构框图;4 is a structural block diagram of an apparatus for implementing table lookup processing according to an embodiment of the present invention;
图5为本发明应用示例的方法流程图;FIG. 5 is a flowchart of a method for applying an example of the present invention; FIG.
图6为本发明实施例中实现查表处理的设备的一种硬件实体示意图。FIG. 6 is a schematic diagram of a hardware entity of an apparatus for implementing table lookup processing according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
图1为本发明实施例实现查表处理的方法的流程图,如图1所示,包括:FIG. 1 is a flowchart of a method for implementing table lookup processing according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
步骤100、根据条目的键(KEY)值,通过循环冗余校验(CRC)多项式计算确定条目是否存在;Step 100: Determine, according to a key (KEY) value of the entry, whether the entry exists by using a cyclic redundancy check (CRC) polynomial calculation;
在其他的实施例中,确定条目是否存在包括:In other embodiments, determining whether an entry exists includes:
将条目的KEY值进行第一预设次CRC多项式计算;Performing a first predetermined number of CRC polynomial calculations on the KEY value of the entry;
使用第0个CRC多项式的计算结果作为匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
将匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定条目存在。When the result returned by the matching table lookup table matches the calculation result of the other CRC polynomial except the 0th CRC, it is determined that the entry exists.
需要说明的是,第一预设次可以由本领域技术人员根据支持冲突的条目数量确定。It should be noted that the first preset number can be determined by a person skilled in the art according to the number of items supporting conflicts.
步骤101、确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;Step 101: When determining that an entry exists, determine a matching table address according to a calculation result of a CRC polynomial;
步骤102、根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;Step 102: Determine, according to the determined matching table address, a result of performing a table lookup on the matching table, and determine an off-chip hash HASH lookup table address;
步骤103、根据确定的片外HASH查表地址进行查表获得哈希查表返 回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。Step 103: Perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table return KEY value, and perform a table lookup process according to whether the KEY value of the entry and the hash check table return a KEY value.
在其他的实施例中,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理包括:In other embodiments, the table lookup processing according to the KEY value of the entry and the return of the KEY value by the hash table include:
条目的KEY值和哈希查表返回KEY值一致,返回条目;条目的KEY值和哈希查表返回KEY值不一致,确定所述条目未命中。The KEY value of the entry is consistent with the KEY value returned by the hash table, and the entry is returned; the KEY value of the entry is inconsistent with the KEY value returned by the hash table, and the entry is determined to be missed.
在其他的实施例中,本发明实施例方法还包括:In other embodiments, the method of the embodiment of the present invention further includes:
匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果不匹配时,将条目上送到中央处理器CPU进行处理,或将条目根据预设规则进行处理。本发明实施例匹配表可以设置在片外双倍速率同步动态随机存储器(DDR)。If the result returned by the match table does not match the calculation result of the other CRC polynomial except the 0th CRC, the entry is sent to the CPU of the CPU for processing, or the entry is processed according to a preset rule. The matching table of the embodiment of the present invention can be set in an off-chip double rate synchronous dynamic random access memory (DDR).
在其他的实施例中,步骤100之前,本发明实施例方法还可以包括如图2所示的处理过程:In other embodiments, before the step 100, the method of the embodiment of the present invention may further include the process shown in FIG. 2:
步骤200、根据条目涉及业务设置第二预设个MASK;Step 200: Set a second preset MASK according to the entry related to the service;
步骤201、对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;Step 201: Select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode.
需要说明的是,如何选择相应类型的MASK可以由本领域技术人员根据报文解析结果、业务步骤、和/或应用模式等进行分析设置。It should be noted that how to select a corresponding type of MASK can be analyzed and set by a person skilled in the art according to the packet analysis result, the service step, and/or the application mode.
步骤202、根据选择的MASK,对条目中无效的KEY值进行过滤;Step 202: Filter an invalid KEY value in the entry according to the selected MASK.
其中,报文解析结果可以包括报文类型。The packet parsing result may include a packet type.
本发明实施例通过对条目中无效的KEY值进行过滤降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。网络查表时,设计KEY的内容较多,例如、TCP中最常用的就是五元组信息,本发明实施例通过MASK可以有效过滤其中无用的内容,防止查找结果错误;例如,某些条目仅和IP地址相关,不对端口号等信进行屏蔽,将造成条目查找错误; 本发明实施例可以根据条目涉及的业务对条目中无需考虑的构成内容通过MASK进行过滤,避免因为无需考虑的构成内容,造成条目被存储在多个位置。The embodiment of the invention reduces the occupation of the pin resources and the bandwidth resources by filtering the invalid KEY values in the entries, and avoids the impact on the processing performance of the chip. When the network is inspected, the content of the KEY is designed. For example, the most commonly used information in the TCP is the quintuple information. In the embodiment of the present invention, the useless content can be effectively filtered by the MASK to prevent the search result from being incorrect; for example, some entries are only If the IP address is not associated with the port number, the entry will be incorrectly searched. In the embodiment of the present invention, the content of the item that is not required to be considered in the entry may be filtered by the MASK according to the service involved in the entry, thereby avoiding the content that is not considered. Causes entries to be stored in multiple locations.
在其他的实施例中,步骤100之前,本发明实施例方法还可以包括如图3所示的处理过程:In other embodiments, before the step 100, the method of the embodiment of the present invention may further include the process shown in FIG. 3:
步骤300、配置第三预设个布鲁姆过滤器表;Step 300: Configure a third preset broom filter table;
在其他的实施例中,本发明实施例配置第三预设个布鲁姆过滤器表包括:In other embodiments, configuring the third preset Bloom filter table in the embodiment of the present invention includes:
根据支持冲突的条目数量配置第三预设个布鲁姆过滤器表;Configuring a third preset Bloom filter table according to the number of entries supporting the conflict;
需要说明的是,支持冲突的条目数量可以通过相关技术中的仿真确定最大值后,根据经验加上余量获得。本发明实施例布鲁姆过滤器表可以放置在片内静态随机存取存储器(SRAM)。It should be noted that the number of entries supporting the conflict can be obtained by the simulation plus the margin after the maximum value is determined by simulation in the related art. The Bloom filter table of the embodiment of the present invention can be placed in on-chip static random access memory (SRAM).
步骤301、对条目的KEY值进行CRC计算,获得CRC结果;Step 301: Perform CRC calculation on the KEY value of the entry to obtain a CRC result.
步骤302、使用CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;Step 302: Search all the Bloom filter tables using the CRC result to obtain a filter table result;
步骤303、根据过滤表结果判断条目是否存在;Step 303: Determine, according to the result of the filtering table, whether an entry exists.
步骤304、确定条目存在时,继续查表,确定条目不存在时,停止查表。Step 304: When it is determined that the entry exists, continue to check the table to determine that the entry does not exist, and stop checking the table.
本发明实施例通过对不存在的条目进行过滤,降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。通过布鲁姆过滤器,判断条目是否存在,如果条目不存在则直接送给中央处理器(CPU)进行处理,无需浪费后续的查表带宽;bloom fitter一般使用片内静态随机存取存储器(SRAM,Static Random Access Memory)实现;In the embodiment of the present invention, by filtering the entries that do not exist, the occupation of the pin resources and the bandwidth resources is reduced, and the impact on the processing performance of the chip is avoided. Through the Bloom filter, it is judged whether the entry exists. If the entry does not exist, it is directly sent to the central processing unit (CPU) for processing, without wasting the subsequent look-up table bandwidth; the bloom fitter generally uses the on-chip static random access memory (SRAM). ,Static Random Access Memory) implementation;
为了使本发明实施例内容清楚,以下对bloom fitter进行说明:In order to clarify the contents of the embodiments of the present invention, the following describes the bloom fitter:
bloom fitter一般在会进行多个CRC计算,根据多个CRC的结果进行bloom fitter表的查询,只有多个CRC的结果查到得bloom fitter结果均为1条目才存在;因此,需要进行多次查表,一般不需要支持每周期连续处理 的情况,可以使用这种处理方式;例如、4个周期处理一个的情况,使用4个CRC函数分别计算CRC的值,以此查找bloom fitter表的结果,只有全部命中的情况,才进行后续处理;否则按照未命中的情况进行处理;bloom fitter表处理哈希(HASH)冲突可以有多个比特(bit)的情况,多个bit代表冲突的数量;每个bloom fitter地址支持16次冲突,就需要16bit;最多时,需要16次查表才能确定条目是否命中;如果有速率上的要求,那么无法等待双倍速率同步动态随机存储器的读返回就需要发起下一次的读,最差的情况DDR的读带宽会膨胀16倍,由于HASH冲突的概率较大,DDR的范围带宽膨胀在2倍以上,对于DDR内存在多种类型的条目,这种带宽膨胀是无法接受的。The bloom fitter generally performs multiple CRC calculations, and performs a query of the bloom fitter table according to the results of multiple CRCs. Only the results of multiple CRCs are found to be 1 item of the bloom fitter result; therefore, multiple checks are required. Tables generally do not need to support continuous processing per cycle. You can use this type of processing; for example, when four cycles are processed, four CRC functions are used to calculate the CRC value to find the result of the bloom fitter table. Only after all hits, the subsequent processing is performed; otherwise, the processing is performed according to the miss condition; the bloom fitter table handles the hash (HASH) conflict, which may have multiple bits (bits), and multiple bits represent the number of collisions; A bloom fitter address supports 16 collisions, which requires 16 bits; at most, it takes 16 lookups to determine if an entry hits; if there is a rate requirement, then you cannot wait for a double rate synchronous dynamic random access memory to return. The next read, the worst case DDR read bandwidth will expand by 16 times, due to the high probability of HASH collision, DDR range bandwidth Swelling in more than two times, for the various types of DDR memory entry, the bandwidth expansion that is unacceptable.
需要说明的是,步骤200~202的处理过程和步骤300~304的处理过程可以在本发明实施例中同时应用,也可以单独作为实施例实施。本发明实施例,如果对处理效率和精度要求较高,还可以使用多套bloom fitter表、多个CRC函数进行处理,只有全部bloom fitter均命中的情况才进行后续处理,否则按照丢失(MISS)处理;It should be noted that the processing of steps 200-202 and the processing of steps 300-304 may be applied simultaneously in the embodiment of the present invention, or may be implemented as an embodiment separately. In the embodiment of the present invention, if the processing efficiency and precision are high, multiple sets of bloom fitter tables and multiple CRC functions can be used for processing, and only all the bloom fitters are hit for subsequent processing, otherwise, according to the loss (MISS). deal with;
与相关技术相比,本申请技术方案包括:根据条目的键(KEY)值,通过循环冗余校验(CRC)多项式计算确定条目是否存在;确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希(HASH)查表地址;根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。本发明实施例方法减少了需要查表的条目,降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。Compared with the related art, the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return The KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent. The method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的实现查表处理的方法,并作为独立的产品销售或使用时,也可以存储 在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台网络设备执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the foregoing method for implementing table lookup processing is implemented in the form of a software function module, and is sold or used as a standalone product, it may also be stored in a computer readable storage medium. . Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. One network device is caused to perform all or part of the method described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述实现查表处理的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for implementing the table lookup processing.
本发明实施例还提供一种实现查表处理的设备,包括:存储器和处理器;其中,An embodiment of the present invention further provides an apparatus for implementing a table lookup process, including: a memory and a processor; wherein
处理器被配置为执行存储器中的程序指令;The processor is configured to execute program instructions in the memory;
程序指令在处理器读取执行以下操作:Program instructions perform the following operations on the processor read:
将条目的键(KEY)值进行第一预设次的循环冗余校验(CRC)多项式计算;The key (KEY) value of the entry is subjected to a first predetermined number of cyclic redundancy check (CRC) polynomial calculations;
使用第0个CRC多项式的计算结果作为匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
将查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
查表返回的结果与其他的CRC多项式的计算结果匹配时,确定条目存在,并根据匹配结果得到片外哈希HASH查表地址;When the result returned by the look-up table matches the calculation result of other CRC polynomials, it is determined that the entry exists, and an off-chip hash HASH lookup table address is obtained according to the matching result;
片外哈希查表返回时,比对条目的KEY值和哈希查表返回KEY值是否一致,条目的KEY值和哈希查表返回KEY值一致,返回该条目;条目的KEY值和哈希查表返回KEY值不一致,确定所述条目未命中。When the off-chip hash table returns, the KEY value of the comparison entry is the same as the KEY value returned by the hash table. The KEY value of the entry is consistent with the KEY value returned by the hash table, and the entry is returned; the KEY value of the entry and the KEY value. The hash table returns an inconsistent KEY value, determining that the entry is missing.
以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明存储介质和设备实施 例中未披露的技术细节,请参照本发明方法实施例的描述而理解。The above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and device of the present invention, reference is made to the description of the method embodiments of the present invention.
图4为本发明实施例实现查表处理的装置的结构框图,如图4所示,包括:第一判断单元、匹配表地址单元、哈希地址单元、查表处理单元;其中,4 is a structural block diagram of an apparatus for implementing a table lookup process according to an embodiment of the present invention. As shown in FIG. 4, the method includes: a first determining unit, a matching table address unit, a hash address unit, and a table lookup processing unit;
第一判断单元配置为:根据条目的键KEY值,通过循环冗余校验CRC多项式计算确定条目是否存在;The first determining unit is configured to: determine, according to the key KEY value of the entry, whether the entry exists by using a cyclic redundancy check CRC polynomial calculation;
匹配表地址单元配置为:确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;The matching table address unit is configured to: when determining the existence of the entry, determine the matching table address according to the calculation result of the CRC polynomial;
哈希地址单元配置为:根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;The hash address unit is configured to: determine an off-chip hash HASH lookup table address according to a result of performing a table lookup on the matching table according to the determined matching table address;
查表处理单元配置为:根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。The lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and perform a table lookup according to whether the KEY value of the entry and the hash check table return a KEY value.
在其他的实施例中,第一判断单元配置为:In other embodiments, the first determining unit is configured to:
将条目的KEY值进行第一预设次CRC多项式计算;Performing a first predetermined number of CRC polynomial calculations on the KEY value of the entry;
使用第0个CRC多项式的计算结果作为匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
将匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定条目存在。When the result returned by the matching table lookup table matches the calculation result of the other CRC polynomial except the 0th CRC, it is determined that the entry exists.
在其他的实施例中,查表处理单元配置为:根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,条目的KEY值和哈希查表返回KEY值一致,返回条目;条目的KEY值和哈希查表返回KEY值不一致,确定所述条目未命中。In other embodiments, the lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and the KEY value of the entry and the hash check table return a KEY value, and return Entry; the KEY value of the entry does not match the hash checklist return KEY value, determining that the entry is missing.
在其他的实施例中,查表处理单元还配置为:匹配表查表返回的结果 与除第0个CRC外的其他的CRC多项式的计算结果不匹配时,将条目上送到中央处理器CPU进行处理,或将条目根据预设规则进行处理。In other embodiments, the lookup table processing unit is further configured to: send the entry to the central processing unit CPU when the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC Process it or process the item according to the preset rules.
在其他的实施例中,装置还包括设置掩码单元、掩码选择单元、过滤单元;其中,In other embodiments, the apparatus further includes a setting mask unit, a mask selection unit, and a filtering unit; wherein
设置掩码单元配置为:根据条目涉及业务设置第二预设个掩码;The setting mask unit is configured to: set a second preset mask according to the entry related to the service setting;
掩码选择单元配置为:对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;The mask selection unit is configured to: select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode;
过滤单元配置为:根据选择的MASK,对条目中无效的KEY值进行过滤;其中,报文解析结果包括报文类型。The filtering unit is configured to: filter the invalid KEY value in the entry according to the selected MASK; wherein the packet parsing result includes the packet type.
在其他的实施例中,装置还包括配置单元、第二计算单元、第二查表单元、第二确定单元和第二处理单元;其中,In other embodiments, the apparatus further includes a configuration unit, a second calculation unit, a second lookup table unit, a second determination unit, and a second processing unit; wherein
配置单元配置为:配置第三预设个布鲁姆过滤器表;The configuration unit is configured to: configure a third preset Bloom filter table;
第二计算单元配置为:对条目的KEY值进行CRC计算,获得CRC结果;The second calculating unit is configured to perform a CRC calculation on the KEY value of the entry to obtain a CRC result;
第二查表单元配置为:使用CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;The second lookup unit is configured to: find all Bloom filter tables using the CRC result, and obtain a filter table result;
第二确定单元配置为:根据过滤表结果判断条目是否存在;The second determining unit is configured to: determine, according to the result of the filtering table, whether the entry exists;
第二处理单元配置为:确定条目存在时,继续查表,确定条目不存在时,停止查表。The second processing unit is configured to: when it is determined that the entry exists, continue to look up the table, and determine that the entry does not exist, and stop checking the table.
在其他的实施例中,配置单元配置为:根据支持冲突的条目数量配置第三预设个布鲁姆过滤器表。In other embodiments, the configuration unit is configured to configure a third predetermined Bloom filter table based on the number of entries supporting the conflict.
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。The description of the above device embodiments is similar to the description of the above method embodiments, and has similar advantages as the method embodiments. For technical details not disclosed in the device embodiments of the present invention, please refer to the description of the method embodiments of the present invention.
与相关技术相比,本申请技术方案包括:根据条目的键(KEY)值, 通过循环冗余校验(CRC)多项式计算确定条目是否存在;确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希(HASH)查表地址;根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。本发明实施例方法减少了需要查表的条目,降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。Compared with the related art, the technical solution of the present application includes: determining, according to a key (KEY) value of an entry, whether an entry exists by a cyclic redundancy check (CRC) polynomial calculation; determining that the entry exists, determining a match according to a calculation result of the CRC polynomial Table address; determining the off-chip hash (HASH) lookup table address according to the result of checking the matching table according to the determined matching table address; performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table return The KEY value is checked according to the KEY value of the entry and whether the KEY value returned by the hash table is consistent. The method of the embodiment of the invention reduces the items that need to be looked up, reduces the occupation of the pin resources and the bandwidth resources, and avoids the impact on the processing performance of the chip.
以下通过应用示例对本发明方法进行清楚详细的说明,应用示例仅用于说明和解释本发明的技术方案,并不用于限定本发明的保护范围。The method of the present invention will be described in detail with reference to the application examples, which are only used to illustrate and explain the technical solutions of the present invention, and are not intended to limit the scope of the present invention.
图5为本发明应用示例的方法流程图,如图5所示,包括:FIG. 5 is a flowchart of a method for applying an example of the present invention. As shown in FIG. 5, the method includes:
步骤500、配置MASK值、工作模式和相关使能等; Step 500, configuring a MASK value, a working mode, and related enabling, and the like;
这里,工作模式、相关使能等可以根据本领域技术根据经验值进行设定。Here, the operation mode, the related enablement, and the like can be set based on empirical values according to the art.
步骤501、初始化布鲁姆过滤器表内容、匹配表内容;Step 501: Initialize a Bloom filter table content and match a table content;
步骤502、初始化完成后,接收外部输入的包含条目的数据;Step 502: After the initialization is completed, receiving an externally input data including an entry;
步骤503、根据输入数据的类型,选取对应的MASK值,并将数据的KEY值与MASK进行位与操作,得到位与操作后的KEY值;Step 503: According to the type of the input data, select a corresponding MASK value, and perform bitwise operation on the KEY value of the data and the MASK to obtain a KEY value after the bit and the operation;
步骤504、使用位与操作获得的KEY值并行进行两个或两个以上CRC多项式计算,得到4个CRC计算结果;Step 504: Perform two or more CRC polynomial calculations in parallel with the KEY value obtained by the operation, and obtain four CRC calculation results;
步骤505、使用4个CRC值分别查对应的四张布鲁姆过滤器表; Step 505, using four CRC values to respectively check the corresponding four Bloom filter tables;
步骤506、查四张布鲁姆过滤器表得到四个布鲁姆过滤器的返回值; Step 506, checking four Bloom filter tables to obtain return values of four Bloom filters;
步骤507、根据四个布鲁姆过滤器的返回值判断命中或未命中;其中,四个布鲁姆过滤器的返回值均为1时,表示命中,四个bloom fitter的返回值中存在一个不为1时,表示未命中;未命中时,执行步骤516;命中时,执行步骤508;Step 507: Determine a hit or a miss according to the return values of the four Bloom filters; wherein, when the return values of the four Bloom filters are all 1, the hit is indicated, and one of the return values of the four bloom fitters exists. If it is not 1, it means that it is missing; when it is not hit, step 516 is performed; when it is hit, step 508 is performed;
步骤508、根据KEY值进行8个不同CRC的多项式计算,得到8个CRC多项式计算的CRC计算结果;Step 508: Perform 8 polynomial calculations of different CRCs according to the KEY value, and obtain CRC calculation results calculated by 8 CRC polynomials;
步骤509、根据第0个CRC的计算结果查询匹配表,得到16个匹配值(value),将第一个CRC与16个匹配值值进行比对,输出16比特的比对结果;Step 509: Query the matching table according to the calculation result of the 0th CRC, obtain 16 matching values, compare the first CRC with 16 matching value values, and output a 16-bit comparison result;
本实施例总共输出16*7bit的结果;This embodiment outputs a total of 16*7bit results;
步骤510、根据16bit结果分别送出7个CRC计算得到的最终查表地址;Step 510: Send, according to the 16-bit result, a final table lookup address calculated by seven CRC calculations;
规则:第一个CRC如果匹配,根据优先级最高的匹配结果,得到位置偏移值;例如、Rule: If the first CRC matches, the position offset value is obtained according to the highest priority matching result; for example,
1、输出的比对结果为0xffff时,即所有值均匹配,0偏移位置生效,最终的CRC1的查表输出地址为{CRC0,4’d0};1. When the output comparison result is 0xffff, that is, all values match, 0 offset position is valid, and the final CRC1 lookup table output address is {CRC0, 4'd0};
2、输出结果为0x0f**时,优先级最高匹配位第4位匹配,4偏移位置生效,最终的CRC1的查表输出地址为{CRC0,4’d4};2. When the output result is 0x0f**, the 4th bit of the highest priority match bit matches, the 4 offset position takes effect, and the final CRC1 lookup table output address is {CRC0, 4'd4};
3、输出结果为0x0011时,优先级最高匹配位第11位匹配,11偏移位置生效,最终的CRC1的查表输出地址为{CRC0,4’d11};3. When the output result is 0x0011, the highest priority match bit is matched by the 11th bit, and the 11 offset position is valid. The final CRC1 lookup table output address is {CRC0, 4'd11};
4、输出结果为0x0002时,优先级最高匹配位第14位匹配,14偏移位置生效;最终的CRC1的查表输出地址为{CRC0,4’d14;4. When the output result is 0x0002, the 14th bit of the highest priority match bit matches, and the 14 offset position takes effect; the final CRC1 lookup table output address is {CRC0, 4'd14;
综上,本发明实施例,取第一个有效的(1)的位置即为偏移值;后续有效bit均不生效;In summary, in the embodiment of the present invention, the position of the first valid (1) is the offset value; the subsequent valid bits are not valid;
CRC1~CRC7的结果同样,CRC1有效的情况下,采用CRC1的输出的结果,依次类推,如果全部无效,按照未命中的方式进行处理;The results of CRC1 to CRC7 are the same. When CRC1 is valid, the result of the output of CRC1 is used, and so on. If all are invalid, the processing is performed in a miss manner.
步骤511、获得7个CRC1至CRC7的结果;Step 511: Obtain 7 results of CRC1 to CRC7;
步骤512、判断7个CRC1至CRC7的结果是否均有效;当7个CRC1至CRC7的结果均有效时,执行步骤513;如果当7个CRC1至CRC7的结果存在不匹配,执行步骤516; Step 512, determining whether the results of the seven CRC1 to CRC7 are valid; when the results of the seven CRC1 to CRC7 are all valid, step 513; if there is a mismatch between the results of the seven CRC1 to CRC7, step 516;
步骤513、根据优先级和有效标记选取对应的CRC值;Step 513: Select a corresponding CRC value according to the priority and the valid flag.
步骤514、根据选取的CRC值查找匹配值表,得到匹配值和KEY值作为返回值;Step 514: Find a matching value table according to the selected CRC value, and obtain a matching value and a KEY value as a return value;
步骤515、将条目的KEY值与读表返回的KEY值进行匹配比对,并判断是否匹配;如果条目的KEY值与读表返回的KEY值匹配,执行步骤517;如果条目的KEY值与读表返回的KEY值不匹配,执行步骤516;Step 515: Matching the KEY value of the entry with the KEY value returned by the read table, and determining whether the match is matched; if the KEY value of the entry matches the KEY value returned by the read table, step 517 is performed; if the KEY value of the entry is read The KEY value returned by the table does not match, and step 516 is performed;
步骤516、按照预设规则进行处理;Step 516: Perform processing according to a preset rule.
步骤517、按照读表返回的结果进行处理。Step 517: processing according to the result returned by the reading table.
需要说明的是,图6为本发明实施例中实现查表处理的设备的一种硬件实体示意图,如图6所示,该设备600的硬件实体包括:处理器601、通信接口602和存储器603,其中It is to be noted that FIG. 6 is a schematic diagram of a hardware entity of a device for performing table lookup processing according to an embodiment of the present invention. As shown in FIG. 6, the hardware entity of the device 600 includes: a processor 601, a communication interface 602, and a memory 603. ,among them
处理器601通常控制设备600的总体操作。 Processor 601 typically controls the overall operation of device 600.
通信接口602可以使设备通过网络与其他终端或服务器通信。 Communication interface 602 can enable devices to communicate with other terminals or servers over a network.
存储器603配置为存储由处理器601可执行的指令和应用,还可以缓存待处理器601以及设备600中各模块待处理或已经处理的数据,可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。The memory 603 is configured to store instructions and applications executable by the processor 601, and may also cache data to be processed or processed by the processor 601 and each module in the device 600, and may be flash memory (FLASH) or random access memory (Random Access). Memory, RAM) implementation.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。It is to be understood that the phrase "one embodiment" or "an embodiment" or "an" Thus, "in one embodiment" or "in an embodiment" or "an" In addition, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention. The implementation process constitutes any limitation. The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units; they may be located in one place or distributed on multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory, ROM)、磁碟或者光盘等各种可以存储程序代码的介质。It will be understood by those skilled in the art that all or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to program instructions. The foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a read only memory (ROM), a magnetic disk, or an optical disk, and the like, which can store program codes.
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台网络设备(可以是计算设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A network device (which may be a computing device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a magnetic disk, or an optical disk.
以上所述,仅为本发明的实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only the embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. It is intended to be covered by the scope of the invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明实施例中,根据条目的KEY值,通过CRC多项式计算确定条目是否存在;确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外HASH查表地址;根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理;如此,减少了需要查表的条目,降低了对管脚资源、带宽资源的占用、避免了对芯片处理性能的影响。In the embodiment of the present invention, according to the KEY value of the entry, the CRC polynomial calculation is used to determine whether the entry exists; when the entry is determined, the matching table address is determined according to the calculation result of the CRC polynomial; and the matching table is checked according to the determined matching table address. The returned result determines the off-chip HASH lookup table address; according to the determined off-chip HASH lookup table address, the hash table is returned to obtain the KEY value, and the KEY value according to the entry and the hash check table return whether the KEY value is consistent or not. Table processing; thus, the items that need to be looked up are reduced, the occupation of pin resources and bandwidth resources is reduced, and the impact on chip processing performance is avoided.

Claims (16)

  1. 一种实现查表处理的方法,其中,包括:A method for implementing a table lookup process, which includes:
    根据条目的键KEY值,通过循环冗余校验CRC多项式计算确定条目是否存在;Determining whether an entry exists by a cyclic redundancy check CRC polynomial calculation according to the key KEY value of the entry;
    确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;When it is determined that the entry exists, the matching table address is determined according to the calculation result of the CRC polynomial;
    根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;Determining the off-chip hash HASH lookup table address according to the result of checking the matching table according to the determined matching table address;
    根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和所述哈希查表返回KEY值是否一致进行查表处理。According to the determined off-chip HASH lookup table address, the hash table is returned to obtain the KEY value, and the table is processed according to whether the KEY value of the entry and the hash table return the KEY value.
  2. 根据权利要求1所述的方法,其中,所述确定条目是否存在包括:The method of claim 1 wherein said determining whether an entry exists comprises:
    将所述条目的KEY值进行第一预设次所述CRC多项式计算;Performing the CRC polynomial calculation by using the KEY value of the entry for a first preset time;
    使用第0个所述CRC多项式的计算结果作为所述匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
    将所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
    所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定所述条目存在。When the result returned by the matching table lookup table matches the calculation result of other CRC polynomials other than the 0th CRC, it is determined that the entry exists.
  3. 根据权利要求1所述的方法,其中,所述根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理包括:所述条目的KEY值和所述哈希查表返回KEY值一致,返回所述条目;所述条目的KEY值和所述哈希查表返回KEY值不一致,确定所述条目未命中。The method of claim 1, wherein the table lookup process according to whether the KEY value of the entry and the hash check table return a KEY value are consistent: the KEY value of the entry and the hash table return a KEY value Consistently, the entry is returned; the KEY value of the entry is inconsistent with the hash table return KEY value, and the entry is determined to be missed.
  4. 根据权利要求2所述的方法,其中,所述方法还包括:The method of claim 2, wherein the method further comprises:
    所述匹配表查表返回的结果与除第0个CRC外的其他的所述CRC多项式的计算结果不匹配时,将所述条目上送到中央处理器CPU进行处 理,或将所述条目根据预设规则进行处理。If the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC, the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
  5. 根据权利要求1~4任一项所述的方法,其中,所述通过循环冗余校验CRC多项式计算确定条目是否存在之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises: before determining whether an entry exists by a cyclic redundancy check CRC polynomial calculation, the method further comprising:
    根据所述条目涉及业务设置第二预设个掩码MASK;Setting a second preset mask MASK according to the entry related to the service;
    对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;For each entry, select a corresponding type of MASK according to the packet parsing result, service step, and/or application mode;
    根据选择的MASK,对条目中无效的KEY值进行过滤;Filter the invalid KEY value in the entry according to the selected MASK;
    其中,所述报文解析结果包括报文类型。The packet parsing result includes a packet type.
  6. 根据权利要求1~4任一项所述的方法,其中,所述通过循环冗余校验CRC多项式计算确定条目是否存在之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises: before determining whether an entry exists by a cyclic redundancy check CRC polynomial calculation, the method further comprising:
    配置第三预设个布鲁姆过滤器表;Configuring a third preset Bloom filter table;
    对所述条目的KEY值进行CRC计算,获得CRC结果;Performing a CRC calculation on the KEY value of the entry to obtain a CRC result;
    使用所述CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;Use the CRC result to find all Bloom filter tables to get the filter table results;
    根据所述过滤表结果判断所述条目是否存在;Determining whether the entry exists according to the result of the filtering table;
    确定所述条目存在时,继续查表,确定所述条目不存在时,停止查表。When it is determined that the entry exists, the table continues to be checked, and when it is determined that the entry does not exist, the table check is stopped.
  7. 根据权利要求6所述的方法,其中,所述配置第三预设个布鲁姆过滤器表包括:The method of claim 6 wherein said configuring said third predetermined number of Bloom filter tables comprises:
    根据支持冲突的条目数量配置第三预设个所述布鲁姆过滤器表。The third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
  8. 一种实现查表处理的装置,其中,包括:第一判断单元、匹配表地址单元、哈希地址单元、查表处理单元;其中,An apparatus for implementing a table lookup process, comprising: a first determining unit, a matching table address unit, a hash address unit, and a table lookup processing unit; wherein
    第一判断单元配置为:根据条目的键KEY值,通过循环冗余校验CRC多项式计算确定条目是否存在;The first determining unit is configured to: determine, according to the key KEY value of the entry, whether the entry exists by using a cyclic redundancy check CRC polynomial calculation;
    匹配表地址单元配置为:确定条目存在时,根据CRC多项式的计算结果确定匹配表地址;The matching table address unit is configured to: when determining the existence of the entry, determine the matching table address according to the calculation result of the CRC polynomial;
    哈希地址单元配置为:根据确定的匹配表地址对匹配表进行查表后返回的结果,确定片外哈希HASH查表地址;The hash address unit is configured to: determine an off-chip hash HASH lookup table address according to a result of performing a table lookup on the matching table according to the determined matching table address;
    查表处理单元配置为:根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,根据条目的KEY值和哈希查表返回KEY值是否一致进行查表处理。The lookup table processing unit is configured to: perform a lookup table according to the determined off-chip HASH lookup table address to obtain a hash check table to return a KEY value, and perform a table lookup according to whether the KEY value of the entry and the hash check table return a KEY value.
  9. 根据权利要求8所述的装置,其中,所述第一判断单元配置为:The apparatus of claim 8, wherein the first determining unit is configured to:
    将所述条目的KEY值进行第一预设次所述CRC多项式计算;Performing the CRC polynomial calculation by using the KEY value of the entry for a first preset time;
    使用第0个所述CRC多项式的计算结果作为所述匹配表的地址进行查表;Using the calculation result of the 0th CRC polynomial as the address of the matching table to perform a table lookup;
    将所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果进行匹配;Matching the result returned by the matching table lookup table with the calculation result of other CRC polynomials other than the 0th CRC;
    所述匹配表查表返回的结果与除第0个CRC外的其他的CRC多项式的计算结果匹配时,确定所述条目存在。When the result returned by the matching table lookup table matches the calculation result of other CRC polynomials other than the 0th CRC, it is determined that the entry exists.
  10. 根据权利要求8所述的装置,其中,所述查表处理单元配置为:The apparatus of claim 8 wherein said lookup table processing unit is configured to:
    根据确定的片外HASH查表地址进行查表获得哈希查表返回KEY值,所述条目的KEY值和所述哈希查表返回KEY值一致,返回所述条目;所述条目的KEY值和所述哈希查表返回KEY值不一致,确定所述条目未命中。Performing a lookup table according to the determined off-chip HASH lookup table address to obtain a hash table returning a KEY value, the KEY value of the entry is consistent with the return value of the hash table, and returning the entry; the KEY value of the entry And the hash table returns an inconsistency in the KEY value, determining that the entry misses.
  11. 根据权利要求9所述的装置,其中,所述查表处理单元还配置为:The apparatus of claim 9, wherein the lookup table processing unit is further configured to:
    所述匹配表查表返回的结果与除第0个CRC外的其他的所述CRC多项式的计算结果不匹配时,将所述条目上送到中央处理器CPU进行处理,或将所述条目根据预设规则进行处理。If the result returned by the matching table lookup table does not match the calculation result of the other CRC polynomial except the 0th CRC, the entry is sent to the CPU of the central processing unit for processing, or the entry is based on Preset rules are processed.
  12. 根据权利要求8~11任一项所述的装置,其中,所述装置还包括设置掩码单元、掩码选择单元、过滤单元;其中,The apparatus according to any one of claims 8 to 11, wherein the apparatus further comprises a setting mask unit, a mask selecting unit, and a filtering unit; wherein
    设置掩码单元配置为:根据所述条目涉及业务设置第二预设个掩码 MASK;Setting a mask unit is configured to: set a second preset mask MASK according to the entry related to the service;
    掩码选择单元配置为:对每一个条目,分别根据报文解析结果、业务步骤、和/或应用模式选择相应类型的MASK;The mask selection unit is configured to: select, for each entry, a corresponding type of MASK according to the packet parsing result, the service step, and/or the application mode;
    过滤单元配置为:根据选择的MASK,对条目中无效的KEY值进行过滤;其中,所述报文解析结果包括报文类型。The filtering unit is configured to: filter the invalid KEY value in the entry according to the selected MASK; wherein the packet parsing result includes the packet type.
  13. 根据权利要求8~11任一项所述的装置,其中,所述装置还包括配置单元、第二计算单元、第二查表单元、第二确定单元和第二处理单元;其中,配置单元配置为:配置第三预设个布鲁姆过滤器表;The apparatus according to any one of claims 8 to 11, wherein the apparatus further comprises a configuration unit, a second calculation unit, a second lookup table unit, a second determination unit, and a second processing unit; wherein the configuration unit configuration To: configure a third preset Bloom filter table;
    第二计算单元配置为:对所述条目的KEY值进行CRC计算,获得CRC结果;The second calculating unit is configured to perform a CRC calculation on the KEY value of the entry to obtain a CRC result;
    第二查表单元配置为:使用所述CRC结果查找所有布鲁姆过滤器表,得到过滤表结果;The second look-up table unit is configured to: find all the Bloom filter tables by using the CRC result, and obtain a filter table result;
    第二确定单元配置为:根据所述过滤表结果判断所述条目是否存在;The second determining unit is configured to: determine, according to the result of the filtering table, whether the entry exists;
    第二处理单元配置为:确定所述条目存在时,继续查表,确定所述条目不存在时,停止查表。The second processing unit is configured to: when it is determined that the item exists, continue to look up the table, and determine that the item does not exist, stop searching the table.
  14. 根据权利要求13所述的装置,其中,所述配置单元配置为:The apparatus of claim 13 wherein said configuration unit is configured to:
    根据支持冲突的条目数量配置第三预设个所述布鲁姆过滤器表。The third predetermined one of the Bloom filter tables is configured according to the number of entries supporting the conflict.
  15. 一种实现查表处理的设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至7任一项所述的一种实现查表处理的方法中的步骤。An apparatus for performing a look-up table process, comprising a memory and a processor, the memory storing a computer program executable on a processor, the processor executing the program to implement any one of claims 1 to A step in a method of implementing a table lookup process.
  16. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至7任一项所述一种实现查表处理的方法中的步骤。A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of a method for implementing table lookup processing according to any one of claims 1 to 7.
PCT/CN2018/079946 2017-03-31 2018-03-22 Method and device for implementing table lookup processing, apparatus, and storage medium WO2018177184A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710210525.1A CN108664518B (en) 2017-03-31 2017-03-31 Method and device for realizing table look-up processing
CN201710210525.1 2017-03-31

Publications (1)

Publication Number Publication Date
WO2018177184A1 true WO2018177184A1 (en) 2018-10-04

Family

ID=63674222

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/079946 WO2018177184A1 (en) 2017-03-31 2018-03-22 Method and device for implementing table lookup processing, apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN108664518B (en)
WO (1) WO2018177184A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445771A (en) * 2020-12-10 2021-03-05 阿米华晟数据科技(江苏)有限公司 Data processing method, device and equipment of network flow and storage medium
CN114584482A (en) * 2022-02-14 2022-06-03 阿里巴巴(中国)有限公司 Method and device for storing detection data based on memory and network card
CN117411738A (en) * 2023-12-15 2024-01-16 格创通信(浙江)有限公司 Multicast replication method, device, electronic equipment and storage medium
CN117478626A (en) * 2023-12-27 2024-01-30 天津光电聚能通信股份有限公司 Quick matching searching system, method, equipment and medium based on group connection cache

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350788A (en) * 2008-08-25 2009-01-21 中兴通讯股份有限公司 Method for mixed loop-up table of network processor inside and outside
CN101540723A (en) * 2009-04-20 2009-09-23 杭州华三通信技术有限公司 Flow stream searching method and device
US20090271437A1 (en) * 2008-04-23 2009-10-29 Microsoft Corporation Determining computer information from processor properties
CN104866502A (en) * 2014-02-25 2015-08-26 深圳市中兴微电子技术有限公司 Data matching method and device
CN105376159A (en) * 2014-08-25 2016-03-02 深圳市中兴微电子技术有限公司 Packet processing and forwarding device and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030223417A1 (en) * 2002-06-04 2003-12-04 Masashi Higashida Method of processing data packets
CN1238996C (en) * 2003-01-27 2006-01-25 四川南山之桥微电子有限公司 Network filtering processor
US20130111122A1 (en) * 2011-10-31 2013-05-02 Futurewei Technologies, Inc. Method and apparatus for network table lookups
CN102682116B (en) * 2012-05-14 2014-06-11 中兴通讯股份有限公司 Method and device for processing table items based on Hash table
CN102761394A (en) * 2012-07-05 2012-10-31 中兴通讯股份有限公司 Method and device for processing data
CN103001878B (en) * 2012-11-26 2018-02-16 中兴通讯股份有限公司 The determination method and device of MAC Address hash-collision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271437A1 (en) * 2008-04-23 2009-10-29 Microsoft Corporation Determining computer information from processor properties
CN101350788A (en) * 2008-08-25 2009-01-21 中兴通讯股份有限公司 Method for mixed loop-up table of network processor inside and outside
CN101540723A (en) * 2009-04-20 2009-09-23 杭州华三通信技术有限公司 Flow stream searching method and device
CN104866502A (en) * 2014-02-25 2015-08-26 深圳市中兴微电子技术有限公司 Data matching method and device
CN105376159A (en) * 2014-08-25 2016-03-02 深圳市中兴微电子技术有限公司 Packet processing and forwarding device and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445771A (en) * 2020-12-10 2021-03-05 阿米华晟数据科技(江苏)有限公司 Data processing method, device and equipment of network flow and storage medium
CN114584482A (en) * 2022-02-14 2022-06-03 阿里巴巴(中国)有限公司 Method and device for storing detection data based on memory and network card
CN114584482B (en) * 2022-02-14 2023-09-08 阿里巴巴(中国)有限公司 Method, device and network card for storing detection data based on memory
CN117411738A (en) * 2023-12-15 2024-01-16 格创通信(浙江)有限公司 Multicast replication method, device, electronic equipment and storage medium
CN117411738B (en) * 2023-12-15 2024-03-08 格创通信(浙江)有限公司 Multicast replication method, device, electronic equipment and storage medium
CN117478626A (en) * 2023-12-27 2024-01-30 天津光电聚能通信股份有限公司 Quick matching searching system, method, equipment and medium based on group connection cache
CN117478626B (en) * 2023-12-27 2024-04-05 天津光电聚能通信股份有限公司 Quick matching searching system, method, equipment and medium based on group connection cache

Also Published As

Publication number Publication date
CN108664518B (en) 2021-12-07
CN108664518A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
WO2018177184A1 (en) Method and device for implementing table lookup processing, apparatus, and storage medium
WO2018099107A1 (en) Hash table management method and device, and computer storage medium
CN103425725B (en) Hash collision reduction system
US8908564B2 (en) Method for Media Access Control address learning and learning rate suppression
US11182365B2 (en) Systems and methods for distributed storage of data across multiple hash tables
US9811777B2 (en) Rule matching method and apparatus for deep packet inspection
JP2004229163A (en) Device and method for retrieving fixed length data, computer program, and computer readable recording medium
US20170170968A1 (en) Method and apparatus for generating two-dimensional matrix, and method and apparatus for querying key value element
JP2007507915A (en) Apparatus and method for classifier identification
WO2014012390A1 (en) Data processing method and apparatus, and shared storage device
US10776427B2 (en) Efficient conditional state mapping in a pattern matching automaton
CN104299637A (en) Flash memory device and operation method thereof
JP2017519433A (en) Multi-table hash-based lookup for packet processing
US20160132559A1 (en) Tcam-based table query processing method and apparatus
GB2500292A (en) Managing a stack of identifiers of free blocks in a storage pool using a hash based linked list
US10545867B2 (en) Device and method for enhancing item access bandwidth and atomic operation
US8510750B2 (en) Method for caching resource representations in a contextual address space
CN108345648B (en) Method and device for acquiring log information based on columnar storage
US7657654B2 (en) Hashing assist for network processors
US10846598B2 (en) Pattern matching
US8312152B2 (en) Method, apparatus, and system for reassigning a network address
US8359528B2 (en) Parity look-ahead scheme for tag cache memory
US11210280B2 (en) Systems and methods for fast bloom filter operations
WO2024016863A1 (en) Rule lookup method and apparatus, device and computer-readable storage medium
CN111177198B (en) Content searching method for chip

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18778348

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18778348

Country of ref document: EP

Kind code of ref document: A1