The present invention relates generally to the data processing field, and more particularly, relates to a method, apparatus and computer program product for implementing N-way fast failover in a virtualized Ethernet adapter.
One known, prior art arrangement provides rapid failover between ports of a single Ethernet adapter. Rapid failover is accomplished by switching the data buffers and other associated structures above the transceivers from one port to another when a port has failed. A significant drawback to this prior art arrangement is that an additional idle physical Ethernet port is required to accomplish the failover.
This prior art arrangement worked with a pair of ports including one backup port normally being idle. Implementations with more than two ports would be possible, but would disadvantageously include additional idle backup ports. This prior art arrangement has been somewhat acceptable in past technologies.
However, the cost of a single port has significantly increased with 10 Gigabit (Gb) Ethernet as compared with Gigabit Ethernet. This increased cost makes the prior art arrangement much less attractive with the newer ports having significantly increased cost for the required idle backup port.
Link Aggregation defined in the IEEE 802.3ad (Link Aggregation) standard requires a protocol running between the ports, and special enabling firmware is required between a switch and a workstation. Also there is a special function required out of the switch for the IEEE 802.3ad (Link Aggregation).
A need exists for an effective mechanism for implementing N-way fast failover in a virtualized Ethernet adapter. It is desirable to provide such mechanism having faster failover speeds as compared to 802.3ad while providing much of the same function.
Principal aspects of the present invention are to provide a method, apparatus and computer program product for implementing N-way fast failover in a virtualized Ethernet adapter. Other important aspects of the present invention are to provide such method, apparatus and computer program product for implementing N-way fast failover in a virtualized Ethernet adapter substantially without negative effect and that overcome many of the disadvantages of prior art arrangements.
In brief, a method, apparatus and computer program product are provided for implementing N-way fast failover in a virtualized Ethernet adapter. Requests are posted to queue pairs (OPs) to send and receive Ethernet packets. Each OP stores a designated physical Ethernet port and a respective Media Access (MAC) address. At the time of a failover, the stored failed designated physical Ethernet port in a QP is changed to a functional physical Ethernet port and the stored respective MAC address is retained.
In accordance with features of the invention, an increased bandwidth is available prior to failover because all ports are used, eliminating the use of any backup, idle ports. Improved latency is provided prior to failover because all ports are used. Fast failover is managed in a hypervisor and the failover is completely transparent to the device driver and host system, eliminating the required unique device driver to accommodate fast failover of prior art arrangements and this device driver was required for each operating system platform.
In accordance with features of the invention, with more than two physical Ethernet ports, at the time of a failover, the stored failed designated physical Ethernet port in the QPs are changed, for example, to redistribute the QPs evenly among the multiple new available physical Ethernet ports.
The present invention together with the above and other objects and advantages may best be understood from the following detailed description of the preferred embodiments of the invention illustrated in the drawings, wherein:
In accordance with features of the invention, an improved method is provided for failover of an Ethernet port. A Host Ethernet Adapter (HEA) accomplishes virtualization through the utilization of InfiniBand constructs as the interface to the host operating system in each logical partition. To send and receive Ethernet packets, requests are posted to queue pairs (QPs). These QPs work like standard InfiniBand QPs with the exception that the packet generated is an Ethernet packet, which is sent and received through a physical Ethernet port instead of an InfiniBand packet sent and received through a physical InfiniBand port.
Having reference now to the drawings, in
Network system 100 includes a server computer 101 including a central processing unit 102. Server computer 101 couples a plurality of queue pairs (QPs) queues 103 to a pair of Host Ethernet Adapter (HEA) 104, as shown in
To the external network 110 each HEA 104 appears like a set of Ethernet adapters connected to an Ethernet switch 108. HEA 104 supports virtualization of the physical Ethernet adapter to provide separate logical Ethernet adapters. This allows Ethernet support to be provided for many partitions with a single card instead of requiring a physical Ethernet adapter for each partition. For example, the base hardware support of each HEA 104 includes two physical ports 106. Fast failover is accomplished by switching between the physical ports 106 based upon a designated physical Ethernet port 106 included in respective QPs 103. QPs 103 store a respective Media Access (MAC) address, and the stored MAC address is retained when the QP is changed to a different physical port.
In
In accordance with features and advantages of the invention, with a two port Host Ethernet Adapter 104 both ports 106 are actively utilized for data traffic, instead of using only a single port as in prior art fast failover arrangements. It accomplishes this by segregating the logical adapters into two sets, and assigning each set to a different port. If a port fails, the logical adapters tied to those ports are moved automatically to the other port. This is accomplished completely in the hypervisor 130 without requiring any changes of the device driver 132, 134.
In accordance with features and advantages of the invention, an increased bandwidth is available prior to failover because all physical Ethernet ports 106 are used, eliminating the use of any backup, idle ports. Improved latency is provided prior to failover because all ports 106 are used. Latency will improve even if the link is not saturated due to queueing factors. Performance after failover is exactly equivalent to prior solutions. No changes are required in device driver 132, 134 or any of the host operating systems. The failover is completely transparent to the device driver and host system. Prior art fast failover solutions required a unique device driver to accommodate fast failover, and this device driver was required for each operating system platform. Fast failover now is managed completely in the hypervisor 130. This includes network interactions, for example, sending an Address Resolution Protocol (ARP) packet to update routing information.
Host Ethernet Adapter 104 accomplishes virtualization through the utilization of InfiniBand constructs as the interface to the host operating system in each logical partition. To send and receive Ethernet packets, requests are posted to queue pairs (QPs) queues 103. These QPs queues 103 function like standard InfiniBand QPs except that the packet generated is an Ethernet packet, which is sent/received through a physical Ethernet port 106. To the external network the HEA 104 appears like a set of Ethernet adapters connected to an Ethernet switch 108.
Fast failover of the preferred embodiment is implemented with a new method that enables the usage of both ports 106 simultaneously prior to the failure. This method of the preferred embodiment enables network system 100 to apply twice the bandwidth prior to a port failure, while maintaining the same bandwidth as the prior art failover arrangements after failure. This is accomplished with a different mechanism used for switching between ports. The OP queues 103 act as a queue for each individual logical Ethernet adapter and hold pending send and receive requests. To send packets out of the physical port 106, the hardware goes round-robin through the QPs queues 103 and builds packets into the transmit buffer to be sent out of the physical port 106. A similar process is handled for receive, where incoming packets to a given port 106 go into a transmit buffer and then are distributed to recipient QPs. Each of the QP queues 103 includes an indication of which port 106 it is currently assigned to and also contains the MAC address for the logical adapter it is handling. Prior to failover both ports, for example, Ethernet ports 1, 2, 106, and Ethernet ports 3, 4, 106 are used concurrently with half of the logical adapters (and corresponding QPs) assigned to each. This configuration was not possible prior to Ethernet virtualization because then there was only a single MAC address, and a given MAC address could not be used concurrently on two ports.
At the time of a failover, for example, with an implementation including two ports 1-2, 106 the mechanism for switching ports changes the failed physical port 106, for example, Ethernet port 1 stored in the QPs 103 to the other port, Ethernet port 2, and on the next round-robin cycle packets begin to immediately be transmitted out of the other Ethernet port 2. When the number of ports 1-N is greater than two, the QPs from the failing port, for example, Ethernet port 1, are redistributed evenly among all of the remaining ports 2-N, such that no one physical port becomes overloaded with traffic.
Failover is nearly instantaneous because it is handled in hardware based upon the status of the physical port, and avoids any latency induced by software recovery. For the two port case, this is accommodated via having the hardware handling traffic for a given Ethernet port 1 or 2,106 use a given QP if either a) that QP is designated as belonging to that port, or b) if that QP belongs to the other port and the other port is currently failed. This solution is readily extended to handle the N-port case by explicitly storing the failover port in the QP. Now the port hardware will use a given QP if either a) that QP is designated as belonging to that port, or b) if that QP belongs to a port that is currently failed, and this port is the failover port stored in the QP. After a port has failed in the N-port case, firmware will rearm the failover logic by changing all QPs originally assigned to failed port to be explicitly attached to their respective new ports, which need not all be the same port, and changing the failover port in each of those QPs to be a currently functional port and as before, the OPs 103 may be spread across many ports 106.
If the transition cannot be handled in hardware, then the alternative is to handle the transition in firmware. Firmware is interrupted at the point of port failure and then explicitly changes the assigned port in the QPs 103. This has the drawback that additional packets might be lost because of the increased delay prior to the failover being accomplished. This drawback is minimized because the packets which are lost are destined for a large number of logical adapters, so the loss for any single logical adapter is small. This allows the invention to be realized even in the absence of explicit hardware support.
In accordance with features of the invention, the method scales up to implementations with any number of ports, and behavior is improved as more ports are added. By increasing the number of ports the available resources are correspondingly increased and result in more available bandwidth and greater fault tolerance. Additionally, the logical ports advantageously are rebalanced across all of the still functioning physical ports to maintain good performance.
For example, compare a four port adapter utilizing the method of the invention with a pair of two port adapters utilizing the prior solution. In the absence of failure, the method of the invention uses four physical ports while the prior art arrangement uses two ports. In the event of a single port connection failure, the method of the invention will then be actively using three physical ports while the prior solution will still be using two ports.
In the event of a double port connection failure, the method of the invention then utilizes two ports and maintains network access for all resources. The prior solution will be using two ports if the failures were distributed evenly across the adapters. If both ports which lost the connection were on the same adapter, then only a single port will be utilized by the prior solution and the network connection will have been lost for those resources tied to the failing adapter.
In the event of a triple failure, the method of the invention then utilizes a single port 106 and maintains network access for all resources. The prior solution will also be utilizing a single port, but network access are lost for half of the resources. In the event all four ports experience a connection failure, then both solutions lose network access for all resources.
Referring now to
Referring now to
A sequence of program instructions or a logical assembly of one or more interrelated modules defined by the recorded program means 304, 306, 308, 310, direct the computer system 100 for implementing N-way fast failover in a virtualized Ethernet adapter of the preferred embodiment.
While the present invention has been described with reference to the details of the embodiments of the invention shown in the drawing, these details are not intended to limit the scope of the invention as claimed in the appended claims.