Embodiments of the invention relate generally to virtual electronic devices, in particular routing to electronic virtual devices.
The following detailed description refers to the accompanying drawings that show, by way of illustration, specific details and embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the present invention. Other embodiments may be utilized and structural, logical, and electrical changes may be made without departing from the scope of the invention. The various embodiments disclosed herein are not necessarily mutually exclusive, as some disclosed embodiments can be combined with one or more other disclosed embodiments to form new embodiments. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the embodiments of the present invention is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.
An embodiment provides an approach to create a scalable and high-performance virtual bridge in a virtualized platform. An apparatus having virtual machines (VMs) permits the apparatus, a real (physical) machine, to be partitioned, such that the underlying hardware of the apparatus appears as one or more independently operating physical machines. Each VM may function as a self-contained platform, running its own operating system (OS) and/or application software. Software executing within a VM is collectively referred to as guest software. A Virtual Machine Monitor (VMM) runs on an apparatus that executes instructions and presents to other software an abstraction of one or more VMs. The VMM may be in control of the platform. The VMs, running guest OSs, are isolated replicas of the hardware that are managed by the VMM. The VMM may provide a management application that allows the end user or administrator to set the number of VMs to launch and assign to a VM zero, one, or multiple virtual network interface cards (VNICs). Similar to real network interface cards, each VNIC has an address associated with it. The address may include a medium access control (MAC) address.
VMM 220 includes virtual bridge 230, which enforces the virtual network configuration set by a user. Routing complexity that may arise typically resides in virtual bridge 230, which is a component for multiplexing outbound traffic and demultiplexing inbound traffic. The multiplexer side is responsible for determining whether outgoing frames should be looped back to another virtual device within the system, sent out to the real network, or both. The demultiplexer side decides to which virtual device incoming frames should be routed. In general, a bridge incurs up to n times the complexity when making its MAC level routing decisions, where n is the number of MAC addresses stored in the bridge's memory. In various embodiments, means are provided for virtual bridge 230 to reduce its time complexity to the order associated with one MAC address.
In a non-limiting exemplary embodiment,
A straight-forward approach for virtual bridge 230 to make its routing decisions is to store all VNIC MAC addresses in a list, either statically or dynamically allocated, and, for every outgoing/incoming frame, perform a sequential search through every VNIC of every VM. However, this scheme does not scale well as the number of VMs and/or VNICs per VM grows. In an embodiment, a unique scheme is provided to assign MAC addresses to the VNICs so that virtual bridge 230 may make a routing decision with a single access to a routing table. In an embodiment, a portion of an address of a frame is assigned a value such that the value is distinguished from those assigned to physical devices. In such a case, the value indicates that the address is for a virtual device such that no physical device is associated with the assigned value. To further identify a virtual device, creation or generation of the address may include assigning an index to another byte of the address, where the index belongs to a table that maintains pointers to virtual device objects. However, since virtual devices may be associated with different physical devices at various locations in a network or networks, the address of the given virtual device is assigned a number of bytes that are a part of the physical device to which the virtual device is associated.
In an embodiment, a 6-byte MAC address is created for a VNIC, where the first byte is set to a value that is different from the first byte of all the assigned Organizationally Unique Identifiers (OUIs). An OUI is a 24-bit globally unique assigned number referenced by various standards. The 24-bit structure for an OUI may change as variations in technology occur. By examining an OUI, a determination can be made as to the manufacturer of the physical NIC. In an embodiment, the first byte for the VNIC could be set to 0x0D, since it is reserved and no vendor OUI starts with this value. Because no vendor has a product OUI that starts with 0x0D, an address starting with 0x0D identifies a VNIC rather than a real NIC. By selecting a unique OUI prefix, collisions with real MAC addresses are eliminated. In an embodiment, depending on the standard used, the value that identifies the address as belonging to a virtual device may be located in another portion of the MAC address other than the first byte.
In an embodiment, the second byte may be an index of a table that maintains pointers to all VNIC objects. Depending on the standard, the index of the table may be located in another portion of the MAC address. The table effectively maps the MAC address to a data structure that contains VNIC specific information such as callback routines, DMA pointers, registers, etc. VNIC objects provide data structures to interface with the VMM. These VNIC objects may be data structures providing parameters that associate VNICs to VMs and are used by the VMM to route a packet to a VM.
The index may be randomly generated. In an embodiment, when an apparatus or a system is started or powered up, part of the VMM initialization may include creating VNIC objects. Generation of the VNIC objects may be managed by the VMM as part of the creation of VNICs including the assignment of a MAC address to each VNIC. At the beginning of the process, the table may be empty and as VNICs are created, an entry is assigned in the table. The manner in which the index is assigned may vary, as long as only one index is assigned to each VNIC. Thus, as the apparatus proceeds through the initialization process, a VNIC is created, a data structure for the VNIC is created, and a MAC address is generated for the VNIC with the MAC address including the index. Then, the process continues for each additional VNIC including providing a table index. The table index may be any index in the table as long as it is unique to the VNIC being created. In an embodiment, the indexes may be assigned sequentially as the VNICs are generated. There are no restrictions to assigning the index as long as the index assignments are unique.
In an embodiment, the last four bytes of the address of a VNIC are assigned the last four bytes of the address of the physical NIC that provides routing of frames to the VNIC from a location external to its VMM. The routing external to the VMM is exemplarily shown in
In various embodiments of methods that provide a scheme for routing by a virtual bridge, a routing table may be used that embeds an index to the routing table in the VNIC's MAC address to preclude the need for a sequential search to route frames. A reserved prefix may be used in the MAC address to eliminate collisions with the MAC addresses of real NICs. Random values and a subset of a real NIC's MAC address may be used to minimize collisions among VNICs' MAC addresses. In various embodiments, MAC addresses are created for VNICs during apparatus boot up as part of the process of creating a VNIC and MAC addresses by the VMM. Then, VMs may interact with their associated VNICS including obtaining the MAC address of their associated VNICS. With a MAC address having a format in accordance with embodiments discussed herein, the virtual bridge may operate at enhanced speed.
Embodiments for a MAC address for a virtual device may be used by a virtual bridge, such as virtual bridge 230 of
In an embodiment, when a frame reaches a virtual bridge, such as virtual bridge 230 of
Embodiments, such as those described herein, may increase the routing performance of the virtual bridge significantly by reducing routing time complexity from on the order of n to about the order 1 VNIC with a marginal increase in the memory. For example, a 1 KB table may be used to handle 256 VNICs. The virtual bridge may handle any number of VNICs with no change in the routing performance, providing scalability. Various embodiments may also provide elimination of collisions among MAC addresses of VNICs in the same virtual system, elimination of collisions among virtual MAC addresses and real MAC addresses, and reduced chance of collision among MAC addresses of VNICs that reside in different systems. Various embodiments providing such dynamic routing by a virtual bridge may enhance virtualization solutions for various applications.
An embodiment may include an additional peripheral device or devices 660 coupled to bus 630. Bus 630 may be compatible with PCI or with PCI express. Peripheral devices 660 may also include displays, additional storage memory, or other control devices that may operate in conjunction with controller 610. Alternatively, peripheral devices 660 may include displays, additional storage memory, or other control devices that may operate in conjunction with controller 610 and/or memory 620.
System 600 may include a communication unit 640 coupled to controller 610 via parallel bus 630. In an embodiment, communication unit 640 may include a network interface. In an embodiment, the network interface may be implemented in a semiconductor device (i.e., a “chip”). Alternatively, in various embodiments, the network interface may be integrated in separate semiconductor devices forming part of a family of chips called a “chip set.” A chip set may be realized as a group of microchips designed to work and to be sold as a unit in performing one or more related functions. In an embodiment, communication unit 640 may include a network interface implemented as a network interface card, such as NIC 260 of
Various embodiments for methods and apparatus allow for increased speed of operation to make a routing decision using a virtual bridge. In an embodiment, information in an address may be used to distinguish between a real device and a virtual device. Other information in the address may be used to index directly into a table to distinguish between different virtual devices on the same virtual platform. Other information may be used to associate the virtual device with a given real device, which indicates whether the virtual device is local or remote to the apparatus or system having the virtual platform.
Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement that is calculated to achieve the same purpose may be substituted for the specific embodiments shown. This application is intended to cover any adaptations or variations of embodiments of the present invention. It is to be understood that the above description is intended to be illustrative, and not restrictive, and that the phraseology or terminology employed herein is for the purpose of description and not of limitation. Combinations of the above embodiments and other embodiments will be apparent to those of skill in the art upon reviewing and studying the above description. The scope of embodiments of the present invention includes any other applications in which embodiments of the above structures and fabrication methods are used. The scope of the embodiments of the present invention should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
Number | Name | Date | Kind |
---|---|---|---|
6727386 | Hamrock | Apr 2004 | B2 |
6928478 | Gangadharan | Aug 2005 | B1 |
7103035 | Kanuri | Sep 2006 | B1 |
7120701 | Warrier et al. | Oct 2006 | B2 |
7251824 | Edwards et al. | Jul 2007 | B2 |
7293108 | Warrier et al. | Nov 2007 | B2 |
20020023210 | Tuomenoksa et al. | Feb 2002 | A1 |
20020092174 | Wexler | Jul 2002 | A1 |
20030130832 | Schulter et al. | Jul 2003 | A1 |
20040032876 | Garg et al. | Feb 2004 | A1 |
20040057380 | Biran et al. | Mar 2004 | A1 |
20050030956 | Lord et al. | Feb 2005 | A1 |
20050125691 | Garg et al. | Jun 2005 | A1 |
20050138620 | Lewites | Jun 2005 | A1 |
20050182853 | Lewites et al. | Aug 2005 | A1 |
20050183082 | Lewites et al. | Aug 2005 | A1 |
20050204357 | Garg et al. | Sep 2005 | A1 |
20050240758 | Lord et al. | Oct 2005 | A1 |
20060075014 | Tharappel et al. | Apr 2006 | A1 |
20060095591 | Kelly | May 2006 | A1 |
20060156399 | Parmar et al. | Jul 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20060233168 A1 | Oct 2006 | US |