Mercurial > illumos > illumos-gate
changeset 10084:783f82a0c357
6854268 IDM should not enforce use of iSER if no active ports are found on the IB HCA
author | Priya Krishnan <Priya.Krishnan@Sun.COM> |
---|---|
date | Tue, 14 Jul 2009 18:57:32 -0400 |
parents | 9b5dc36de6db |
children | 8d106fa92e56 |
files | usr/src/uts/common/io/ib/clients/iser/iser_ib.c |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/ib/clients/iser/iser_ib.c Tue Jul 14 14:58:36 2009 -0700 +++ b/usr/src/uts/common/io/ib/clients/iser/iser_ib.c Tue Jul 14 18:57:32 2009 -0400 @@ -187,7 +187,14 @@ /* * iser_ib_bind_service * - * This function binds a given iSER service on all available HCA ports + * This function binds a given iSER service on all available HCA ports. The + * current specification does not allow user to specify transport bindings + * for each iscsi target. The ULP invokes this function to bind the target + * to all available iser ports after checking for the presence of an IB HCA. + * iSER is "configured" whenever an IB-capable IP address exists. The lack + * of active IB ports is a less-fatal condition, and sockets would be used + * as the transport even though an Infiniband HCA is configured but unusable. + * */ int iser_ib_bind_service(idm_svc_t *idm_svc) @@ -196,6 +203,7 @@ ib_gid_t gid; int num_ports = 0; int num_binds = 0; + int num_inactive_binds = 0; /* if HCA ports inactive */ int status; int i; @@ -218,6 +226,7 @@ * in our async handler if the port comes up * at a later time. */ + num_inactive_binds++; continue; } @@ -246,6 +255,14 @@ ISER_LOG(CE_NOTE, "iser_ib_bind_service: Service available on " "(%d) of (%d) ports", num_binds, num_ports); return (ISER_STATUS_SUCCESS); + } else if (num_inactive_binds) { + ISER_LOG(CE_NOTE, "iser_ib_bind_service: Could not bind " + "service, HCA ports are not active."); + /* + * still considered success, the async handler will bind + * the service when the port comes up at a later time + */ + return (ISER_STATUS_SUCCESS); } else { ISER_LOG(CE_NOTE, "iser_ib_bind_service: Did not bind service"); return (ISER_STATUS_FAIL);