WO2014127605A1 - Procédé et système d'apprentissage matériel d'adresse mac fondés sur une table de hachage et une table tcam - Google Patents

Procédé et système d'apprentissage matériel d'adresse mac fondés sur une table de hachage et une table tcam Download PDF

Info

Publication number
WO2014127605A1
WO2014127605A1 PCT/CN2013/080000 CN2013080000W WO2014127605A1 WO 2014127605 A1 WO2014127605 A1 WO 2014127605A1 CN 2013080000 W CN2013080000 W CN 2013080000W WO 2014127605 A1 WO2014127605 A1 WO 2014127605A1
Authority
WO
WIPO (PCT)
Prior art keywords
entry
tcam
mac address
hash table
hash
Prior art date
Application number
PCT/CN2013/080000
Other languages
English (en)
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 WO2014127605A1 publication Critical patent/WO2014127605A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags

Definitions

  • the present invention relates to the field of MAC (Media Access Control) address learning, and particularly relates to a MAC address hardware learning based on a HASH (Hash) table and a TCAM (Ternary Content Addressable Memory) table.
  • HASH Hash
  • TCAM Ternary Content Addressable Memory
  • VPLS Virtual Private LAN Service
  • MPLS Multi-Protocol Label Switching
  • the VPLS guides the forwarding of user packets by looking up the MAC address forwarding table of the VSI (Virtual Switch Instance).
  • the MAC address forwarding table is created through the MAC address learning function. Therefore, the MAC address learning function is a key factor in implementing VPLS.
  • the two trigger conditions for MAC address learning are:
  • a VSI receives a known source MAC address, but the corresponding forwarding entry needs to be updated. For example, the receiving VP (Virtual Port, virtual switching port in the VSI) has changed.
  • VP Virtual Port, virtual switching port in the VSI
  • the hash algorithm maps binary values of arbitrary length to smaller binary values of fixed length to achieve data compression, and suppresses data conflicts generated by mapping by breaking and discretizing the original data.
  • hashing algorithms include MD2 (Message Digest Algorithm 2, Message Digest Algorithm Second Edition), MD5 (Message Digest Algorithm 5, Message Digest Algorithm Fifth Edition), CRC (Cyclic Redundancy Check) 32, etc. . In practical applications, CRC32 is often used as a hash algorithm.
  • the single hash bucket cache conflict method reduces the collision probability by extending the number of discrete values. For each lbit discrete value, the conflict table capacity needs to be doubled, so the conflict table resource is wasted. Moreover, since this method relies entirely on discrete values for the location of entries, no matter how the entries are expanded, it is not always possible to cache multiple MAC addresses with identical discrete values. In addition, when the MAC address sample changes, the probability of collision allowed in the system design cannot be guaranteed.
  • ASIC Application Specific Integrated Circuit
  • the multi-bucket cache conflict method largely solves the problem that a single hash bucket cannot cache the same MAC address with the same discrete value, and the utilization efficiency of hardware resources is also relatively high.
  • this method requires a large number of conflict buckets to work together, and requires dedicated The hardware circuit supports, and the search method of the idle entry in each conflict bucket requires a dedicated hardware circuit to implement the search algorithm. Since the algorithm implemented is not disclosed, the application is not flexible; in addition, since the method only utilizes the current conflict The free table entry resource in the bucket caches the conflict. Therefore, only up to 8 MAC addresses with the same discrete value can be cached. The ability to cache conflicts is limited for more severe cases with the same discrete value. Summary of the invention
  • the object of the present invention is to overcome the deficiencies of the above background art, and to provide a MAC address hardware learning method and system based on a hash table and a TCAM table, which are implemented on a universal programmable switching chip without the support of a dedicated hardware circuit.
  • the learning rate is higher; the occupied memory resources are less, the general algorithm is adopted, the application is flexible, and the collision probability can be completely controlled.
  • the MAC address hardware learning method based on the hash table and the TCAM table provided by the present invention includes the following steps:
  • the virtual forwarding instance number is the virtual forwarding instance number to which the packet belongs;
  • the MAC address is the source MAC address of the packet;
  • the table entry full flag is set to 1, indicating that the TCAM table has been learned. Search in the item;
  • the source MAC address of the packet, the virtual forwarding instance number of the packet, and the virtual switching port received by the packet are stored in the current hash entry, and the valid entry of the entry is set to 1, and the process proceeds to S15.
  • TCAM memory does not have a free entry, give up learning, go to S15;
  • the virtual forwarding instance number of the key value is filled in as the virtual forwarding instance number of the packet, and the mask is set to 1 ;
  • the MAC address is filled in as the source MAC address of the packet, and the mask is set. 1;
  • the entry full flag is set to 1, the mask is set to 1;
  • the virtual switch port in the data is filled in as the packet actually receives the virtual switch port, go to S15;
  • step S1 the step of initializing the entry is further included: determining whether the index of the initialization entry is greater than the maximum value of the entry, and if yes, returning an exception; otherwise, determining whether the index value of the initialization entry is located in the hash.
  • initialize the hash table directly locate the hash table with the initialization index value, and clear all the contents of the table entry; otherwise, determine whether the index of the initialization entry is the last item of the TCAM, if yes , initializes the last TCAM entry, all fields in the key value are initialized to 0, the mask is 0, all fields in the data are assigned a value of 0, indicating that the entry is the last entry of the TCAM; otherwise, the key value is The middle entry full flag is cleared to 0, and the mask is set to 1, indicating that the initial state of the current entry is empty, the remaining fields in the key value are cleared to 0, the mask is cleared to 0, the valid entry of the entry in the data is set to 1, and the remaining fields are cleared to 0.
  • the step of aging includes the step of aging: determining whether the index of the aging entry is greater than the maximum value of the entry, and if yes, returning an exception; otherwise, determining whether the index value of the aging entry is located in the hash table index If yes, the aging hash table is used to directly locate the hash table with the initial index value, and clear the contents of the entry to 0; otherwise, determine whether the aging entry index is the last item of the TCAM, and if so, Indicates that the last item of the TCAM is an entry matching any key value, and the aging is ended; otherwise, the full value of the table entry in the key value is cleared to 0, the mask is set to 1, the remaining fields are cleared to 0, the mask is cleared to 0, and the entry status is set. If the value is set to null, the valid entry of the entry in the data is set to 1, and the remaining fields are cleared to 0, indicating that the entry is not the last entry,
  • the hash table is stored in SRAM or DRAM.
  • the TCAM entry is stored in a TCAM memory.
  • the present invention also provides a MAC address hardware learning system based on a hash table and a TCAM table, including a search unit, a TCAM entry determination unit, a hash table determination unit, a hash table comparison unit, and a hash collision processing unit, where:
  • the searching unit is configured to: calculate a hash value by using a virtual forwarding instance number and a source MAC address to which the packet belongs, and search the hash table by using a hash value; organize the search for the key value of the TCAM entry: virtual forwarding instance
  • the number is the virtual forwarding instance number to which the packet belongs.
  • the MAC address is the source MAC address of the packet. If the entry full flag is set to 1, the search is performed in the learned TCAM entry.
  • the TCAM entry determining unit is configured to: determine whether a valid flag in the TCAM entry data is set, and if set, compare whether the virtual switch port in the TCAM entry data is equal to the packet receiving virtual switch port, and if yes, The table entry is not updated; otherwise, the virtual switch port in the current TCAM entry data is updated to actually receive the virtual switch port; if not set, the hash table judgment trigger signal is generated and sent to the hash table judgment unit;
  • the hash table determining unit is configured to: when receiving the hash table determining the trigger signal, determine whether the data valid flag in the hash table is set, if not set, the source MAC address of the packet and the virtual forwarding of the packet.
  • the virtual switch port received by the instance number and the packet is stored in the current hash entry, and the valid entry of the entry is set to 1. If set, the comparison trigger signal is generated and sent to the hash table comparison unit.
  • the hash table comparison unit is configured to: when receiving the comparison trigger signal, compare whether the virtual forwarding instance number and the MAC address in the hash table match the virtual forwarding instance number and the MAC address to which the packet belongs, and if yes, Indicates that the current address has been learned in the hash table. Compares whether the virtual switch port in the current hash table is equal to the actual virtual switch port received by the packet. If they are equal, the learning is ended. Otherwise, the update is performed.
  • the virtual forwarding port number in the pre-hash entry is the actual virtual port number received by the packet, and the learning is ended; if not, the hash conflict processing trigger signal is generated and sent to the hash conflict processing unit;
  • the hash conflict processing unit is configured to: when receiving the hash conflict processing trigger signal, organize to search for a key value of the TCAM entry to find an idle TCAM entry cache conflict: the virtual forwarding instance number in the key value is 0, the MAC address 0, the entry full flag is 0, indicating that the search is in the idle TCAM entry; then it is determined whether the valid flag in the TCAM data is set, if set, the first free entry is found, and the MAC address is cached to the current In the idle TCAM entry, the virtual forwarding instance number of the key is filled in as the virtual forwarding instance number of the packet, the mask is set to 1, the MAC address is filled in as the source MAC address of the packet, the mask is set to 1, and the entry full flag is set to 1. The mask is set to 1.
  • the virtual switch port in the data is filled in as the packet actually receives the virtual switch port, and the learning is ended. If it is not set, it indicates that the TCAM memory has no free entry, and the learning is abandoned.
  • the method further includes: an initialization unit, configured to: determine whether the index of the initialization entry is greater than the maximum value of the entry, and if yes, return an exception; otherwise, determine whether the index value of the initialization entry is in the index range of the hash table Inside, if yes, initialize the hash table, directly locate the hash table with the initialization index value, and clear all the contents of the table entry; otherwise, determine whether the index of the initialization entry is the last item of the TCAM, and if so, initialize The last TCAM entry, all the fields in the key value are initialized to 0, the mask is 0, all fields in the data are assigned 0, indicating that the entry is the last entry of the TCAM; otherwise, the key in the key entry The full flag is cleared to 0, and the mask is set to 1, indicating that the initial state of the current entry is empty, the remaining fields in the key value are cleared to 0, the mask is cleared to 0, the valid entry of the entry in the data is set to 1, and the remaining fields are cleared to 0,
  • the aging unit is further configured to: determine whether the index of the aging entry is greater than the maximum value of the entry, and if yes, return an exception; otherwise, determine whether the index value of the aging entry is in the index range of the hash table.
  • the aging hash table directly locates the hash table with the initial index value, and clears the contents of the entry to 0; otherwise, determines whether the aging entry index is the last item of the TCAM, and if so, The last item of the TCAM is an entry that matches any key value, and the aging is ended; otherwise, the full value of the table entry in the key value is cleared to 0, the mask is set to 1, the remaining fields are cleared to 0, the mask is cleared to 0, and the state of the entry is set. If it is empty, the valid entry of the entry in the data is set to 1, and the remaining fields are cleared to 0, indicating that the entry is not the last entry, and the aging ends.
  • the hash table is stored in an SRAM or a DRAM.
  • the TCAM entry is stored in a TCAM memory.
  • the present invention uses a hash table to store the learned MAC address when there is no MAC address conflict.
  • the hash table hardware is implemented by SRAM or DRAM, and the capacity and bandwidth can be made larger, and the hash is preferred. Tables store address entries and take full advantage of AM's large-capacity hardware resources.
  • the TCAM table is used to cache the conflicting MAC address.
  • the TCAM table hardware is implemented by TCAM memory. Since the TCAM hardware is parallel search, the free entry can be located in one search, and the number of TCAM entries is It is the number of conflicting MAC addresses that can actually be cached. Therefore, not only can the advantages of TCAM fast parallel search be fully utilized, but also the collision probability can be fully controlled.
  • the hash table since the hash table is not used to cache the conflicting MAC address, it occupies Less memory resources.
  • the present invention can be implemented on a general-purpose programmable switching chip, does not require the support of a dedicated hardware circuit, and adopts a general-purpose algorithm, and the application is very flexible.
  • the present invention uses the TCAM table to buffer the conflicting MAC address.
  • the total number of conflicting MAC addresses that can be cached is less than the total amount of TCAMs opened, and the probability of collision is controllable.
  • the number of conflicting MAC addresses that can be cached is determined. The constant, does not change with the change of the MAC address sample, the ability to cache the conflicting MAC address is guaranteed, even in the worst case of conflict, the TCAM table can still cache almost all MAC address conflicts.
  • 1 is a flow chart of initialization of an entry in an embodiment of the present invention.
  • FIG. 2 is a flow chart of a MAC address hardware learning method based on a hash table and a TCAM table in an embodiment of the present invention.
  • FIG. 3 is a flow chart of aging in an embodiment of the present invention. detailed description
  • TCAM is a three-state content-addressable memory.
  • Each bit of data in the TCAM has three states: In addition to the normal "0" and "1", there is also a “don't care” (ie, there is no need to match the bit). State, so called “three states.”
  • the "three-state” function is implemented by a mask, that is, the mask is 0, indicating "dont' t care "given key value; a mask of 1, indicating that an exact key value needs to be matched exactly.
  • This feature of TC AM allows it to perform both exact and fuzzy matching.
  • Another feature of TCAM is that "Parallel lookup", that is, given a key value, the TCAM will match all hardware entries at the same time, and return the index of the entry with the smallest address index value.
  • the AM storage hash table is used as the main memory for MAC address learning, and the characteristics of the "three-state storage" and the "parallel search" of the TCAM memory are combined to cache the conflicting MAC address.
  • the hash table acts as the main memory for the MAC address
  • the TCAM table is responsible for the core functions of the cache address conflict.
  • the hash table and the TCAM table cooperate with each other to complete the function of MAC address learning, and the implementation requires initialization, address learning, and address aging to achieve the three.
  • the hash table is stored in SRAM or DRAM, and the TCAM entry is stored in the TCAM memory.
  • the data structure of the hash table includes the virtual forwarding instance (Vsi), the Mac address, the table valid flag (Valid), and the virtual switch port (Vp).
  • Table 1 Data structure definition table of hash table As shown in Table 2, the data structure of the TCAM entry includes the key value (Key) and the data (Data).
  • the key value includes the virtual forwarding instance (Vsi), the Mac address, and the table entry full flag (FlagFull), and the data ( Data) includes the entry valid flag (Valid) and the virtual switch port (Vp).
  • the process of initializing an entry in the embodiment of the present invention is as follows:
  • Step 101 Determine whether the index of the initialization entry is greater than the maximum value of the entry, and if yes, go to step 102; otherwise, go to step 103;
  • Step 102 the index of the initialization entry exceeds the maximum value of the entry, returns an exception, and proceeds to step 108;
  • Step 103 determining whether the initialization table entry index value is within the hash table index range, and if so, then proceeds to step 104; otherwise, proceeds to step 105;
  • Step 104 Initialize the hash table, directly locate the hash table entry by using the initialization index value, and clear all the contents of the entry to 0, and go to step 108;
  • Step 105 Determine whether the initialization entry index is the last item of the TCAM, and if yes, go to step 106; otherwise, go to step 107;
  • Step 106 Initialize the last TCAM entry, all fields in the key value are initialized to 0, and the mask is 0, that is, the entry is a "catch all" (match any key value) entry; all fields in the data If the entry is 0, it indicates that the entry is the last entry of the TCAM and cannot be used to cache address conflicts.
  • the last entry of the TCAM is: (1) When the service forwards the entry, the entire TCAM table can be judged. The MAC address is not cached in the entry, so the hash table needs to be searched to guide the service forwarding. (2) When the MAC address learns to search for the idle entry, the TCAM conflict cache is full and the cache cannot be cached again. The MAC address is; therefore, the total amount of conflicts that can actually be cached is the total number of TCAM entries minus 1, go to step 108;
  • step 107 the full value of the entry in the key value is cleared to 0, and the mask is set to 1 (indicating that the initial state of the current entry is empty), the remaining fields in the key value are cleared to 0, the mask is cleared to 0, and the valid entry of the entry in the data is set to 1.
  • the remaining fields are cleared to 0, indicating that the entry is not the last entry, and can be used to cache the conflicting MAC address, and proceeds to step 108;
  • Step 108 the process of initializing the entry ends.
  • an embodiment of the present invention provides a MAC address hardware learning method based on a hash table and a TCAM table, including the following steps:
  • Step 201 Calculate a hash value by using a virtual forwarding instance number and a source MAC address to which the packet belongs, and search the hash table by using a hash value index.
  • Step 202 Search for the key value of the TCAM entry:
  • the virtual forwarding instance number is the virtual forwarding instance number to which the packet belongs;
  • the MAC address is the source MAC address of the packet; and
  • the table entry full flag is set to 1, indicating that the TCAM has been learned. Search in the table entry;
  • Step 203 Determine whether the valid flag in the TCAM entry data is set, if set, go to step 204; otherwise, go to step 206;
  • Step 204 comparing whether the virtual switch port in the TCAM entry data is equal to the packet receiving virtual switch port, if yes, the entry does not need to be updated, go to step 215; otherwise, the TCAM entry needs to be updated, go to step 205; Step 205, update the current TCAM entry data in the virtual switch port as the packet actually receives the virtual switch port, go to step 215;
  • Step 206 determining whether the data valid flag in the hash table is set, if set, go to step 208; otherwise, go to step 207;
  • Step 207 The source MAC address of the packet, the virtual forwarding instance number of the packet, and the virtual switching port received by the packet are stored in the current hash entry, and the valid entry of the entry is set to 1, and the process proceeds to step 215;
  • Step 208 Compare the virtual forwarding instance number and the MAC address in the hash table with the virtual forwarding instance number and the source MAC address to which the packet belongs. If the matching, the current address has been learned in the hash table, and then go to Step 209; otherwise, go to step 211;
  • Step 209 Compare whether the virtual switch port in the current hash table is equal to the packet actually receiving the virtual switch port. If they are equal, the hash table item does not need to be updated, go to step 215; otherwise, go to step 210; Step 210, update The virtual forwarding port number in the current hash entry is the actual virtual port number received by the packet, and the process proceeds to step 215.
  • Step 211 Generate a hash conflict, and organize the search for the key value of the TCAM entry to find the idle TCAM entry cache conflict: the virtual forwarding instance number in the key value is 0, the MAC address is 0, and the entry full flag is 0, indicating that it is idle. Search in the TCAM entry;
  • Step 212 determining whether the valid flag in the TCAM data is set, if set, indicating that the first free entry is found, go to step 214; otherwise, go to step 213;
  • Step 213 The TCAM memory has no free entries to cache conflicts, abandon learning, and go to the step
  • Step 214 Cache the MAC address into the current idle TCAM entry:
  • the virtual forwarding instance number of the key value is filled in as the virtual forwarding instance number of the packet, and the mask is set to 1;
  • the MAC address is filled in as the source MAC address of the packet, and the mask is Set to 1;
  • the entry full flag is set to 1, the mask is set to 1;
  • the virtual switch port in the data is filled in as the packet actually receives the virtual switch port, go to step 215;
  • Step 215 The MAC address hardware learning process ends.
  • the process of aging in the embodiment of the present invention is as follows:
  • Step 301 Determine whether the index of the aging entry is greater than the maximum value of the entry, if yes, go to step 302; otherwise, go to step 303;
  • Step 302 The index of the initialization entry exceeds the maximum value of the entry, and returns an exception. Go to step 308.
  • Step 304 aging the hash table, directly using the initialization index value to locate the hash table entry, and clear all the contents of the table entry, go to step 308;
  • Step 305 Determine whether the aging entry index is the last item of the TCAM, and if yes, go to step 306; otherwise, go to step 307;
  • Step 306 the last item of the TCAM is a "catch all" (match any key value) of the entry, once initialized does not need to operate on it, go to step 308;
  • Step 307 Clear the key of the key in the key value to 0, the mask is set to 1, the other fields are cleared to 0, the mask is cleared to 0, the state of the entry is set to null, the valid flag of the entry in the data is set to 1, and the remaining fields are cleared. , indicating that the entry is not the last entry, can be used to cache the conflicting MAC address, go to step 308;
  • Step 308 The MAC address aging process ends.
  • the embodiment of the invention further provides a MAC address hardware learning system based on a hash table and a TCAM table, including an initialization unit, a search unit, a TCAM entry determination unit, a hash table determination unit, a hash table comparison unit, and a hash collision.
  • Processing unit and aging unit wherein:
  • An initialization unit configured to: determine whether the index of the initialization entry is greater than the maximum value of the entry, and if yes, return an exception; otherwise, determine whether the index value of the initialization entry is within the index range of the hash table, and if so, initialize the hash table Directly use the initialization index value to locate the hash table entry, and clear all the contents of the table entry; otherwise, determine whether the initialization entry index is the last item of the TCAM, and if so, initialize the last TCAM entry, all in the key value
  • the fields are initialized to 0, the mask is 0, and all fields in the data are assigned a value of 0, indicating that the entry is the last entry of the TCAM; otherwise, the full value of the entry in the key value is cleared to 0, and the mask is set to 1, Indicates that the initial state of the current entry is empty, the other fields in the key value are cleared to 0, the mask is cleared to 0, the valid entry of the entry in the data is set to 1, and the remaining fields are cleared to 0, indicating that the entry is not the
  • the search unit is configured to: calculate a hash value by using the virtual forwarding instance number and the source MAC address to which the packet belongs, and search the hash table by using a hash value index, and the hash table is stored in the SRAM or the DRAM; the TCAM entry is stored.
  • the organization searches for the key value of the TCAM entry: the virtual forwarding instance number is the virtual forwarding instance number to which the packet belongs; the MAC address is the source MAC address of the packet; the table entry full flag is set to 1, indicating that it has learned Search in the TCAM entry;
  • the TCAM entry determining unit is configured to: determine whether the valid flag in the TCAM entry data is set, and if set, compare whether the virtual switch port in the TCAM entry data is equal to the packet receiving virtual switch. The port, if yes, does not update the entry; otherwise, the virtual switch port in the current TCAM entry data is updated to receive the virtual switch port for the packet; if not set, the hash table judgment trigger signal is generated and sent to the hash. Table judgment unit;
  • the hash table determining unit is configured to: when receiving the hash table determining the trigger signal, determine whether the data valid flag in the hash table is set, if not set, the source MAC address of the packet and the virtual forwarding instance number of the packet And the virtual switch port received by the packet is stored in the current hash table entry, and the entry valid flag is set to 1; if set, the comparison trigger signal is generated and sent to the hash table comparison unit;
  • the hash table comparison unit is configured to: when the comparison trigger signal is received, compare whether the virtual forwarding instance number and the MAC address in the hash table match the virtual forwarding instance number and the MAC address to which the packet belongs, and if they match, the current The address has been learned in the hash table. It compares whether the virtual switch port in the current hash table is equal to the actual virtual switch port received by the packet. If they are equal, the learning is ended. Otherwise, the virtual forwarding port number in the current hash table entry is updated. Ending the learning by actually receiving the virtual port number for the packet; if not, generating a hash conflict processing trigger signal, and sending the hash conflict processing unit to the hash conflict processing unit;
  • the hash conflict processing unit is configured to: when receiving the hash conflict processing trigger signal, organize the search for the key value of the TCAM entry to find the idle TCAM entry cache conflict: the virtual forwarding instance number in the key value is 0, and the MAC address is 0. If the entry full flag is 0, it means searching in the idle TCAM entry; then determining whether the valid flag in the TCAM data is set, if set, indicating that the first free entry is found, and the MAC address is cached to the current idle TCAM.
  • the virtual forwarding instance number of the key is filled in as the virtual forwarding instance number of the packet, the mask is set to 1, the MAC address is filled in as the source MAC address of the packet, the mask is set to 1, and the entry full flag is set to 1.
  • the code is set to 1, the virtual switch port in the data is filled in as the packet actually receives the virtual switch port, and the learning is ended; if not set, it indicates that the TCAM memory has no free entry, and the learning is abandoned;
  • the aging unit is configured to: determine whether the index of the aging entry is greater than the maximum value of the entry, and if yes, return an exception; otherwise, determine whether the index value of the aging entry is in the index range of the hash table, and if yes, the aging hash table Directly use the initial index value to locate the hash table entry, and clear all the contents of the table entry; otherwise, determine whether the aging entry index is the last item of the TCAM, and if so, the last item of the TCAM is a match for any key value. If the entry is cleared, the mask is set to 0, the remaining fields are cleared to 0, the mask is cleared to 0, the entry status is set to null, and the entry in the data is valid. 1. The remaining fields are cleared to 0, indicating that the entry is not the last entry, and the aging ends.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

