ibmvnic: Client-initiated failover
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Mon, 12 Jun 2017 17:35:04 +0000 (12:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jun 2017 16:53:35 +0000 (12:53 -0400)
commit40c9db8ad8b4b7f87e2f4a5e80cf1732f2825e6b
treea3bfcc05ba728599f0406bef396169daebfe23d2
parent725757aee05e51914b72f25ba2a89c43c3779574
ibmvnic: Client-initiated failover

The IBM vNIC protocol provides support for the user to initiate
a failover from the client LPAR in case the current backing infrastructure
is deemed inadequate or in an error state.

Support for two H_VIOCTL sub-commands for vNIC devices are required
to implement this function. These commands are H_GET_SESSION_TOKEN
and H_SESSION_ERR_DETECTED.

"[H_GET_SESSION_TOKEN] is used to obtain a session token from a VNIC client
adapter.  This token is opaque to the caller and is intended to be used in
tandem with the SESSION_ERROR_DETECTED vioctl subfunction."

"[H_SESSION_ERR_DETECTED] is used to report that the currently active
backing device for a VNIC client adapter is behaving poorly, and that
the hypervisor should attempt to fail over to a different backing device,
if one is available."

To provide tools access to this functionality the vNIC driver creates a
sysfs file that, when written to, will send a request to pHyp to failover
to a different backing device.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/powerpc/include/asm/hvcall.h
drivers/net/ethernet/ibm/ibmvnic.c