diff options
author | Priya Krishnan <Priya.Krishnan@Sun.COM> | 2009-07-14 18:57:32 -0400 |
---|---|---|
committer | Priya Krishnan <Priya.Krishnan@Sun.COM> | 2009-07-14 18:57:32 -0400 |
commit | 32c66a4da4528e641a7f3b223c32df190340fe1c (patch) | |
tree | 9f16429cf4d5a4c0fe18be6d8de239927fa50bff /usr/src | |
parent | c39ec06460092d7e823aedf427c9b7fc12d475af (diff) | |
download | illumos-gate-32c66a4da4528e641a7f3b223c32df190340fe1c.tar.gz |
6854268 IDM should not enforce use of iSER if no active ports are found on the IB HCA
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/ib/clients/iser/iser_ib.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/ib/clients/iser/iser_ib.c b/usr/src/uts/common/io/ib/clients/iser/iser_ib.c index 0916da0db2..86a2818beb 100644 --- a/usr/src/uts/common/io/ib/clients/iser/iser_ib.c +++ b/usr/src/uts/common/io/ib/clients/iser/iser_ib.c @@ -187,7 +187,14 @@ iser_ib_register_service(idm_svc_t *idm_svc) /* * 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 @@ iser_ib_bind_service(idm_svc_t *idm_svc) 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 @@ iser_ib_bind_service(idm_svc_t *idm_svc) * in our async handler if the port comes up * at a later time. */ + num_inactive_binds++; continue; } @@ -246,6 +255,14 @@ iser_ib_bind_service(idm_svc_t *idm_svc) 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); |