La présente invention porte sur un procédé et un système d'apprentissage matériel d'adresse MAC fondés sur une table de hachage et une table TCAM, concernant le domaine de l'apprentissage d'adresse MAC. Lorsqu'il n'existe aucun conflit d'adresse MAC, une adresse MAC apprise est stockée dans la table de hachage, qui est réalisée par SRAM ou DRAM sur du matériel de table de hachage; lorsqu'il existe un conflit d'adresse MAC, l'adresse MAC en conflit est mise en cache dans la table TCAM, qui est réalisée par une mémoire TCAM sur du matériel TCAM; étant donné qu'une recherche parallèle est réalisée sur le matériel TCAM, des éléments libres peuvent être localisés par une recherche; et le nombre des éléments de la TCAM est le nombre réel d'adresses MAC en conflit pouvant être mises en cache. Le procédé et le système de la présente invention peuvent être réalisés sur une puce d'échange programmable générale, ne nécessitent pas la prise en charge d'un circuit matériel dédié, ont un taux d'apprentissage relativement élevé, occupent peu de ressources de mémoire, sont flexibles en application par adoption d'un algorithme général, et peuvent réaliser une contrôlabilité complète de la probabilité de conflit.
PCT/CN2013/080000 2013-02-21 2013-07-24 Procédé et système d'apprentissage matériel d'adresse mac fondés sur une table de hachage et une table tcam WO2014127605A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310055657.3A CN103117931B (zh) 2013-02-21 2013-02-21 基于哈希表和tcam表的mac地址硬件学习方法及系统
CN201310055657.3 2013-02-21

