This invention especially relates to mapping prefixes and values of a hierarchical space to other representations; and more particularly, the invention relates to mapping prefixes and values of a hierarchical space to another representations using a trie representation.
The communications industry is rapidly changing to adjust to emerging technologies and ever increasing customer demand. This customer demand for new applications and increased performance of existing applications is driving communications network and system providers to employ networks and systems having greater speed and capacity (e.g., greater bandwidth). In trying to achieve these goals, a common approach taken by many communications providers is to use packet switching technology. Increasingly, public and private communications networks are being built and expanded using various packet technologies, such as Internet Protocol (IP).
A network device, such as a switch or router, typically receives, processes, and forwards or discards a packet based on one or more criteria, including the type of protocol used by the packet, addresses of the packet (e.g., source, destination, group), and type or quality of service requested. Additionally, one or more security operations are typically performed on each packet. But before these operations can be performed, a packet classification operation must typically be performed on the packet.
Packet classification as required for access control lists (ACLs) and forwarding decisions is a demanding part of switch and router design. This packet classification of a received packet is increasingly becoming more difficult due to ever increasing packet rates and number of packet classifications. For example, ACLs require matching packets on a subset of fields of the packet flow label, with the semantics of a sequential search through the ACL rules. IP forwarding requires a longest prefix match.
One known approach uses binary and/or ternary content-addressable memories to perform packet classification. Ternary content-addressable memories allow the use of wildcards in performing their matching, and thus are more flexible than binary content-addressable memories. These content-addressable memories are expensive in terms of power consumption and space, and are limited in the size of an input word (e.g., 72, 144, 288 bits, etc.) on which a lookup operation is performed as well as the number of entries which can be matched.
Various applications that use packet classification, such as Security Access Control, Quality of Service etc., typically need to match source and/or destination addresses. These addresses can be quite large, and possibly too large for providing all bits representing one or more addresses to a content-addressable memory. For example, Internet Protocol version 6 (IPv6) uses addresses having a length of 128 bits and a typical large content-addressable memory has a maximum search width of 288 bits. Therefore, almost all the bits of a content-addressable memory would be used for matching the source and destination addresses, while providing a small, and quite possibly insufficient number of input bits for matching other criteria such as source and destination port numbers, protocol and other header fields, etc. Needed are new methods and apparatus for performing lookup operations, especially for IPv6 and other addresses, using content-addressable memories and other devices.
Systems and methods are disclosed for mapping prefixes and/or values of a hierarchical space to other representations. In one embodiment, a first representation of a hierarchical relationship among a multiple first prefixes is generated. An optimized representation of the hierarchical relationship among the multiple first prefixed is determined. A mapping of the plurality of first prefixes into a plurality of second prefixes is generated based on the optimized representation.
The appended claims set forth the features of the invention with particularity. The invention, together with its advantages, may be best understood from the following detailed description taken in conjunction with the accompanying drawings of which:
Methods and apparatus are disclosed for mapping prefixes and/or values of a hierarchical space to other representations while maintaining the original hierarchy, which may be especially useful in conjunction with associative memories, such as, but not limited to binary and ternary content-addressable memories (CAMs). Embodiments described herein include various elements and limitations, with no one element or limitation contemplated as being a critical element or limitation. Each of the claims individually recite an aspect of the invention in its entirety. Moreover, some embodiments described may include, but are not limited to, inter alia, systems, networks, integrated circuit chips, embedded processors, ASICs, methods, and computer-readable medium containing instructions. The embodiments described hereinafter embody various aspects and configurations within the scope and spirit of the invention, with the figures illustrating exemplary and non-limiting configurations.
As used herein, the term “packet” refers to packets of all types, including, but not limited to, fixed length cells and variable length packets, each of which may or may not be divisible into smaller packets or cells. Moreover, these packets may contain one or more types of information, including, but not limited to, voice, data, video, and audio information. Furthermore, the term “system” is used generically herein to describe any number of components, elements, sub-systems, devices, packet switch elements, packet switches, routers, networks, computer and/or communication devices or mechanisms, or combinations of components thereof. The term “computer” is used generically herein to describe any number of computers, including, but not limited to personal computers, embedded processors and systems, control logic, ASICs, chips, workstations, mainframes, etc. The term “device” is used generically herein to describe any type of mechanism, including a computer or system or component thereof. The terms “task” and “process” are used generically herein to describe any type of running program, including, but not limited to a computer process, task, thread, executing application, operating system, user process, device driver, native code, machine or other language, etc., and can be interactive and/or non-interactive, executing locally and/or remotely, executing in foreground and/or background, executing in the user and/or operating system address spaces, a routine of a library and/or standalone application, and is not limited to any particular memory partitioning technique. The steps and processing of signals and information illustrated in the figures are typically be performed in a different serial or parallel ordering and/or by different components in various embodiments in keeping within the scope and spirit of the invention. Moreover, the terms “network” and “communications mechanism” are used generically herein to describe one or more networks, communications mediums or communications systems, including, but not limited to the Internet, private or public telephone, cellular, wireless, satellite, cable, local area, metropolitan area and/or wide area networks, a cable, electrical connection, bus, etc., and internal communications mechanisms such as message passing, interprocess communications, shared memory, etc. The terms “first,” “second,” etc. are typically used herein to denote different units (e.g., a first element, a second element). The use of these terms herein does not necessarily connote an ordering such as one unit or event occurring or coming before the another, but rather provides a mechanism to distinguish between particular units. Additionally, the extensible disclosure herein may refer a data structure, component, system, element, etc. in the singular tense, the disclosure is extensible and such discussion implies zero, one, or more than one of the particular item; and the converse is also true. Moreover, the phrase “based on x” is used to indicate a minimum set of items x from which something is derived, wherein “x” is extensible and does not necessarily describe a complete list of items on which the operation is based. Additionally, the phrase “coupled to” is used to indicate some level of direct or indirect connection between two elements or devices, with the coupling device or devices modify or not modifying the coupled signal or communicated information. Moreover, the term “or” is used herein to identify an alternative selection of one or more, including all, of the conjunctive items.
In one view, a trie is a directed path through a tree with each path through the tree qualified by a unique result. Each child of a trie is associated with a symbol from a finite alphabet depending on its relation to its parent node. A binary trie is a directed path through a binary tree with each path through the tree qualified by a unique result. This unique result is typically codified by the path taken with a one or zero representing a left or right path taken to reach the desired node. A prefix is typically a string of characters that appears at the beginning of a longer string of characters or it may be a string in and of itself. In many cases of practical interest the characters in a prefix are binary digits (i.e., ones and zeroes). A prefix is sometimes terminated by a wildcard, such as an asterisk, which represents the remaining arbitrary binary digits in a longer, fixed-length or arbitrary length string.
Methods and apparatus are disclosed for mapping prefixes and/or values of a hierarchical space to other representations while maintaining the original hierarchy, which may be especially useful in conjunction with associative memories, such as, but not limited to binary and ternary content-addressable memories. Typically, in the original space, a longest matching operation is performed using a value on a set of prefixes. It is typically important that the same results occur in a mapped spaced. Thus, in one embodiment, the new mapped space must maintain certain attributes of the original space, such as the same hierarchical structure and longest matching attributes.
In one embodiment, a set of prefixes associated with a hierarchical space is received. A new representation of the set of prefixes is developed, such as by using a trie representation, with the new representation maintaining the original hierarchical relationship. This new representation may be an optimized representation selected to reduce or minimize the depth of the trie or some other cost. A set of new prefixes are generated along with a set of lookup values. During processing, a value, such as that included in a packet, is converted to one of the lookup values, which is used to generate a lookup word for use in matching against the new prefixes. A new representation may be generated for each of multiple spaces for any parameter or parameters which will be used in a lookup operation and for any processing function. For example, in a communications device such as a router, these spaces include, but are not to limited network addresses (e.g., source, destination, etc.), port numbers, quality of service parameters, and policing values. These packet processing functions include, but are not limited to destination, policy-based, priority and other types of routing, netflow operations, netflow statistic, quality of service, and policing functions. Of course, the spaces and functions used are dependent on the particular application of one embodiment.
In one embodiment, programming engine 100 includes a processor 102, memory 101, storage devices 104, and programming interface 105, which are electrically coupled via one or more communications mechanisms 109 (shown as a bus for illustrative purposes). Various embodiments of programming engine 100 may include more or less elements. The operation of programming engine 100 is typically controlled by processor 102 using memory 101 and storage devices 104 to perform one or more tasks or processes. Memory 101 is one type of computer-readable medium, and typically comprises random access memory (RAM), read only memory (ROM), flash memory, integrated circuits, and/or other memory components. Memory 101 typically stores computer-executable instructions to be executed by processor 102 and/or data which is manipulated by processor 102 for implementing functionality in accordance with the invention. Storage devices 104 are another type of computer-readable medium, and typically comprise solid state storage media, disk drives, diskettes, networked services, tape drives, and other storage devices. Storage devices 104 typically store computer-executable instructions to be executed by processor 102 and/or data which is manipulated by processor 102 for implementing functionality in accordance with the invention.
After the one or more lookup values 273 are generated, a lookup operation is typically performed by associative memory 260 to produce result 261, which is typically used as input to a memory (e.g., SRAM) 262 to produce a result 265 for use by packet processor 220. In one embodiment, result 261 is returned to packet processor 220 in processing one or more of the received packets 240. In one embodiment, lookup word 255 includes multiple mapped lookup values 273, while in one embodiment, lookup word 255 includes a single mapped lookup value 273. In one embodiment, a single associative memory includes entries used in converting original lookup values 279 to mapped lookup values 273 and entries used in performing a lookup operation on lookup words 255.
When all address spaces have been processed as determined in process block 402, then, as determined in process block 420, if a match is to be performed using lookup values and prefixes from multiple spaces, then in process blocks 422 and 424, the matching entries are generated based on the prefix values of previously generated new hierarchical representations, and one or more associative memories and/or data structures are programmed with these generated entries. Processing is complete as indicated by process block 426.
Note, this processing is described in terms of receiving and processing packets. However, the invention is extensible, and not limited to processing packets. Rather, the invention may be used for processing any type of information.
Processing begins with process block 440, and proceeds to process block 442, wherein a packet is received. Next, in process block 444, information (e.g., source address, destination address, port fields, service type, or other packet header or data fields) is extracted on which to perform a lookup and matching operations. Next, as determined in process block 446, while there are more spaces associated with the extracted information, convert the original values of a particular space to lookup values by typically finding the longest matching prefix in the prefix mapping data structure in process block 448. Next, in process block 450, one or more lookup words are generated including one or more lookup values previously generated. In one embodiment, multiple lookup words include a same lookup value (e.g., a source or destination address), in which case, an original value need only be converted to its corresponding lookup value once. Next, in process block 452, one or more associative memory, database, or other lookup operations are performed using the one or more generated lookup words. In process block 454, a packet is processed or other operation performed based on the results of the lookup operation. Processing returns to process block 442 to receive and process more packets.
Turning first to
Next in process block 510 of
Next, in process block 514, an optimized trie representation is generated for the modified ancestor tree. For example, the cost is defined in one embodiment as the number of bits required to represent a value or address, which is equivalent in one embodiment to the depth of the mapped trie representation.
For example, illustrated in
Processing of the flow diagram illustrated in
In view of the many possible embodiments to which the principles of our invention may be applied, it will be appreciated that the embodiments and aspects thereof described herein with respect to the drawings/figures are only illustrative and should not be taken as limiting the scope of the invention. For example and as would be apparent to one skilled in the art, many of the process block operations can be re-ordered to be performed before, after, or substantially concurrent with other operations. Also, many different forms of data structures could be used in various embodiments. The invention as described herein contemplates all such embodiments as may come within the scope of the following claims and equivalents thereof.
Number | Name | Date | Kind |
---|---|---|---|
5088032 | Bosack | Feb 1992 | A |
5319763 | Ho et al. | Jun 1994 | A |
5481540 | Huang | Jan 1996 | A |
5515370 | Rau | May 1996 | A |
5528701 | Aref | Jun 1996 | A |
5651099 | Konsella | Jul 1997 | A |
5721889 | Miller et al. | Feb 1998 | A |
5740171 | Mazzola et al. | Apr 1998 | A |
5781772 | Wilkinson, III et al. | Jul 1998 | A |
5809501 | Noven | Sep 1998 | A |
5829004 | Au | Oct 1998 | A |
5842040 | Hughes et al. | Nov 1998 | A |
5848416 | Tikkanen | Dec 1998 | A |
5884297 | Noven | Mar 1999 | A |
5898689 | Kumar et al. | Apr 1999 | A |
5920886 | Feldmeier | Jul 1999 | A |
5930359 | Kempke et al. | Jul 1999 | A |
5956336 | Loschke et al. | Sep 1999 | A |
6000008 | Simcoe | Dec 1999 | A |
6018524 | Turner et al. | Jan 2000 | A |
6052683 | Irwin | Apr 2000 | A |
6061368 | Hitzelberger | May 2000 | A |
6067574 | Tzeng | May 2000 | A |
6081440 | Washburn et al. | Jun 2000 | A |
6091725 | Cheriton et al. | Jul 2000 | A |
6097724 | Kartalopoulos | Aug 2000 | A |
6115716 | Tikkanen et al. | Sep 2000 | A |
6141738 | Munter et al. | Oct 2000 | A |
6148364 | Srinivasan et al. | Nov 2000 | A |
6181698 | Hariguchi | Jan 2001 | B1 |
6236658 | Essbaum et al. | May 2001 | B1 |
6237061 | Srinivasan et al. | May 2001 | B1 |
6243667 | Kerr et al. | Jun 2001 | B1 |
6289414 | Feldmeier et al. | Sep 2001 | B1 |
6295576 | Ogura et al. | Sep 2001 | B1 |
6298339 | Bjornson | Oct 2001 | B1 |
6307855 | Hariguchi | Oct 2001 | B1 |
6529909 | Bowman-Amuah | Mar 2003 | B1 |
6717646 | Park et al. | Apr 2004 | B1 |
6717946 | Hariguchi et al. | Apr 2004 | B1 |
6775737 | Warkhede et al. | Aug 2004 | B1 |
20030174717 | Zabarski et al. | Sep 2003 | A1 |
Number | Date | Country |
---|---|---|
WO 01052063 | Jul 2001 | WO |