SE511971C2 - A lookup device and a method for classifying and forwarding data packets in data packet switching networks - Google Patents

A lookup device and a method for classifying and forwarding data packets in data packet switching networks

Info

Publication number
SE511971C2
SE511971C2 SE9703293A SE9703293A SE511971C2 SE 511971 C2 SE511971 C2 SE 511971C2 SE 9703293 A SE9703293 A SE 9703293A SE 9703293 A SE9703293 A SE 9703293A SE 511971 C2 SE511971 C2 SE 511971C2
Authority
SE
Sweden
Prior art keywords
data packet
hash
memory
packet identifier
index
Prior art date
Application number
SE9703293A
Other languages
Swedish (sv)
Other versions
SE9703293L (en
SE9703293D0 (en
Inventor
Peter Sjoedin
Andreas Moestedt
Original Assignee
Sics Swedish Inst Of Computers
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 Sics Swedish Inst Of Computers filed Critical Sics Swedish Inst Of Computers
Priority to SE9703293A priority Critical patent/SE511971C2/en
Publication of SE9703293D0 publication Critical patent/SE9703293D0/en
Priority to EP98944371A priority patent/EP1020053A2/en
Priority to CA002303261A priority patent/CA2303261A1/en
Priority to AU91926/98A priority patent/AU9192698A/en
Priority to PCT/SE1998/001585 priority patent/WO1999013620A2/en
Publication of SE9703293L publication Critical patent/SE9703293L/en
Publication of SE511971C2 publication Critical patent/SE511971C2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/04Selecting arrangements for multiplex systems for time-division multiplexing
    • H04Q11/0428Integrated services digital network, i.e. systems for transmission of different types of digitised signals, e.g. speech, data, telecentral, television signals
    • H04Q11/0478Provisions for broadband connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/256Routing or path finding in ATM switching fabrics
    • 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/3081ATM peripheral units, e.g. policing, insertion or extraction
    • H04L49/309Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7452Multiple parallel or consecutive lookup operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/205Quality of Service based
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a lookup device and a method for classification and forwarding of packets in packet-switched networks, wherein each packet comprises a packet header comprising a number of fields, wherein several fields in the packet header together form a packet identifier. The lookup device (30) comprises n parallel hashing units (321, 322, ... 32n), wherein n is an integer and n>/=2, for computing, for each packet, a first index by hashing the packet identifier, and in dependence of the first index either directly or indirectly obtaining a packet identifier and forwarding information for the destination for said packet from one of at least n memories . The n hashing units (321, 322, ... 32n) are processing the same packet identifier at a time. The lookup device (30) also comprises a comparator (42) connected either directly or indirectly to at least one of said memories and to an input to said n hashing units (321, 322, ... 32n) for comparing the packet identifier input to the n hashing (321, 322, ... 32n) and the packet identifier output from said memory. When the compared packet identifiers match, the forwarding information for the packet is obtained from said memory.

Description

15 20 30 35 511971 2 för en ATM-cell eller en Internet-ram. Ett vanligt uppslag- ningsförfarande är att använda ett haschningsschema. 15 20 30 35 511971 2 for an ATM cell or an Internet frame. A common lookup procedure is to use a hashing scheme.

I artikeln ”A Comparison of Hashing Schemes för Address Lookup in Computer Networks", av R. Jain, IEEE Transactions on Communication, vol. 40, nr. 10, sid. 1570-1573, 1992, vi- sas olika hashningsförfaranden. De beskrivna hasningsförfa- randena är: Hashning med användning av adressbitar, kJ Hashning med användning av CRC-polynom, Hashning med användning av en annan kontrollsumma, och U1J>bJf\) ) ) ) Hashning med användning av Fletscher-kontrollsumma, ) ) Hashning med användning av XELLER-faltning.In the article "A Comparison of Hashing Schemes for Address Lookup in Computer Networks", by R. Jain, IEEE Transactions on Communication, vol. 40, no. 10, pp. 1570-1573, 1992, various hashing procedures are shown. the hashing procedures are: Hashning using address bits, kJ Hashning using the CRC polynomial, Hashning using another checksum, and U1J> bJf \)))) Hashning using Fletscher checksum,)) Hashning using of XELLER folding.

Artikeln ”Large-scale and High-speed Interconnection of Multiple FDDI using ATM-based Backbone LAN” av T. Tsukakoshi, O. Takada, T. Murakami, M. Terada, M. Yamaga, IEEE INFOCOM 1992, vol. 3, sid. 2290-2298, maj 1992, beskriver en lösning på problemet att en hashfunktion kan avbilda flera identifie- rare i samma tabelläge. Hashningsmekanismen enligt denna lös- ning placerar alla poster i samma minne, och beräknar hash- värdet ett variabelt antal gånger till dess att ingen kolli- sion inträffar.The article “Large-scale and High-speed Interconnection of Multiple FDDI using ATM-based Backbone LAN” by T. Tsukakoshi, O. Takada, T. Murakami, M. Terada, M. Yamaga, IEEE INFOCOM 1992, vol. 3, p. 2290-2298, May 1992, describes a solution to the problem that a hash function can map several identifiers in the same table mode. The hashing mechanism according to this solution places all records in the same memory, and calculates the hash value a variable number of times until no collision occurs.

Hashtabeller implementeras karakteristiskt såsom en ta- bell med listor, där varje tabellpost är en lista av identi- fierare som delar detta index. Nackdelen med en sådan organi- sation är att den erfordrar repetitiv åtkomst till minne i syfte att utföra en uppslagning, vilket sänker prestandan.Hashtables are typically implemented as a table of lists, where each table entry is a list of identifiers that share this index. The disadvantage of such an organization is that it requires repetitive access to memory in order to perform a lookup, which lowers performance.

Många sådana schemor litar desutom på endast en hashfunktion, och återhashning måste utföras om fördelningen blir alltför snäv.In addition, many such schemes rely on only one hash function, and re-hashing must be performed if the distribution becomes too narrow.

Sammanfattning av uppfinningen Ändamålet med föreliggande uppfinning är att lösa de ovan nämnda problemen och att åstadkomma en uppslagningsan- ordning för klassicifering och vidarebefordning av datapaket, där varje datapaket innefattar ett datapaketshuvud innefat- tande ett antal fält, varvid flera fält i datapaketshuvudet tillsammans bildar en datapaketsidentifierare. Detta ändamål 10 15 20 25 30 35 511971 3 erhålles genom att åstadkomma uppslagningsanordningen defini- erad i ingressen av patentkravet 1 med de fördelaktiga egen- skaperna hos den kännetecknande delen av nämnda patentkrav.SUMMARY OF THE INVENTION The object of the present invention is to solve the above-mentioned problems and to provide a look-up device for classifying and forwarding data packets, each data packet comprising a data packet header comprising a number of fields, several fields in the data packet header together forming a data packet header. . This object is obtained by providing the look-up device defined in the preamble of claim 1 with the advantageous properties of the characterizing part of said claim.

Uppslagningsanordningen enligt föreliggande uppfinning innefattar n parallella hashningsenheter, där n är ett heltal och n22, för att beräkna för varje datapaket ett första index genom att hasha datapaketsidentifieraren, och i beroende av det första indexet antingen direkt eller indirekt erhålla en datapaketsidentifierare och vidarebefordringsinformation för destinationen för datapaketet från ett av åtminstone n min- nen, varvid de n hashningsenheterna behandlar samma datapa- ketsidentifierare åt gången. Uppslagningsanordningen innfat tar också en jämförare ansluten antingen direkt eller indi- rekt till åtminstone ett av nämnda minnen och en ingång hos de n hashningsenheterna för att jämföra datapaketsidentifie- raren inmatad till de n hashningsenheterna och datapakets- identifieraren utmatad från minnet. När de jämförda datapa- ketsidentifierarna matchar varandra erhålles vidarebeford- ringsinformationen för datapaketet från minnet. Huvudfördelen med denna konstruktion är att en ny datapaketsidentifierare kan uppslås i varje minnescykeltid. En annan fördel med denna konstruktion är att den tillåter flera tabelluppslagningar att utföras under en minnescykeltid, eftersom uppslagningarna utföres parallellt.The lookup device according to the present invention comprises n parallel hashing units, where n is an integer and n22, for calculating for each data packet a first index by hashing the data packet identifier, and depending on the first index either directly or indirectly obtaining a data packet identifier and forwarding information for the destination for the data packet from one of at least n memories, the n hashing units processing the same data packet identifier at a time. The storage device also includes a comparator connected either directly or indirectly to at least one of said memories and an input of the n hashing units for comparing the data packet identifier input to the n hashing units and the data packet identifier output from the memory. When the compared data packet identifiers match each other, the forwarding information for the data packet is obtained from the memory. The main advantage of this design is that a new data packet identifier can be set up in each memory cycle time. Another advantage of this design is that it allows multiple table lookups to be performed during a memory cycle time, since the lookups are performed in parallel.

Varje hashningsenhet innefattar fördelaktigtvis ett hashfunktionsorgan för att beräkna det första indexet, och ett hashminne anslutet till hashfunktionsorganet.Each hash unit advantageously comprises a hash function means for calculating the first index, and a hash memory connected to the hash function means.

Uppslagningsanordningen använder företrädesvis n olika hashfunktioner, en hashfunktion för varje hashfunktionsorgan.The look-up device preferably uses n different hash functions, one hash function for each hash function means.

Härigenom åstadkommes att behovet av àterhashning effektivt minskas, och förhoppningsfullt elimineras, eftersom identifi- erarna sprids på flera oberoende hashfunktioner.This ensures that the need for re-hashing is effectively reduced, and hopefully eliminated, as the identifiers are spread across several independent hash functions.

De n hashningsenheterna är företrädesvis ordnade med prioritet, varvid den första hashningsenheten har den högsta prioriteten, och hashningsenheten n har den lägsta priorite- ten. 10 15 20 25 30 35 511971 4 Det första hashminnet, som representerar den högsta ni- vån i uppslagningsanordningen, har företrädesvis den största minnesstsorleken och hashminnet n, som representerar den lägsta nivån i uppslagningsanordningen har den minsta minnes- storleken.The n hashing units are preferably arranged with priority, the first hashing unit having the highest priority, and the hashing unit n having the lowest priority. The first hash memory, which represents the highest level in the storage device, preferably has the largest memory size and the hash memory n, which represents the lowest level in the storage device, has the smallest memory size.

Minnesstorlekarna för de n hashminnena minskar företrä- desvis väsentligen linjärt. Härigenom åstadkommes den mest effektiva minnesanvändningen.The memory sizes of the n hash memories preferably decrease substantially linearly. This achieves the most efficient memory use.

Fördelaktigtvis är alla minnen statiska direktåtkomst- minnen (SRAM) och/eller dynamiska direktåtkomstminnen (DRAM).Advantageously, all memories are static direct access memories (SRAM) and / or dynamic direct access memories (DRAM).

Det första indexet fungerar företrädesvis såsom en in- signal till hashminnet som ger en datapaketsidentifierare och vidarebefordringsinformation för destinationen och en träff- flagga såsom utsignaler. Uppslagningsanordningen innefattar också ett väljarorgan anslutet till träfflaggsutgången hos alla n hashminnen, en multiplexor ansluten till datapakets- identifierar- och vidarebefordringsinformationsutgångarna hos alla n hashminnen varvid jämföraren är ansluten till multi- plexorn. En satt träfflagga indikerar att det fanns en post i hashminnet med det första indexet erhållet genom att hasha datapaketsidentifieraren, och datapaketsidentifieraren från hashminnet med den högsta prioriteten med satt träfflagga, om någon, används såsom insignal till jämföraren via multiplex- orn, varvid jämföraren jämför datapaketsidentifieraren inma- tad till hashfunktionsorganet och datapaketsidentifieraren utmatad från multiplexorn, och när de jämförda datapakets- identifierarna matchar varandra, erhålles vidarebeford- ringsinformation för datapaketet från hashminnet med den hög- sta prioriteten med satt träfflagga.The first index preferably acts as an input signal to the hash memory which provides a data packet identifier and forwarding information for the destination and a hit flag as output signals. The look-up device also comprises a selector means connected to the hit tag output of all n hash memories, a multiplexer connected to the data packet identifier and forwarding information outputs of all n hash memories, the comparator being connected to the multiplexer. A set hit tag indicates that there was an entry in the hash memory with the first index obtained by hashing the data packet identifier, and the data packet identifier from the hash priority with set hit tag, if any, is used as an input to the comparator via the multiplexer, the comparator comparing the data packet identifier input to the hash function means and the data packet identifier output from the multiplexer, and when the compared data packet identifiers match each other, forwarding information for the data packet is obtained from the hash memory with the highest priority with set hit flag.

Enligt en annan utföringsform enligt föreliggande upp- finning fungerar det första indexet såsom en insignal till hashminnet som ger ett andra index och en träfflagga såsom utsignaler. Uppslagningsanordningen innefattar också ett val- jarorgan anslutet till träfflaggutgàngarna hos alla n hash- minnen, en multiplexor ansluten till de andra index utgångar- na hos alla n hashminnen, ett adressminne, som lagrar alla datapaketsidentifierare tillsammans med vidarebefordringsin- lO 15 20 25 30 35 511971 5 formationen för destinationen, anslutet till multiplexorn, varvid jämföraren är ansluten till adressminnet. En satt träfflagga indikerar att det fanns en post i hashminnet med det första indexet erhållet vid hashande av datapaketsidenti- fieraren och det andra indexet från hashminnet med den högsta prioriteten med satt träfflagga, om någon, används såsom in- signal till adressminnet, som ger en datapaketsidentifierare och vidarebefordringsinformationen såsom utsignaler. Jämföra- ren jämför datapaketsidentifieraren inmatad till hashfunk- tionsorganen och datapaketsidentifieraren utmatad från ad- ressminnet och när de jämförda datapaketsidentifierarna mat- char varandra, erhålles vidarebefordringsinformationen för datapaketet från adressminnet.According to another embodiment of the present invention, the first index functions as an input signal to the hash memory which provides a second index and a hit flag as output signals. The look-up device also comprises a selector means connected to the hit tag outputs of all n hash memories, a multiplexer connected to the other index outputs of all n hash memories, an address memory which stores all data packet identifiers together with forwarding inputs 15 20 25 30 35 511971 The formation of the destination, connected to the multiplexer, the comparator being connected to the address memory. A set hit tag indicates that there was an entry in the hash memory with the first index obtained when hashing the data packet identifier and the second index from the hash priority with the highest priority with set hit tag, if any, used as an input to the address memory, which provides a data packet identifiers and forwarding information such as outputs. The comparator compares the data packet identifier input to the hash function means and the data packet identifier output from the address memory, and when the compared data packet identifiers match each other, the forwarding information for the data packet is obtained from the address memory.

Ett annat ändamål med uppfinningen är att åstadkomma ett förfarande för klassificering och vidarebefordring av da- tapaket, varvid varje datapaket innefattar ett datapaketshu- vud innefattande ett antal fält, varvid flera fält i datapa- ketshuvudet tillsammanas bildar en datapaketsidentifierare.Another object of the invention is to provide a method for classifying and forwarding data packets, each data packet comprising a data packet header comprising a number of fields, wherein several fields in the data packet header together form a data packet identifier.

Förfarandet innefattar de följande stegen: - att beräkna, för varje datapaket, ett första index genom att hasha den inmatade datapaketsidentifieraren i n olika parallella banor där n är ett heltal och n22; - och i beroende av det första indexet antingen direkt eller indirekt erhålla en datapaketsidentifierare och vidarebe- fordringsinformation för destinationen för datapaketet från ett av åtminstone n minnen; - att jämföra den inmatade datapaketsidentifieraren och da- tapaketsidentifieraren utmatad från minnet; och - om de jämförda datapaketsidentifierarna matchar varandra att använda vidarebefordringsinformationen erhållen från minnet.The method comprises the following steps: - calculating, for each data packet, a first index by hashing the entered data packet identifier in n different parallel paths where n is an integer and n22; and depending on the first index either directly or indirectly obtaining a data packet identifier and forwarding information for the destination of the data packet from one of at least n memories; - comparing the input data packet identifier and the data packet identifier output from the memory; and - if the compared data packet identifiers match each other to use the forwarding information obtained from the memory.

Huvudfördelen med detta förfarande är att en ny datapa- ketsidentifierare kan uppslås i varje minnescykeltid. En an- nan fördel med detta förfarande är att det tillåter flera ta- belluppslagningar att utföras under en minnescykeltid, efter- som uppslagningarna utföres parallellt.The main advantage of this method is that a new data packet identifier can be looked up in each memory cycle time. Another advantage of this method is that it allows multiple table lookups to be performed during a memory cycle time, since the lookups are performed in parallel.

Beräkningssteget innefattar fördelaktigtvis stegen: 10 20 25 30 35 511971 6 - att beräkna det första indexet genom att använda olika hashfunktioner, en hashfunktion för varje bana; och - att använda det första indexet såsom en insignal till en tabell, en av n olika tabeller. Härigenom åstadkommes att behovet av återhashning effektivt minskas, och förhopp- ningsvis elimineras eftersom identifierarna sprids på fle- ra oberoende hashfunktioner.The calculation step advantageously comprises the steps of: - calculating the first index using different hash functions, a hash function for each path; and - using the first index as an input to a table, one of n different tables. This ensures that the need for re-hashing is effectively reduced, and hopefully eliminated as the identifiers are spread over several independent hash functions.

Företrädesvis är de n banorna ordnade med prioritet, varvid den första banan har den högsta prioriteten och banan n har den lägsta prioriteten.Preferably, the n paths are arranged with priority, the first path having the highest priority and the path n having the lowest priority.

Den första tabellen, som representerar den högsta ni- vån, har företrädesvis den största storleken, och tabellen n, som representerar den lägsta nivån, har den minsta storleken.The first table, which represents the highest level, preferably has the largest size, and the table n, which represents the lowest level, has the smallest size.

Storlekarna hos de n tabellerna minskar fördelaktigtvis väsentligen linjärt. Härigenom åstadkommes den mest effektiva tabellanvändningen.The sizes of the n tables advantageously decrease substantially linearly. This achieves the most efficient use of tables.

Varje tabell lagrar fördelaktigtvis datapaketsidentifi- erare och vidarebefordringsinformation för destinationen, varvid varje tabell utmatar en träfflagga, varvid en satt träfflagga indikerar att det fanns en post i tabellen med det första indexet erhållet genom att hasha datapaketsidentifie- raren, och datapaketsidentifieraren från tabellen med den högsta prioriteten med satt träfflagga, om någon, används så- som insignal till jämförarsteget.Each table advantageously stores data packet identifiers and forwarding information for the destination, each table outputting a hit flag, a set hit flag indicating that there was an entry in the table with the first index obtained by hashing the data packet identifier, and the data packet identifier from the table with the highest the priority with set hit flag, if any, is used as an input signal to the comparison stage.

Enligt en annan utföringsform av förfarandet enligt fö- religgande uppfinning, fungerar det första indexet såsom en insignal till tabellen som ger ett andra index och en träff- flagga såsom utsignaler. En satt träfflagga indikerar att det fanns en post i tabellen med det första indexet erhållet vid hashning av datapaketsidentifieraren, och det andra indexet från tabellen med den högsta prioriteten med den satta träff- flaggan, om någon, används såsom insignal till ett adressmin- ne som ger en datapaketsidentifierare såsom utsignal, och da- tapaketsidentifieraren används såsom insignal till jämförar- steget.According to another embodiment of the method according to the present invention, the first index functions as an input signal to the table which gives a second index and a hit flag as output signals. A set hit flag indicates that there was an entry in the table with the first index obtained by hashing the data packet identifier, and the second index from the table with the highest priority with the set hit flag, if any, is used as an input to an address memory which provides a data packet identifier as the output signal, and the data packet identifier is used as the input signal to the comparator stage.

Om en ny datapaketsidentifierare skall adderas, hashas den företrädesvis initialt i den första banan, och om en kol- 10 15 20 25 30 35 511971 7 lision inträffar, dvs. det finns redan en datapaketsidentifi- erare med detta första index i den första tabellen, hashas de två kolliderande datapaketsidentifierarna i den andra banan och om en kollision inträffar i banan i hashas de kollideran- de datapaketsidentifierarna i banan (i+l), varvid lšiín-1.If a new data packet identifier is to be added, it is preferably hashed initially in the first path, and if a collision occurs, i.e. there is already a data packet identifier with this first index in the first table, the two conflicting data packet identifiers in the second path are hashed and if a collision occurs in the path of the hash, the conflicting data packet identifiers in the path (i + 1), whereby lšiín- 1.

Härigenom àstadkommes att endast en jämförelse behövs för en fullständig identifieraruppslagning.This ensures that only one comparison is needed for a complete identifier lookup.

Förfarandet avslutas fördelaktigtvis för datapakets- identifierarna om de jämförda datapaketsidentifierarna inte matchar varandra.The procedure is advantageously terminated for the data packet identifiers if the compared data packet identifiers do not match each other.

Förfarandet avslutas företrädesvis för datapaketsiden- tifierarna om ingen av de n tabelllerna utmatar en satt träfflagga.The procedure is preferably terminated for the data packet identifiers if none of the n tables outputs a set hit flag.

Utföringsformer av uppfinningen kommer nu att beskrivas med en hänvisning till de bifogade ritningarna där: Kort beskrivning av ritningarna Figur 1 visar ett schema på fälten hos ett IP-data- paketshuvud; Figur 2 visar ett schema på häshningskonceptet; Figur 3 visar ett blockschema på en uppslagningsanord- ning enligt föreliggande uppfinning; och Figur 4 visar ett flödesschema på förfarandet enligt föreliggande uppfinning.Embodiments of the invention will now be described with reference to the accompanying drawings, in which: Brief Description of the Drawings Figure 1 shows a diagram of the fields of an IP data packet header; Figure 2 shows a diagram of the hoisting concept; Figure 3 shows a block diagram of a look-up device according to the present invention; and Figure 4 shows a flow chart of the method of the present invention.

Detaljerad beskrivning av utföringsformer I figur l visas ett schema på fälten i ett IP-data- paketshuvud. IP-datapaketshuvudet innefattar 12 olika fält.Detailed Description of Embodiments Figure 1 shows a diagram of the fields in an IP data packet header. The IP data packet header comprises 12 different fields.

Såsom visas i figur 1 är dessa fält: Version, IP-huvudlängd, typ av tjänst, total längd, identifiering, flaggor, fragment- förskjutning, livstid, protokoll, huvudkontrollsumma, källad- ress och destinationsadress. Det kan också innefatta ett val- fritt fält.As shown in Figure 1, these fields are: Version, IP master length, type of service, total length, identification, flags, fragment offset, lifetime, protocol, master checksum, source address and destination address. It can also include an optional field.

Det finns i princip två olika typer av IP-datapakets- klassificering: IP-adressuppslagning, som används för att vi- darebefordra unicast-datapaket baserade på deras destina- tionsadress, och identifieraruppslagning, som är avsedd att användas exempelvis för att vidarebefordra multicast-data- 10 15 20 25 30 35 511 971 8 paket och flöden av datapaket. IP-multicastadresser är inte organiserade i en hierarkisk struktur. Identifieraruppslag- ning används när flera fält i datapaketshuvudet tillsammans bildar en datapaketsidentifierare. En sådan identifierare har ingen hierarkisk struktur och identifierarutrymmet är poten- tiellt mycket stort. Tekniker såsom hashning eller CAM (inne- hàllsadresserbart minne) erfordras därför för uppslagningen.There are basically two different types of IP data packet classification: IP address lookup, which is used to forward unicast data packets based on their destination address, and identifier lookup, which is intended to be used, for example, to forward multicast data. - 10 15 20 25 30 35 511 971 8 packets and flows of data packets. IP multicast addresses are not organized in a hierarchical structure. Identifier lookup is used when several fields in the data packet header together form a data packet identifier. Such an identifier has no hierarchical structure and the identifier space is potentially very large. Techniques such as hashing or CAM (content addressable memory) are therefore required for lookup.

Den föreliggande uppfinning är baserad på identifierarupp- slagning.The present invention is based on identifier lookup.

I artikeln "A Comparison of Hashing Schemes for Address Look-Up in Computor Networks” av R. Jain, IEEE Transactions on Communications, vol. 40, nr 10, sid. 1570-1573, refererad till ovan, visas grundteorin som ligger bakom hashningskon- ceptet. Nedan och med hänvisning till figur 2 kommer att ges ett litet val från denna artikel.The article "A Comparison of Hashing Schemes for Address Look-Up in Computer Networks" by R. Jain, IEEE Transactions on Communications, vol. 40, no. 10, pp. 1570-1573, referenced above, shows the basic theory behind hashing Below, with reference to Figure 2, a small selection from this article will be given.

I figur 2 visas ett schema på hashningskonceptet. Hash- ning tillåter oss att huvudsakligen dela upp en stor tabell i flera mindre deltabeller så att vi snabbt kan hitta informa- tionen när vi väl har bestämt oss för vilken tabell som skall eftersökas. Denna bestämning utföres genom att använda en ma- tematisk funktion, som avbildar den givna nyckeln till hash- cellen i, såsom visas i figur 2. Cellen i kan sedan peka pà deltabellen med storleken ni. Givet ett spår med R ramar med N distinkta adresser och en hashtabell med M celler är målet att minimera medelantalet uppslagningar som erfordras per ram.Figure 2 shows a diagram of the hashing concept. Hashing allows us to mainly divide a large table into several smaller sub-tables so that we can quickly find the information once we have decided which table to search for. This determination is performed using a mathematical function, which maps the given key to the hash cell i, as shown in Figure 2. The cell i can then point to the sub-table with the size ni. Given a track with R frames with N distinct addresses and a hash table with M cells, the goal is to minimize the average number of lookups required per frame.

Om vi utför en vanlig binär sökning genom alla N:s adresser, behöver vi utföra 1 + log2(2N) eller log2(2N) upp- slagningar per ram. Givet en adress som hashar på cellen i, måste vi söka igenom en deltabell med ni poster, som endast erfordrar log2(2ni) uppslagningar. Det totala antalet sparade uppslagningar ar S' s = Zr»,[1og2<2N>~1oq2<2n-,>1 L _ där ri är antalet ramar som hashas på cellen i, Zri = R. Net- tobesparingen per ram är F: f- fl- F= --*1 (-*->=2I g R ogzu . '- q. IOQAP.) 10 15 20 25 30 35 511 971 9 Här betecknar q1= Ei delen ramar som hashas på cellen i, och p1==%f är delen adresser som hashas på cellen i. Må- let med en hashningsfunktion är att maximera kvantiteten Z-q1log2(P1).If we perform a standard binary search through all N's addresses, we need to perform 1 + log2 (2N) or log2 (2N) searches per frame. Given an address that hashes on the cell in, we have to search through a sub-table with nine records, which only requires log2 (2ni) lookups. The total number of saved lookups is S's = Zr », [1og2 <2N> ~ 1oq2 <2n -,> 1 L _ where ri is the number of frames hashed on the cell i, Zri = R. The net saving per frame is F : f- fl- F = - * 1 (- * -> = 2I g R ogzu. '- q. IOQAP.) 10 15 20 25 30 35 511 971 9 Here q1 = Ei denotes frames that haveh on the cell in , and p1 ==% f are the part of addresses that are hashed on the cell i. The goal of a hashing function is to maximize the quantity Z-q1log2 (P1).

I figur 3 visas ett blockschema på en uppslagningsan- ordning enligt föreliggande uppfinning. Uppslagningsanord- ningen 30 är för klassificering och vidarebefordring av data- paket i datapaketförmedlande nät, varvid varje datapaket in- nefattar ett datapaketshuvud (jämför figur 1) innefattande ett antal fält, varvid flera fält i datapaketshuvudet till- sammans bildar en datapaketsidentifierare. Uppslagningsanord- ningen 30 innefattar n parallella hashningsenheter 321, 32% .., 32n där n är ett heltal och nS2. Varje hasningsenhet 321, 322, ..., 32n innefattar ett hashfunktionsorgan 341, 34% ., 34n och ett hashminne 361, 362, ..., 36, anslutet till hashfunktionsorganet 341, 342, ..., 34n. Varje hasfunktionsor- gan 341, 342, ..., 34n beräknar ett första index genom att hasha datapaketsidentifieraren. Detta första index används såsom en insignal till hashminnet, som ger ett andra index och en träfflagga såsom utsignaler. En satt träfflagga indi- kerar ett det fanns en post i ett hashminne 361, 362, ..., 36n med det första indexet erhållet vid hashande av datapakets- identifieraren. Uppslagningsanordningen 30 enligt föreliggan- de uppfinning använder n olika hashfunktioner, en hashfunk- tion för varje hashfunktionsorgan 341, 342, ..., 34n. Detta innebär att uppslagningsanordningen 30 enligt föreliggande uppfinning innefattar flera (n) hashbanor. Alla hashningsen- heterna 321, 322, ..., 32n behandlar samma datapaketsidentifi- erare. Därför kommer en uppslagning för en given identifiera- re att lyckas i åtminstone en av banorna, och därför kan alla banorna sökas parallellt. Uppslagningsanordningen 30 innefat- tar också ett väljarorgan 38 anslutet till träfflaggsutgàng- arna hos alla n hashminnen 361, 362, ..., 36n, och en multi- plexor 39 ansluten till de andra indexutgàngarna hos alla n hashminnen 361, 362, ..., 36n. Utgàngen fràn väljarorganet 38 är ansluten till multiplexorn 39. Uppslagningsanordningen 30 innefattar också ett adraessminne 40, vilket lagrar alla da- s 10 15 20 25 30 35 511971 10 tapaketsidentifierare tillsammans med vidarebefordringsinfor- mationen för destinationen. Varje andra index inmatat till adressminnet 40 kommer att ge en datapaketsidentifierare och vidarebefordringsinformationen för destinationen såsom utsig- nal. Uppslagningsanordningen 30 innefattar också en jämförare 42 ansluten till adressminnet 40. Jämföraren 42 har också en annan ingång, matad med identifieraren inmatad till alla de n hashfunktionsorganen 341, 342, ..., 34n. Jämföraren 32 jämför datapaketsidentifieraren inmatad till de n hashfunktionsorga- nen 341, 342, ..., 34n, och datapaketsidentifieraren utmatad från adressminnet 40. Om de jämförna datapaketsidentifierarna matchar varandra, erhålles vidarebefordringsinformationen för datapaketet för adressminnet 40, via en ledning 44. Om de in- te matchar varandra var det en falsk träff, indikerande att datapaketsidentifieraren inte fanns i adressminnet 40. Hash- beräkningen, minnesuppslagningen, tabelluppslagningen och jämförelsen är alla oberoende operationer och kan utföras pa- rallellt, varvid uppslagningen med lätthet kan pipeline- behandlas för att öka genomströmningen.Figure 3 shows a block diagram of a look-up device according to the present invention. The look-up device 30 is for classifying and forwarding data packets in data packet transmitting networks, each data packet comprising a data packet header (compare Figure 1) comprising a number of fields, several fields in the data packet header together forming a data packet identifier. The look-up device 30 comprises n parallel hashing units 321, 32% .., 32n where n is an integer and nS2. Each hashing unit 321, 322, ..., 32n comprises a hash function means 341, 34%., 34n and a hash memory 361, 362, ..., 36, connected to the hash function means 341, 342, ..., 34n. Each hash function means 341, 342, ..., 34n calculates a first index by hash the data packet identifier. This first index is used as an input signal to the hash memory, which provides a second index and a hit flag as output signals. A set hit flag indicates that there was an entry in a hash memory 361, 362, ..., 36n with the first index obtained when hashing the data packet identifier. The retrieval device 30 according to the present invention uses n different hash functions, a hash function for each hash function means 341, 342, ..., 34n. This means that the storage device 30 according to the present invention comprises several (n) hash webs. All hashing units 321, 322, ..., 32n process the same data packet identifier. Therefore, a lookup for a given identifier will succeed in at least one of the paths, and therefore all paths can be searched in parallel. The look-up device 30 also includes a selector means 38 connected to the hit output outputs of all n hashes 361, 362, ..., 36n, and a multiplexer 39 connected to the other index outputs of all n hashes 361, 362, ... , 36n. The output of the selector means 38 is connected to the multiplexer 39. The look-up device 30 also comprises an address memory 40, which stores all the data packet identifiers together with the forwarding information for the destination. Every second index entered into the address memory 40 will provide a data packet identifier and the forwarding information for the destination as an output signal. The look-up device 30 also includes a comparator 42 connected to the address memory 40. The comparator 42 also has another input, fed with the identifier input to all the n hash function means 341, 342, ..., 34n. The comparator 32 compares the data packet identifier input to the n hash function means 341, 342, ..., 34n, and the data packet identifier output from the address memory 40. If the compared data packet identifiers match, the forwarding information of the data packet for the address memory 44 is obtained, via a did not match, it was a false hit, indicating that the data packet identifier was not in the address memory 40. The hash calculation, memory lookup, table lookup and comparison are all independent operations and can be performed in parallel, whereby the lookup can be easily pipeline-processed to increase throughput.

En annan utföringsform av uppslagningsanordningen en- ligt föreliggande uppfinning innefattar inte ett adresssminne och använder inte något andra index. I stället innefattar hashminnena 361, 362, ..., 36n datapaketsidentifierarna och vidarebefordringsinformationen. Datapaketsidentifieraren ut- matad från hashminnet med den högsta prioriteten med satt träfflagga, om någon, används såsom insignal till jämföraren.Another embodiment of the lookup device according to the present invention does not include an address memory and does not use a second index. Instead, the hash memories 361, 362, ..., 36n include the data packet identifiers and the forwarding information. The data packet identifier output from the highest priority hash memory with set hit flag, if any, is used as an input to the comparator.

Denna utföringsform visas inte i någon figur. Denna utfö- ringsform innefattar alla de i figur 3 visade elementen, för- utom adressminnet 40.This embodiment is not shown in any figure. This embodiment includes all of the elements shown in Figure 3, except the address memory 40.

Den i figur 3 visade utföringsformen föredrages för stora identifierare, på grund av att det sparar minne att an- vända ett minne av andra nivå. Vilket förfarande som är bäst beror på hur konstruktionen används (dvs., storleken hos identifierare, minnesorganisation, osv.).The embodiment shown in Figure 3 is preferred for large identifiers, because it saves memory to use a second level memory. Which method is best depends on how the design is used (ie, the size of the identifier, memory organization, etc.).

Fördelen med dessa konstruktioner är tvàfaldig: För det första tillåter det att flera tabelluppslagning- ar utföres under en minnescykeltid, eftersom uppslagningarna 10 15 20 25 30 35 511971 ll utföres parallellt. För det andra finns det flera hashfunk- tioner, vilket effektivt minskar och förhoppningsvis elimine- rar behovet av àterhashning eftersom identifierarna sprids på flera oberoende hashfunktioner.The advantage of these constructions is twofold: First, it allows multiple table lookups to be performed during a memory cycle time, since the lookups 10 are performed in parallel. Secondly, there are several hash functions, which effectively reduces and hopefully eliminates the need for re-hashing as the identifiers are spread across several independent hash functions.

När en identifierare adderas till uppslagningsanord- ningen 30 hashas den initialt i den första banan. Om en kol- lision inträffar, dvs., det finns redan en identifierare med detta index i hashminnet, hashas de två kolliderande identi- fierarna in i den andra banan. Indexet i den första banan där kollisionen inträffade kan inte användas för en annan identi- fierare. Om en kollision också inträffar i den andra banan upprepas samma procedur med de kolliderande identifierarna förflyttade till den tredje banan, osv.When an identifier is added to the lookup device 30, it is initially hashed in the first path. If a collision occurs, ie there is already an identifier with this index in the hash memory, the two colliding identifiers are hashed into the second path. The index in the first lane where the collision occurred cannot be used for another identifier. If a collision also occurs in the second lane, the same procedure is repeated with the colliding identifiers moved to the third lane, and so on.

Det finns ett skäl varför en hashpost där en kollision har inträffat inte används mer. Om en uppslagning träffar i mer än en bana är det nöjaktigt att endast beakta träffen i banan med den högsta prioriteten. Så med detta schema måste endast en jämförelse med den reella identifieraren utföras.There is a reason why a hash record where a collision has occurred is no longer used. If a look-up hits in more than one course, it is sufficient to only consider the hit in the course with the highest priority. So with this scheme, only a comparison with the real identifier has to be performed.

Om en kollision inträffar i den sista av banorna, kom- mer uppslagningstabellen att överflöda. Ju större hashminnena är i hashbanorna, desto lägre är sannolikheten att identifie- rarna kommer att kollidera.If a collision occurs in the last of the tracks, the look-up table will overflow. The larger the hash memories in the hash paths, the lower the probability that the identifiers will collide.

Den mest effektiva minnesanvändningen erhålles när min- net är uppdelat i flera hashbanor. Hashbanorna skall vara or- ganiserade hierarkiskt med det största hashminnet vid den högsta nivån och det minsta hashminnet vid den lägsta nivån, företrädesvis med hashminnesstorlekarna för de n hashminnena minskande väsentligen linjärt.The most efficient memory use is obtained when the memory is divided into several hash paths. The hash paths should be organized hierarchically with the largest hash memory at the highest level and the smallest hash memory at the lowest level, preferably with the hash memory sizes of the n hash memories decreasing substantially linearly.

Uppslagningsanordningen 30 implementeras företrädesvis med användning av statiska direktàtkomstminnen (SRAM) och/ eller dynamiska direktàtkomstminnen (DRAM) såsom minnen.The storage device 30 is preferably implemented using static direct access memories (SRAM) and / or dynamic direct access memories (DRAM) as memories.

Hashfunktionsorganen 341, 342, ..., 34n kan implemente- ras med användning av XELLER-faltning, som sannolikt föredra- ges, eftersom den är enkel och lätt att variera.The hash function means 341, 342, ..., 34n can be implemented using XELLER folding, which is probably preferred because it is simple and easy to vary.

I figur 4 visas ett flödesschema på förfarandet enligt föreliggande uppfinning. Förfarandet för klassificering och vidarebefordring av datapaket, där varje datapaket innefattar l0 15 20 511971 l2 ett datapaketshuvud (jämför figur l) innefattande ett antal fält, varvid flera fält i datapaketshuvudet tillsammans bil- _ dar en datapaketsidentifierare, börjar vid blocket 50. Sedan, vid blocket 52, fortsätter förfarandet att beräkna, för varje datapaket, ett första index genom att hasha den inmatade da- tapaketsidentifieraren i n olika, parallella banor, där n är ett heltal och n22. Sedan, vid blocket 54, fortsätter förfa- randet genom att, i beroende av det första indexet, antingen direkt eller indirekt erhålla en datapaketsidentifierare och vidarebefordringsinformation för destinationen för datapake- tet fràn ett av åtminstone n minnen. Sedan, vid blocket 56, fortsätter förfarandet genom att jämföra den inmatade datapa- ketsidentifieraren och datapaketsidentifieraren utmatad från minnet. Sedan, vid blocket 58, fortsätter förfarandet, om de jämförda datapaketsidentifierarna matchar varandra, genom att använda vidarebefordringsinformationen erhàllen från minnet.Figure 4 shows a flow chart of the method according to the present invention. The method for classifying and forwarding data packets, each data packet comprising a data packet header (compare Figure 1) comprising a number of fields, several fields in the data packet header together forming a data packet identifier, starting at block 50. Then, at block 52, the method continues to calculate, for each data packet, a first index by hashing the entered data packet identifier into different, parallel paths, where n is an integer and n22. Then, at block 54, the procedure continues by, depending on the first index, either directly or indirectly obtaining a data packet identifier and forwarding information for the destination of the data packet from one of at least n memories. Then, at block 56, the process continues by comparing the input data packet identifier and the data packet identifier output from the memory. Then, at block 58, the process continues, if the compared data packet identifiers match each other, using the forwarding information obtained from the memory.

Sedan avslutas förfarandet vid blocket 60.Then the procedure ends at block 60.

Förfarandet enligt föreliggande uppfinning kan exempel- vis implementeras med en uppslagningsanordning av den typ som visas i figur 3.The method according to the present invention can for instance be implemented with a look-up device of the type shown in figure 3.

Uppfinningen är inte begränsad till den ovan beskrivna utföringsformen. Det kommer att vara uppenbart att många oli- ka modifieringar är möjliga inom omfattningen av de följande patentkraven.The invention is not limited to the embodiment described above. It will be apparent that many different modifications are possible within the scope of the following claims.

Claims (19)

lO 15 20 25 30 35 511 971 13 PATENTKRAVlO 15 20 25 30 35 511 971 13 PATENT REQUIREMENTS 1. En uppslagningsanordning (30) för klassificering och vidarebefordring av datapaket, varvid varje datapaket inne- fattar ett datapaketshuvud innefattande ett antal fält, var- vid flera fält i datapaketshuvudet tillsammans bildar en da- tapaketsidentifierare, kännetecknad av att uppslagningsanord- ningen (30) innefattar n parallella hashningsenheter (32h 322, ..., 32n), där n är ett heltal och n 22, för att beräk- na, för varje datapaket, ett första index genom att hasha da- tapaketsidentifieraren, och i beroende av det första indexet antingen direkt eller indirekt erhålla en datapaketsidentifi- erare och vidarebefordringsinformation för destinationen för datapaketet från ett av åtminstone n minnen, varvid de n hashningsenheterna (321, 322, ..., 32n) behandlar samma data- paketsidentifierare samtidigt, och en jämförare (42) ansluten antingen direkt eller indirekt till åtminstone ett av minnena och till en ingång hos de n hashningsenheterna (321, 322, _, 32n) för att jämföra datapaketsidentifieraren inmatad till de n hashningsenheterna (321, 322, ..., 32n)och datapa- ketsidentifieraren utmatad från minnet, och när de jämförda datapaketsidentifierarna matchar varandra, erhålles vidarebe- fordringsinformationen för datapaketet från minnet.A look-up device (30) for classifying and transmitting data packets, each data packet comprising a data packet header comprising a number of fields, several fields in the data packet header together forming a data packet identifier, characterized in that the look-up device (30) comprises n parallel hashing units (32h 322, ..., 32n), where n is an integer and n 22, for calculating, for each data packet, a first index by hashing the data packet identifier, and depending on the first the index either directly or indirectly obtaining a data packet identifier and forwarding information for the destination of the data packet from one of at least n memories, the n hashing units (321, 322, ..., 32n) processing the same data packet identifier simultaneously, and a comparator (42 ) connected either directly or indirectly to at least one of the memories and to an input of the n hashing units (321, 322, _, 32n) to compare data packets the identifier input to the n hashing units (321, 322, ..., 32n) and the data packet identifier output from the memory, and when the compared data packet identifiers match each other, the forwarding information of the data packet is obtained from the memory. 2. En uppslagningsanordning (30) enligt patentkravet l, kännetecknad av att varje hashningsenhet (321, 322, ..., 32fi innefattar ett hashfunktionsorgan (341, 342, _, 34n) för att beräkna det första indexet, och ett hashminne (361, 36% ., 36n) anslutet till hashfunktionsorganet (341, 342, ..., 34fl.A look-up device (30) according to claim 1, characterized in that each hashing unit (321, 322, ..., 32fi comprises a hash function means (341, 342, _, 34n) for calculating the first index, and a hash memory (361 , 36%., 36n) connected to the hash function means (341, 342, ..., 34fl. 3. En uppslagningsanordning (30) enligt patentkravet 2, kännetecknad av att uppslagningsanordningen (30) använder n olika hashfunktioner, en hashfunktion för varje hashfunk- tionsorgan (341, 342, ..., 34n).A look-up device (30) according to claim 2, characterized in that the look-up device (30) uses n different hash functions, a hash function for each hash function means (341, 342, ..., 34n). 4. En uppslagningsanordning (30) enligt något av patent- kraven l-3, kännetecknad av att de n hashningsenheterna (32U 10 15 20 25 511 971 14 322, ..., 32n) är ordnade efter prioritet, där den första hashningsenheten (321) har den högsta prioriteten och hashningsenheten n (32n) har den lägsta prioriteten.A look-up device (30) according to any one of claims 1-3, characterized in that the n hashing units (32U 10 15 20 25 511 971 14 322, ..., 32n) are arranged according to priority, where the first hashing unit ( 321) has the highest priority and the hash unit n (32n) has the lowest priority. 5. En uppslagningsanordning (30) enligt patentkravet 4, kännetecknad av att det första hashminnet (361) som represen- terar den högsta nivån i uppslagningsanordningen (30), har den största minnesstorleken, och hashminnet n (36n), som re- presenterar den lägsta nivån i uppslagningsanordningen (30) har den minsta minnesstorleken.A look-up device (30) according to claim 4, characterized in that the first hash memory (361) representing the highest level of the look-up device (30) has the largest memory size, and the hash memory n (36n) representing the the lowest level in the storage device (30) has the smallest memory size. 6. En uppslagningsanordning (30) enligt patentkravet 5, kännetecknad av att minnesstorlekarna för de n hashminnena (361, 362, ..., 36n) minskar väsentligen linjärt.A look-up device (30) according to claim 5, characterized in that the memory sizes of the n hash memories (361, 362, ..., 36n) decrease substantially linearly. 7. En uppslagningsanordning (30) enligt något av patent- kraven 1-6, kännetecknad av att alla minnen (361, 362, ..., 36n, 40; 361, 362, ..., 36n) är statiska direktåtkomstminnen (SRAM) och/eller dynamiska direktàtkomstminnen (DRAM).A storage device (30) according to any one of claims 1-6, characterized in that all the memories (361, 362, ..., 36n, 40; 361, 362, ..., 36n) are static direct access memories (SRAM ) and / or dynamic direct access memories (DRAM). 8. En uppslagningsanordning (30) enligt något av patent- kraven 2-7, kännetecknad av att det första indexet fungerar såsom en insignal till hashminnet (361, 362, ..., 361) som ger en datapaketsidentifierare och vidarebefordringsinformation för destinationen och en träfflagga såsom utsignaler, och av att uppslagningsanordningen (30) också innefattar ett val- jarorgan (38) anslutet till träfflaggsutgångarna hos alla n hashminnen (361, 362, ..., 36n), en multiplexor (39) ansluten till datapaketsidentifierar- och vidarebefordringsinforma- tionsutgångarna hos alla n hashminnen (361, 362, ..., 369, varvid jämföraren (42) är ansluten till multiplexorn (39), varvid en satt träfflagga indikerar att det fanns en post i hashminnet (361, 362, ..., 36n) med det första indexet erhål- let genom hashande av datapaketsidentifieraren och datapaket- sidentifieraren från hashminnet (361, 362, ..., 36n) med den högsta prioriteten med satt träfflagga, om någon, används så- som insignal till jämföraren (42), via multiplexorn (39), varvid jämföraren (42) jämför datapaketsidentifieraren inma- 10 l5 20 25 30 35 511971 15 tad till hashfunktionsosrganet (341, 342, ..., 34n) och data- paketsidentifieraren utmatad från multiplexorn (39), och när de jämförda datapaketsidentifierarna matchar varandra, erhål- les vidarebefordringsinformationen för datapaketet från hash- minnet (361, 362, ..., 36n) med den högsta prioriteten med satt träfflagga.A look-up device (30) according to any one of claims 2-7, characterized in that the first index acts as an input signal to the hash memory (361, 362, ..., 361) which provides a data packet identifier and forwarding information for the destination and a hit flag as output signals, and in that the look-up device (30) also comprises a selector means (38) connected to the hit flag outputs of all n hash memories (361, 362, ..., 36n), a multiplexer (39) connected to data packet identifier and forwarding information - the output outputs of all n hash memories (361, 362, ..., 369, the comparator (42) being connected to the multiplexer (39), a set hit flag indicating that there was an entry in the hash memory (361, 362, ... , 36n) with the first index obtained by hashing the data packet identifier and the data packet identifier from the hash memory (361, 362, ..., 36n) with the highest priority with set hit flag, if any, is used as input to the comparator ( 42), via the multiplexer (39), the comparator (42) comparing the data packet identifier input to the hash function organ (341, 342, ..., 34n) and the data packet identifier output from the multiplexer (39), and when the compared data packet identifiers match each other, the forwarding information for the data packet is obtained from the hash memory (361, 362, ..., 36n) with the highest priority with set hit tag. 9. En uppslagningsanordning (30) enligt något av patent- kraven 2-7, kännetecknad av att det första indexet fungerar såsom en insignal till hashminnet (361, 362, ..., 36n) som ger ett andra index och en träfflagga såsom utsignaler, och av att uppslagningsanordningen (30) också innefattar ett väl- jarorgan (38) anslutet till träfflaggsutgångarna hos alla n hashminnen (361, 362, ..., 36n), en multiplexor (39) ansluten till de andra indexutgångarna hos alla n hashminnen (36U 362, ..., 36n), ett adressminne (40), vilket lagrar alla da- tapaketsidentifierare tillsammans med vidarebefordringsinfor- mationen för destinationen, anslutet till multiplexorn (39), varvid jämföraren (42) är ansluten till adressminnet (40), varvid en satt träfflagga indikerar att det fanns en post i hashminnet (361, 362, let vid hashande av datapaketsidentifieraren och det andra _, 36n) med det första indexet erhål- indexet från hashminnet (361, 362, ..., 36n) med den högsta prioriteten med satt träfflagga, om någon, används såsom in- signal till adressminnet (40) som ger en datapaketsidentifie- rare och vidarebefordringsinformationen såsom utsignaler, varvid jämföraren (42) jämför datapaketsidentifieraren inma- tad till hashfunktionsorganet (341, 342, ..., 34n) och datapa- ketsidentifieraren utmatad från adressminnet (40), och när de jämförda datapaketsidentifierarna matchar varandra erhålles vidarebefordringsinformationen för datapaketet från adress- minnet (40).A look-up device (30) according to any one of claims 2-7, characterized in that the first index functions as an input signal to the hash memory (361, 362, ..., 36n) which provides a second index and a hit flag as output signals. , and in that the look-up device (30) also comprises a selector means (38) connected to the hit tag outputs of all n hash memories (361, 362, ..., 36n), a multiplexer (39) connected to the other index outputs of all n hash memories (36U 362, ..., 36n), an address memory (40), which stores all the data packet identifiers together with the forwarding information for the destination, connected to the multiplexer (39), the comparator (42) being connected to the address memory (40). , with a set hit flag indicating that there was an entry in the hash memory (361, 362, searched when hashing the data packet identifier and the second _, 36n) with the first index obtained - the index from the hash memory (361, 362, ..., 36n) with the highest priority with set hit flag, if any , is used as an input to the address memory (40) which provides a data packet identifier and the forwarding information as outputs, the comparator (42) comparing the data packet identifier input to the hash function means (341, 342, ..., 34n) and the data packet identifier output from the address memory (40), and when the compared data packet identifiers match each other, the forwarding information of the data packet is obtained from the address memory (40). 10. Ett förfarande för klassificering och vidarebefordring av datapaket, varvid varje datapaket innefattar ett datapa- ketshuvud innefattande ett antal fält, varvid flera fält i datapaketshuvudet tillsammans bildar en datapaketsidentifie- rare, varvid förfarandet känneteckans av de följande stegen: 10 15 20 25 30 511 971 16 - att beräkna, för varje datapaket , ett första index genom att hasha den inmatade datapaketsidentifieraren i n olika parallella banor, varvid n är ett heltal och n22; - och i beroende av det första indexet antingen direkt eller indirekt erhålla en datapaketsidentifierare och vidarebe- fordringsinformation för destinationen för datapaketet från ett av åtminstone n minnen; - att jämföra den inmatade datapaketsidentifieraren och data- paketsidentifieraren utmatad från minnet; och - om de jämförda datapaketsidentifierarna matchar varandra, att använda vidarebefordringsinformationen erhållen från minnet. ll. att beräkningssteget innefattar stegen:A method of classifying and forwarding data packets, each data packet comprising a data packet header comprising a plurality of fields, said fields in the data packet header together forming a data packet identifier, the method being characterized by the following steps: 971 16 - calculating, for each data packet, a first index by hashing the entered data packet identifier into different parallel paths, where n is an integer and n22; and depending on the first index either directly or indirectly obtaining a data packet identifier and forwarding information for the destination of the data packet from one of at least n memories; - comparing the input data packet identifier and the data packet identifier output from the memory; and - if the compared data packet identifiers match each other, using the forwarding information obtained from the memory. ll. that the calculation step includes the steps: 11. Ett förfarande enligt patentkravet 10, kännetecknat av - att beräkna det första indexet genom att använda n olika hashfunktioner, - att använda det tabell, en hashfunktion för varje bana; och första indexet såsom en insignal till en en av n olika tabeller.A method according to claim 10, characterized by - calculating the first index using n different hash functions, - using that table, a hash function for each path; and the first index as an input to one of n different tables. 12. netecknat av att de n banorna är ordnade efter prioritet, Ett förfarande enligt något av patentkraven 10-ll, kän- varvid den första banan har den högsta prioriteten och banan n har den lägsta prioriteten.A method according to any one of claims 10-11, wherein the first path has the highest priority and the path n has the lowest priority. 13. att den första tabellen, har den största storleken, Ett förfarande enligt patentkravet 12, kännetecknat av representerande den högsta nivån, och tabellen n, representerande den lägstsa nivån, har den minsta storleken.A method according to claim 12, characterized by representing the highest level, and the table n, representing the lowest level, having the smallest size. 14. Ett förfarande enligt patentkravet 13, kännetecknat av att storlekarna hos de n tabellerna minskar väsentligen lin- jårt.A method according to claim 13, characterized in that the sizes of the n tables decrease substantially linearly. 15. Ett förfarande enligt något av patentkraven 10-14, kän- netecknat av att varje tabell lagrar datapaketsidentifierare och vidarebefordringsinformation för destnationen, och varvid varje tabell utmatar en träfflagga, varvid en satt träfflagga indikerar att det fanns en post i en tabell med det första 10 15 20 25 30 511 971 17 indexet erhållet genom hashande av datapaketsidentifieraren, och datapaketsidentifieraren från tabellen med den högsta prioriteten med satt träfflagga, om någon, används såsom in- signal till jämföringssteget.A method according to any one of claims 10 to 14, characterized in that each table stores data packet identifiers and forwarding information for the destination, and wherein each table outputs a hit flag, a set hit flag indicating that there was an entry in a table with the first The index obtained by hashing the data packet identifier, and the data packet identifier from the table with the highest priority with set hit flag, if any, is used as an input to the comparison step. 16. Förfarande enligt något av patentkraven 10-14, känne- tecknat av att det första indexet fungerar såsom en insignal till tabellen vilket ger ett andra index och en träfflagga såsom utsignaler, varvid en satt träfflagga indikerar att det fanns en post i en tabell med det första indexet erhållet vid hashande av datapaketsidentifieraren, och det andra indexet från tabellen med den högsta prioriteten med satt trafflagga, om någon, används såsom insignal till ett adressminne vilket ger en datapaketsidentifierare såsom utsignal, och datapaket- sidentifieraren används sàsom insignal till jämförarsteget.Method according to any one of claims 10-14, characterized in that the first index functions as an input signal to the table, which provides a second index and a hit flag as output signals, a set hit flag indicating that there was an entry in a table with the first index obtained by hashing the data packet identifier, and the second index from the table with the highest priority with set hit flag, if any, is used as input to an address memory which gives a data packet identifier as output signal, and the data packet identifier is used as input to comparator stage. 17. Ett förfarande enligt något av patentkraven 10-16, kän- netecknat av att, om en ny datapaketsidentifierare skall ad- deras, hashas den initialt i den första banan och om en kol- lision inträffar, dvs. det finns redan en datapaketsidentifi- erare med detta första index i den första tabellen, hashas de två kolliderande datapaketsidentifierarna in i den andra ba- nan, och om en kollision inträffar i banan i hashas de kolli- derande datapaketsidentifierarna in i banan (i+1), varvid lšiín-1.A method according to any one of claims 10-16, characterized in that, if a new data packet identifier is to be added, it is initially hashed in the first path and if a collision occurs, ie. there is already a data packet identifier with this first index in the first table, the two colliding data packet identifiers are hashed into the second path, and if a collision occurs in the trajectory of the hash, the colliding data packet identifiers are hashed into the trajectory (i + 1 ), varvid lšiín-1. 18. Ett förfarande enligt något av patentkraven 10-17, kän- netecknat av att, om de jämförda datapaketsidentifierarna in- te matchar varandra, avslutas förfarandet för datapaketsiden- tifieraren.A method according to any one of claims 10-17, characterized in that, if the compared data packet identifiers do not match each other, the method for the data packet identifier is terminated. 19. Ett förfarande enligt något av patentkraven 15-16, kän- netecknat av att, om ingen av de n tabellerna utmatar en satt träfflagga, avslutas förfarandet för datapaketsidentifiera- ren.A method according to any one of claims 15-16, characterized in that, if none of the n tables outputs a set hit flag, the method for the data packet identifier is terminated.
SE9703293A 1997-09-09 1997-09-09 A lookup device and a method for classifying and forwarding data packets in data packet switching networks SE511971C2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
SE9703293A SE511971C2 (en) 1997-09-09 1997-09-09 A lookup device and a method for classifying and forwarding data packets in data packet switching networks
EP98944371A EP1020053A2 (en) 1997-09-09 1998-09-07 A lookup device and a method for classification and forwarding of packets in packet-switched networks
CA002303261A CA2303261A1 (en) 1997-09-09 1998-09-07 A lookup device and a method for classification and forwarding of packets in packet-switched networks
AU91926/98A AU9192698A (en) 1997-09-09 1998-09-07 A lookup device and a method for classification and forwarding of packets in packet-switched networks
PCT/SE1998/001585 WO1999013620A2 (en) 1997-09-09 1998-09-07 A lookup device and a method for classification and forwarding of packets in packet-switched networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SE9703293A SE511971C2 (en) 1997-09-09 1997-09-09 A lookup device and a method for classifying and forwarding data packets in data packet switching networks

Publications (3)

Publication Number Publication Date
SE9703293D0 SE9703293D0 (en) 1997-09-09
SE9703293L SE9703293L (en) 1999-03-10
SE511971C2 true SE511971C2 (en) 2000-01-10

Family

ID=20408225

Family Applications (1)

Application Number Title Priority Date Filing Date
SE9703293A SE511971C2 (en) 1997-09-09 1997-09-09 A lookup device and a method for classifying and forwarding data packets in data packet switching networks

Country Status (5)

Country Link
EP (1) EP1020053A2 (en)
AU (1) AU9192698A (en)
CA (1) CA2303261A1 (en)
SE (1) SE511971C2 (en)
WO (1) WO1999013620A2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6765909B1 (en) 1999-04-22 2004-07-20 Nortel Networks Limited Method and apparatus for providing support for multiple QoS levels within a third generation packet data session
GB2399199B (en) * 2000-04-11 2004-10-27 Cube Ltd P A method and apparatus for wire-speed application layer classification of data packets
GB2377528B (en) * 2000-04-11 2004-10-27 Cube Ltd P A method for wire-speed generation of an m-bit hash address from an n-bit tuple of a packet
EP1223725B1 (en) * 2001-01-12 2005-06-29 Vector Informatik GmbH Method and device for testing of the relevancy of a signature
EP1564960B1 (en) * 2001-05-16 2007-03-28 Bytemobile, Inc. System and methods for providing differentiated services within a network communication system
US7031314B2 (en) * 2001-05-16 2006-04-18 Bytemobile, Inc. Systems and methods for providing differentiated services within a network communication system
US7027446B2 (en) * 2001-07-18 2006-04-11 P-Cube Ltd. Method and apparatus for set intersection rule matching
EP1300992B1 (en) * 2001-10-08 2005-12-28 Alcatel Method for distributing load over multiple shared resources in a communication network and network applying such a method
US20030120932A1 (en) * 2001-12-21 2003-06-26 Koninklijke Philips Electronics N.V. Synchronizing source and destination systems via parallel hash value determinations
FR2838590B1 (en) 2002-04-16 2005-12-30 St Microelectronics Sa ROUTING METHOD FOR A TELECOMMUNICATION NETWORK AND ROUTER FOR IMPLEMENTING SAID METHOD
WO2004004238A1 (en) * 2002-07-01 2004-01-08 Infineon Technologies Ag Associating mac addresses with addresses in a look-up table
US7298740B2 (en) 2002-07-11 2007-11-20 Sprint Communications Company L.P. Centralized service control for a telecommunication system
US7877504B2 (en) 2002-08-29 2011-01-25 Intel Corporation Techniques for entry lookups

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5206856A (en) * 1989-12-27 1993-04-27 Bell Communications Research, Inc. Routing of network traffic
US5365520A (en) * 1992-03-27 1994-11-15 Motorola, Inc. Dynamic signal routing

Also Published As

Publication number Publication date
WO1999013620A3 (en) 1999-06-03
SE9703293L (en) 1999-03-10
EP1020053A2 (en) 2000-07-19
SE9703293D0 (en) 1997-09-09
WO1999013620A2 (en) 1999-03-18
CA2303261A1 (en) 1999-03-18
AU9192698A (en) 1999-03-29

Similar Documents

Publication Publication Date Title
US11102120B2 (en) Storing keys with variable sizes in a multi-bank database
CN108337172B (en) Large-scale OpenFlow flow table accelerated searching method
US9871728B2 (en) Exact match hash lookup databases in network switch devices
US10389633B2 (en) Hash-based address matching
US6862287B2 (en) Method and apparatus for a four-way hash table
US6430527B1 (en) Prefix search circuitry and method
US20050171937A1 (en) Memory efficient hashing algorithm
US7236492B2 (en) Configurable packet processor
US7415472B2 (en) Comparison tree data structures of particular use in performing lookup operations
US20030210702A1 (en) Configurable packet processor
SE511971C2 (en) A lookup device and a method for classifying and forwarding data packets in data packet switching networks
WO1998027662A2 (en) High speed variable length best match look-up in a switching device
CN112667526B (en) Method and circuit for realizing access control list circuit
WO2020144655A1 (en) Exact match and ternary content addressable memory (tcam) hybrid lookup for network device
US7403526B1 (en) Partitioning and filtering a search space of particular use for determining a longest prefix match thereon
US7554980B1 (en) Packet classification using relevance scoring
CN110035074A (en) A kind of chip implementing method and device of ACL matching UDF message
US6201755B1 (en) Method and system for storing and retrieving information in a communications node
US20030009474A1 (en) Binary search trees and methods for establishing and operating them
US11782895B2 (en) Cuckoo hashing including accessing hash tables using affinity table
US7299317B1 (en) Assigning prefixes to associative memory classes based on a value of a last bit of each prefix and their use including but not limited to locating a prefix and for maintaining a Patricia tree data structure
US6343289B1 (en) Efficient search and organization of a forwarding database or the like
CA2302744A1 (en) A lookup device and a method for classification and forwarding of packets
CN110971526A (en) Flow table expansion method and device for FDB (fully drawn bus) resources of hybrid switch
US7523251B2 (en) Quaternary content-addressable memory

Legal Events

Date Code Title Description
NUG Patent has lapsed