Publications (1)

Publication Number Publication Date
WO2014127605A1 true WO2014127605A1 (fr) 2014-08-28

Family

ID=48416209

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/080000 WO2014127605A1 (fr) 2013-02-21 2013-07-24 Procédé et système d'apprentissage matériel d'adresse mac fondés sur une table de hachage et une table tcam

Country Status (4)

Country Link
CN (1) CN103117931B (fr)
CL (1) CL2015000917A1 (fr)
MY (1) MY170382A (fr)
WO (1) WO2014127605A1 (fr)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118186A (zh) * 2020-08-28 2020-12-22 深圳市风云实业有限公司 一种交换芯片路由表项存储方法、转发方法及配置方法
CN112181309A (zh) * 2020-10-14 2021-01-05 上海德拓信息技术股份有限公司 一种海量对象存储的在线扩容方法
CN112269784A (zh) * 2020-10-28 2021-01-26 中科驭数(北京)科技有限公司 一种基于硬件实现的哈希表结构以及插入、查询和删除方法
CN112866115A (zh) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 一种实现透明串接的方法、装置、电子设备及存储介质
CN113489649A (zh) * 2021-06-29 2021-10-08 新华三信息安全技术有限公司 一种表项存储方法及装置
CN113709110A (zh) * 2021-07-27 2021-11-26 深圳市风云实业有限公司 一种软硬结合的入侵检测系统及方法
CN113726661A (zh) * 2021-08-27 2021-11-30 西安微电子技术研究所 一种高性能低功耗的路由哈希器及其控制方法
CN113765806A (zh) * 2021-09-02 2021-12-07 烽火通信科技股份有限公司 Mac地址学习方法、装置、设备及可读存储介质
CN113904987A (zh) * 2021-10-29 2022-01-07 西安微电子技术研究所 一种mac地址路由管理控制器、系统及控制方法
CN114268585A (zh) * 2019-11-07 2022-04-01 苏州盛科通信股份有限公司 基于tcam的三层路由转发的判断方法
CN115297059A (zh) * 2022-07-18 2022-11-04 浙江大学 一种基于p4的传输层负载均衡系统
WO2023024799A1 (fr) * 2021-08-24 2023-03-02 苏州盛科通信股份有限公司 Procédé de transfert de paquets, dispositif de transfert de réseau et support de stockage informatique
CN117472838A (zh) * 2023-12-28 2024-01-30 苏州元脑智能科技有限公司 高速串行计算机扩展总线设备识别方法、装置及相关设备

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117931B (zh) * 2013-02-21 2015-07-01 烽火通信科技股份有限公司 基于哈希表和tcam表的mac地址硬件学习方法及系统
CN104239337B (zh) * 2013-06-19 2019-03-26 中兴通讯股份有限公司 基于tcam的查表处理方法及装置
CN103678553A (zh) * 2013-12-06 2014-03-26 上海寰创通信科技股份有限公司 基于共享内存设计的无线终端数据库构建方法
CN103731355B (zh) * 2013-12-31 2017-01-25 迈普通信技术股份有限公司 避免mac地址学习时哈希冲突的方法及系统
CN105812264B (zh) * 2016-03-15 2019-04-19 西安电子科技大学 多路并行的mac地址学习和地址查找的装置及方法
CN107770076B (zh) * 2016-08-23 2020-12-04 中兴通讯股份有限公司 一种哈希冲突的处理方法、装置及交换设备
CN107332774B (zh) * 2017-06-09 2019-12-03 烽火通信科技股份有限公司 一种vpls中基于软硬件协同进行mac地址学习的方法
CN108632148B (zh) * 2017-12-29 2020-06-16 西安电子科技大学 基于预读取方式的学习mac地址的装置及方法
CN108307001B (zh) * 2018-04-28 2021-07-27 深圳市风云实业有限公司 Mac地址老化方法、装置及电子设备
CN109582598B (zh) * 2018-12-13 2023-05-02 武汉中元华电软件有限公司 一种基于外部存储实现高效查找哈希表的预处理方法
CN112087389B (zh) * 2019-06-14 2023-01-24 深圳市中兴微电子技术有限公司 一种报文匹配查表方法、系统、存储介质和终端
CN110674138B (zh) * 2019-09-23 2024-03-08 苏州雄立科技有限公司 一种报文搜索方法及装置
CN112003792B (zh) * 2020-07-23 2022-04-15 烽火通信科技股份有限公司 一种软硬件协同的报文加速方法和装置
CN112328593B (zh) * 2020-10-21 2023-01-31 烽火通信科技股份有限公司 一种对地址学习表进行批量配置的方法、设备及系统
CN112637072B (zh) * 2020-12-23 2022-08-02 北京时代民芯科技有限公司 一种用于交换芯片地址存储及查找的快速并行电路及方法
CN112667867B (zh) * 2020-12-31 2022-05-10 北京卓讯科信技术有限公司 一种基于tcam特征码的匹配冲突检查方法和设备
CN113779320B (zh) * 2021-08-18 2024-02-27 北京计算机技术及应用研究所 一种表项存储地址冲突的解决方法
CN114253979B (zh) * 2021-12-23 2023-10-03 北京百度网讯科技有限公司 一种报文处理方法、装置及电子设备
CN115065662A (zh) * 2022-06-13 2022-09-16 上海亿家芯集成电路设计有限公司 一种mac地址哈希冲突的处理方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538663A (zh) * 2003-04-16 2004-10-20 华为技术有限公司 一种采用哈希链表查找路由表项的方法
CN1996952A (zh) * 2006-12-18 2007-07-11 杭州华为三康技术有限公司 Tcam路由表查找方法及tcam路由表查找装置
CN101841473A (zh) * 2010-04-09 2010-09-22 北京星网锐捷网络技术有限公司 Mac地址表更新方法及装置
CN103117931A (zh) * 2013-02-21 2013-05-22 烽火通信科技股份有限公司 基于哈希表和tcam表的mac地址硬件学习方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7941559B2 (en) * 2002-04-23 2011-05-10 Tellabs Bedford, Inc. Media access control address translation for a fiber to the home system
CN100574281C (zh) * 2007-06-22 2009-12-23 中兴通讯股份有限公司 一种交换机路由表的管理方法
CN101247337B (zh) * 2008-02-18 2012-11-21 华为技术有限公司 一种报文转发的方法和设备
EP2515487B1 (fr) * 2010-01-26 2019-01-23 Huawei Technologies Co., Ltd. Procédé et dispositif pour stocker et rechercher un mot-clef
CN102880724A (zh) * 2012-10-23 2013-01-16 盛科网络(苏州)有限公司 处理哈希冲突的方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1538663A (zh) * 2003-04-16 2004-10-20 华为技术有限公司 一种采用哈希链表查找路由表项的方法
CN1996952A (zh) * 2006-12-18 2007-07-11 杭州华为三康技术有限公司 Tcam路由表查找方法及tcam路由表查找装置
CN101841473A (zh) * 2010-04-09 2010-09-22 北京星网锐捷网络技术有限公司 Mac地址表更新方法及装置
CN103117931A (zh) * 2013-02-21 2013-05-22 烽火通信科技股份有限公司 基于哈希表和tcam表的mac地址硬件学习方法及系统

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268585A (zh) * 2019-11-07 2022-04-01 苏州盛科通信股份有限公司 基于tcam的三层路由转发的判断方法
CN114268585B (zh) * 2019-11-07 2024-01-23 苏州盛科通信股份有限公司 基于tcam的三层路由转发的判断方法
CN112118186A (zh) * 2020-08-28 2020-12-22 深圳市风云实业有限公司 一种交换芯片路由表项存储方法、转发方法及配置方法
CN112181309A (zh) * 2020-10-14 2021-01-05 上海德拓信息技术股份有限公司 一种海量对象存储的在线扩容方法
CN112269784A (zh) * 2020-10-28 2021-01-26 中科驭数(北京)科技有限公司 一种基于硬件实现的哈希表结构以及插入、查询和删除方法
CN112866115A (zh) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 一种实现透明串接的方法、装置、电子设备及存储介质
CN112866115B (zh) * 2020-12-31 2023-04-07 杭州迪普科技股份有限公司 一种实现透明串接的方法、装置、电子设备及存储介质
CN113489649A (zh) * 2021-06-29 2021-10-08 新华三信息安全技术有限公司 一种表项存储方法及装置
CN113489649B (zh) * 2021-06-29 2022-07-22 新华三信息安全技术有限公司 一种表项存储方法及装置
CN113709110A (zh) * 2021-07-27 2021-11-26 深圳市风云实业有限公司 一种软硬结合的入侵检测系统及方法
CN113709110B (zh) * 2021-07-27 2023-07-21 深圳市风云实业有限公司 一种软硬结合的入侵检测系统及方法
WO2023024799A1 (fr) * 2021-08-24 2023-03-02 苏州盛科通信股份有限公司 Procédé de transfert de paquets, dispositif de transfert de réseau et support de stockage informatique
CN113726661B (zh) * 2021-08-27 2022-10-18 西安微电子技术研究所 一种高性能低功耗的路由哈希器及其控制方法
CN113726661A (zh) * 2021-08-27 2021-11-30 西安微电子技术研究所 一种高性能低功耗的路由哈希器及其控制方法
CN113765806A (zh) * 2021-09-02 2021-12-07 烽火通信科技股份有限公司 Mac地址学习方法、装置、设备及可读存储介质
CN113904987A (zh) * 2021-10-29 2022-01-07 西安微电子技术研究所 一种mac地址路由管理控制器、系统及控制方法
CN115297059A (zh) * 2022-07-18 2022-11-04 浙江大学 一种基于p4的传输层负载均衡系统
CN115297059B (zh) * 2022-07-18 2023-11-28 浙江大学 一种基于p4的传输层负载均衡系统
CN117472838A (zh) * 2023-12-28 2024-01-30 苏州元脑智能科技有限公司 高速串行计算机扩展总线设备识别方法、装置及相关设备
CN117472838B (zh) * 2023-12-28 2024-03-15 苏州元脑智能科技有限公司 高速串行计算机扩展总线设备识别方法、装置及相关设备

