[openib-general] [PATCH 1/2 vex branch] IB/VNIC Fix failover from secondary path back to primary path

Ramachandra Kuchimanchi ramachandra.kuchimanchi at qlogic.com
Mon Dec 11 22:28:05 PST 2006


Roland,

Did you get a chance to look at these patches ?

Regards,
Ram

> -----Original Message-----
> From: openib-general-bounces at openib.org [mailto:openib-general-
> bounces at openib.org] On Behalf Of Ramachandra K
> Sent: Thursday, December 07, 2006 4:33 PM
> To: Roland Dreier
> Cc: Openib-General
> Subject: [openib-general] [PATCH 1/2 vex branch] IB/VNIC Fix failover
from
> secondary path back to primary path
> 
> This fixes a bug due to which failover from secondary path back to
primary path
> was not working.
> 
> Signed-off-by: Ramachandra K <ramachandra.kuchimanchi at qlogic.com>
> ---
> 
>  drivers/infiniband/ulp/vnic/vnic_ib.c   |    4 +++-
>  drivers/infiniband/ulp/vnic/vnic_main.c |    9 +++++----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/vnic/vnic_ib.c
> b/drivers/infiniband/ulp/vnic/vnic_ib.c
> index 6196e20..56ae9f7 100644
> --- a/drivers/infiniband/ulp/vnic/vnic_ib.c
> +++ b/drivers/infiniband/ulp/vnic/vnic_ib.c
> @@ -303,10 +303,12 @@ int vnic_ib_get_path(struct netpath *net
>  			       " path record query\n",
>  			       config->path_info.status);
> 
> -		netpath_timer(netpath, vnic->config->no_path_timeout);
>  		ret = config->path_info.status;
>  	}
>  out:
> +	if (ret)
> +		netpath_timer(netpath, vnic->config->no_path_timeout);
> +
>  	return ret;
>  }
> 
> diff --git a/drivers/infiniband/ulp/vnic/vnic_main.c
> b/drivers/infiniband/ulp/vnic/vnic_main.c
> index fca2b90..e15d3f9 100644
> --- a/drivers/infiniband/ulp/vnic/vnic_main.c
> +++ b/drivers/infiniband/ulp/vnic/vnic_main.c
> @@ -710,17 +710,18 @@ static struct vnic * vnic_handle_npevent
>  	case VNIC_PRINP_TIMEREXPIRED:
>  		netpath = &vnic->primary_path;
>  		netpath->timer_state = NETPATH_TS_EXPIRED;
> -		if (netpath->carrier)
> +		if (!netpath->carrier)
>  			update_path_and_reconnect(netpath, vnic);
>  		break;
>  	case VNIC_SECNP_TIMEREXPIRED:
>  		netpath = &vnic->secondary_path;
>  		netpath->timer_state = NETPATH_TS_EXPIRED;
> -		if (netpath->carrier) {
> +		if (!netpath->carrier)
> +			update_path_and_reconnect(netpath, vnic);
> +		else {
>  			if (vnic->state == VNIC_UNINITIALIZED)
>  				vnic_npevent_register(vnic, netpath);
> -		} else
> -			update_path_and_reconnect(netpath, vnic);
> +		}
>  		break;
>  	case VNIC_PRINP_LINKUP:
>  		vnic->primary_path.carrier = 1;
> 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general





More information about the general mailing list