Sharing network adapter among multiple logical partitions in a data processing system
[0001] 1. Field of the Present Invention [0002] The present invention generally relates to the field of data processing systems and more particularly to a data processing system employing multiple, logical partitions that share a common hardware element such as a network adapter. [0003] 2. History of Related Art [0004] Logical partitioning refers to the ability to make a single multiprocessor system, such as an AS/400e system from IBM Corporation, behave as if it were two or more independent systems. A system implementing logical partitions (LPARs) may be referred to herein as an LPAR system. Logical partitions generally fall into two categories, namely, primary partitions and secondary partitions. Each logically partitioned system typically has a primary partition and one or more secondary partitions. Each logical partition represents a division of resources within the system. Each partition is referred to as “logical” because the division of resources is virtual, not physical. The primary resources in a typical system include its processors, main storage (system storage), I/O buses, and I/O adapters (IOA's). Each logical partition is configured to operate as an independent logical system, but each partition may share physical system attributes such as the system serial number, system model, and processor feature code. Other system attributes may vary among partitions. For example, each partition in a conventionally implemented LPAR has dedicated hardware such as processors, main storage, and I/O devices. [0005] Logically partitioned systems are gaining in popularity as a means of extending an enterprise's computing capabilities without expending resources on additional hardware. Dedicating a portion of a system's resources (disk storage units, processors, memory, and I/O devices) to a partition achieves logical isolation of software. Logical partitions also have some hardware fault tolerance if configured properly. Interactive and batch workloads that may not run well together on a single machine can be isolated and run more efficiently in separate partitions. Similarly, production and test environments can be implemented on a single physical system. Thus, a customer can consolidate several systems into one system with logical partitions thereby eliminating the need for, and expense of, additional equipment. [0006] Customers have increased the number of partitions they implement on their systems to the point of taxing the hardware constraints of the system. More specifically, because conventionally implemented LPAR systems contemplate dedicating certain hardware resources to a particular logical partition, the number of such resources must be increased when the number of partitions increases. Unfortunately, it is not typically desirable or even always possible to increase hardware resources in a system arbitrarily. The number of available expansion slots, for example, places a physical limitation on the number of resources such as network adapters that can be added to a system. Because most partitions require or strongly desire access to a network adapter, the number of partitions on a system may be undesirably limited by this hardware constraint. It would, therefore, be highly desirable to implement a system and method for enabling a multi-partitioned machine wherein each of the partitions has access to a common network adapter or a common set of network adapters such that the number of physical adapters is less than the number of logical partitions. [0007] The problems identified above are in large part addressed by a data processing system comprising a set of logical partitions and at least one hardware resource that is shared by two or more of the partitions. The hardware resource is typically a network communication device such as a conventional network adapter. A first logical partition will generally take control or ownership of the resource through resource driver software that is part of the first partition. The other partitions that want to share the resource typically then register themselves with the first partition. In one embodiment, the registration of each subsequent partition is achieved by registering a set of low level network identifiers with the resource driver software. In one embodiment, a Media Access Control (MAC) address is assigned to each logical partition. Each logical partition then registers this address with the resource driver to identify itself from other logical partitions. The first partition will then typically configured the resource to prevent any hardware filtering of packets or other information that the resource might otherwise engage in. Once the hardware filtering is deactivated, the resource can receive and accept any and all packets on the connected medium. The driver software can then compare the destination MAC address against the list of registered MAC addresses and forward the packet to the appropriate LPAR if a match is detected. The driver can typically also accommodate broadcast packets that are intended to be sent to every node on the network. [0008] Other objects and advantages of the invention will become apparent upon reading the following detailed description and upon reference to the accompanying drawings in which: [0009] [0010] [0011] [0012] While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description presented herein are not intended to limit the invention to the particular embodiment disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. [0013] Generally speaking the present invention contemplates a system and method that enable the sharing of a hardware resource, such as a network adapter, among multiple partitions of a logically partitioned system. The hardware resource is typically “owned” by a primary or first partition. Each partition desiring use of the resource then shares the resource by creating a unique logical version of the resource. The unique logical versions are preferably transparent to the hardware resource itself thereby minimizing the impact of implementing the change. [0014] Portions of the present invention may be implemented as a set of computer executable instructions stored on a computer readable medium. The medium may include a volatile medium such as the system memory or cache memory of a data processing system during times when the instructions are being executed by the system. At other times, the instructions may be stored on a non-volatile medium such as a floppy diskette, hard disk, CD ROM, DVD, flash memory card, and the like. [0015] Before discussing novel elements of the invention, a brief introduction to logically partitioned data processing system is presented. Turning to the drawings, [0016] A host bridge 108 provides an interface between host bus 104 and an I/O bus 109. I/O bus 109 is representative of any standardized peripheral bus including as an example, a Peripheral Components Interface (PCI) bus well known in the field of microprocessor-based data processing system design. The depicted embodiment of system 100 uses I/O bus 109 as a “primary” I/O bus that is connected to first and second secondary I/O busses 120 [0017] System 100 is logically partitioned into a first or primary partition (LPAR) 101 [0018] Among the most commonly used IOA is the network communication device or network adapter that the system uses to communicate with a network to which other data processing systems are also attached. Network adapters enable systems to communicate via local area networks and/or wide area networks such as the Internet. Because most if not all logical partitions in any data processing system can benefit from access to a network, each partition typically requires access to a network adapter. If the system has three or more partitions, outfitting each partition with a dedicated network adapter will quickly consume all of the available IOA slots. [0019] To address the problem of limited resources in a highly partitioned system, the present invention contemplates the sharing of one or more resources among the logical partitions. Turning to [0020] System 200 is logically partitioned into a first LPAR 201 [0021] Turning now to [0022] After assuming control of the shared resource, the owning partition then configures the resource to recognize and accept all traffic on network 225. In the specific case of a network adapter, LPAR 1 achieves this state by configuring the adapter in a “promiscuous” mode in which network adapter 225 does no filtering of network data packets based upon the destination address of those packets. When operating in promiscuous mode, network adapter 225 receives each data packet traveling over network 230. In the context of the present invention, promiscuous mode enables system 200 to accept data packets that are destined for any of its logical partitions. Appropriate filtering and routing of the received packets can then be performed by driver 310. [0023] Each logical partition that wants to share network adapter 225 with LPAR 1 “registers” itself with LPAR 1. In one embodiment, this registration process is accomplished by requiring each partition to send LPAR 1 and NIC driver 310 a unique identifier. Driver 310 then uses the identifiers to filter and route packets received by adapter 225. [0024] In an embodiment that emphasizes compatibility with existing network protocols, each LPAR that wants to share driver 225 sends driver 310 a low-level identifier. For purposes of this disclosure, a low-level identifier refers to an identifier embedded below the network layer of the protocol. (See the Open System Interconnect (OSI) reference model for a description of the seven layers of a prototypical network communication protocol). In an Ethernet network environment, for example, media access control (MAC) addresses provide these low-level identifiers. [0025] Each LPAR in system 200 is typically assigned or otherwise associated with a unique MAC address. The LPAR is then responsible for providing its MAC address to LPAR 1 and NIC driver 310. Thus, [0026] Once network adapter 225 is configured in promiscuous mode and one or more LPARs have registered their MAC addresses or other identifiers with LPAR 1 and, more specifically with NIC driver 310, all data packets traversing network 230 will be received and accepted by adapter 225. NIC driver 310 will then perform software filtering and routing of each packet based upon its MAC address. If the MAC address indicates that the corresponding packet was sent as a broadcast packet intended to be received by each node on the system, NIC driver 310 will forward the packet to each registered LPAR typically via the inter-LPAR communication facility. If the packet has a specific (non-broadcast) MAC address, NIC driver 310 compares the MAC address against all of its registered MAC addresses. If NIC driver 310 detects a match between a packet's MAC address and a MAC address currently registered with NIC driver 310, the driver forwards the packet to the appropriate LPAR. If the packet MAC address of a received packet does not match a MAC address registered with NIC driver 310, the packet is discarded. When a participating LPAR wants to send a packet to a remote node (a network node external to system 200), the LPAR forwards the packet to NIC driver 310 via the inter-partition facility. NIC driver 310 is then responsible for sending the packet to the network. If a first LPAR forwards a packet to NIC driver 310 that contains the MAC address of a second LPAR within the system, NIC driver 310 is configured to forward the packet to the second LPAR without placing the packet on network 230. Thus, the destination address of each packet received by NIC driver 310, whether originating from an LPAR of system 200 or from network 230, is compared against the MAC addresses registered with the driver. [0027] The use of low level identifiers to differentiate among the various logical partitions enable the present invention to be implemented relatively transparently to the bulk of the existing network protocols. Substantially all of necessary modifications can be implemented at the MAC layer thereby leaving the bulk of the protocol stack as it existed previously. This feature of the invention beneficially minimizes the impact of the invention on the existing network and eases the implementation. [0028] It will be apparent to those skilled in the art having the benefit of this disclosure that the present invention contemplates a logically partitioned data processing system enabled to share a hardware resource such as a network interface card to reduce demand for limited available adapter slots. It is understood that the form of the invention shown and described in the detailed description and the drawings are to be taken merely as presently preferred examples. It is intended that the following claims be interpreted broadly to embrace all the variations of the preferred embodiments disclosed. A data processing system comprising a set of logical partitions and at least one hardware resource that is shared by two or more of the partitions is disclosed. The hardware resource is typically a network communication device such as a conventional network adapter. A first logical partition will generally take control or ownership of the resource through resource driver software that is part of the first partition. The other partitions that want to share the resource typically then register themselves with the first partition. In one embodiment, the registration of each subsequent partition is achieved by registering a set of low level network identifiers with the resource driver software. In one embodiment, a Media Access Control (MAC) address is assigned to each logical partition and the logical partition registers this address with the resource driver to identify itself from other logical partitions. The first partition will then typically configured the resource to prevent any hardware filtering of packets or other information that the resource might otherwise engage in. Once the hardware filtering is deactivated, the resource can receive and accept any and all packets on the connected medium. The driver software can then compare the destination MAC address against the list of registered MAC addresses and forward the packet to the appropriate LPAR if a match is detected. The driver can typically also accommodate broadcast packets that are intended to be delivered to every node on the network. 1. A data processing system, comprising:
a set of hardware resources; means for organizing the set of hardware resources into first and second logical partitions, wherein resources within a partition are logically dedicated to the partition; a shareable resource; driver means suitable for enabling the first logical partition to control the shareable resource; inter-partition means suitable for enabling the first and second partitions to communicate with each other; means for enabling the second partition to register an identifier with the driver means; and wherein the driver means is suitable for comparing the destination address of a received data packet to the registered identifier, and further suitable for forwarding the packet to the second partition responsive to matching the destination packet with the hardware identifier. 2. The system of 3. The system of 4. The system of 5. The system of 6. The system of 7. The system of 8. A computer program product comprising computer executable instructions on a computer readable medium for enabling resource sharing in a multiple partition data processing system, comprising:
computer code means for organizing a set of hardware resources into first and second logical partitions, wherein resources within a partition are logically dedicated to the partition; driver code means suitable for enabling the first logical partition to control a shareable resource; inter-partition code means suitable for enabling the first and second partitions to communicate with each other; computer code means for enabling the second partition to register an identifier with the driver means; and wherein the driver means is suitable for comparing the destination address of a received data packet to the registered identifier, and further suitable for forwarding the packet to the second partition responsive to matching the destination packet with the hardware identifier. 9. The computer program product of 10. The computer program product of 11. The computer program product of 12. The computer program product of 13. The computer program product of 14. The computer program product of 15. A method for enabling resource sharing in a multiple partition data processing system, comprising:
organizing a set of hardware resources into first and second logical partitions, wherein resources within a partition are logically dedicated to the partition; enabling the first logical partition to control a shareable resource; enabling the first and second partitions to communicate with each other; registering an identifier corresponding to the second partition with the driver means; and wherein the driver means is suitable for comparing the destination address of a received data packet to the registered identifier, and further suitable for forwarding the packet to the second partition responsive to matching the destination packet with the hardware identifier. 16. The method of 17. The method of 18. The method of 19. The method of 20. The method of 21. The method of BACKGROUND
SUMMARY OF THE INVENTION
BRIEF DESCRIPTION OF THE DRAWINGS
DETAILED DESCRIPTION OF THE INVENTION