Also Published As

Publication number Publication date
CN103117931B (zh) 2015-07-01
CL2015000917A1 (es) 2015-07-17
CN103117931A (zh) 2013-05-22
MY170382A (en) 2019-07-27

Similar Documents

Publication Publication Date Title
WO2014127605A1 (fr) Procédé et système d'apprentissage matériel d'adresse mac fondés sur une table de hachage et une table tcam
US11102120B2 (en) Storing keys with variable sizes in a multi-bank database
US9871728B2 (en) Exact match hash lookup databases in network switch devices
US10389633B2 (en) Hash-based address matching
US7760720B2 (en) Translating native medium access control (MAC) addresses to hierarchical MAC addresses and their use
US9385957B1 (en) Flow key lookup involving multiple simultaneous cam operations to identify hash values in a hash bucket
US9569561B2 (en) Label masked addressable memory
KR100705593B1 (ko) 라우팅 시스템 및 라우팅 시스템의 룰 엔트리 관리 방법
JP5518135B2 (ja) データセンター向けの拡張可能なマルチキャスト転送方法および装置
US20150131666A1 (en) Apparatus and method for transmitting packet
CN111937360B (zh) 最长前缀匹配
US11362948B2 (en) Exact match and ternary content addressable memory (TCAM) hybrid lookup for network device
IL182820A (en) Dual data recognition mechanism for searching for an address on a communication system device
US10397116B1 (en) Access control based on range-matching
US10547547B1 (en) Uniform route distribution for a forwarding table
US7403526B1 (en) Partitioning and filtering a search space of particular use for determining a longest prefix match thereon
WO2008101423A1 (fr) Système et procédé de montage en pont
EP3742307A1 (fr) Gestion de flux de trafic de réseau
US20170012874A1 (en) Software router and methods for looking up routing table and for updating routing entry of the software router
US8503442B2 (en) Transmission information transfer apparatus and method thereof
US20170237691A1 (en) Apparatus and method for supporting multiple virtual switch instances on a network switch
KR100596385B1 (ko) 라우터에서 가상근거리통신망에 설정된 포워딩정보 처리방법

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: 13875788

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2015000917

Country of ref document: CL

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13875788

Country of ref document: EP

Kind code of ref document: A1