From: eeb Date: Thu, 9 Jun 2005 17:53:11 +0000 (+0000) Subject: * vibnal 6361 fix: change QP creation tunables & HCA name X-Git-Tag: 1.4.10~1026 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e130fdefffd0fbf4766bad97841b1f848908891e;p=fs%2Flustre-release.git * vibnal 6361 fix: change QP creation tunables & HCA name * vibnal 6436 fix: don't LBUG when QP creation fails --- diff --git a/lnet/klnds/viblnd/viblnd.c b/lnet/klnds/viblnd/viblnd.c index 7995610e..e36ee53 100644 --- a/lnet/klnds/viblnd/viblnd.c +++ b/lnet/klnds/viblnd/viblnd.c @@ -998,7 +998,7 @@ kibnal_create_conn (cm_cep_handle_t cep) } /* Mark QP created */ - conn->ibc_state = IBNAL_CONN_INIT; + conn->ibc_state = IBNAL_CONN_INIT_QP; conn->ibc_connvars->cv_local_qpn = rspattr.create_return.qp_num; if (rspattr.create_return.receive_max_outstand_wr < @@ -1013,6 +1013,9 @@ kibnal_create_conn (cm_cep_handle_t cep) goto failed; } + /* Mark init complete */ + conn->ibc_state = IBNAL_CONN_INIT; + /* 1 ref for caller */ atomic_set (&conn->ibc_refcount, 1); return (conn); @@ -1050,6 +1053,11 @@ kibnal_destroy_conn (kib_conn_t *conn) /* fall through */ case IBNAL_CONN_INIT: + vvrc = cm_destroy_cep(conn->ibc_cep); + LASSERT (vvrc == vv_return_ok); + /* fall through */ + + case IBNAL_CONN_INIT_QP: kibnal_set_qp_state(conn, vv_qp_state_reset); vvrc = vv_qp_destroy(kibnal_data.kib_hca, conn->ibc_qp); if (vvrc != vv_return_ok) @@ -1073,9 +1081,6 @@ kibnal_destroy_conn (kib_conn_t *conn) if (conn->ibc_peer != NULL) kibnal_peer_decref(conn->ibc_peer); - vvrc = cm_destroy_cep(conn->ibc_cep); - LASSERT (vvrc == vv_return_ok); - PORTAL_FREE(conn, sizeof (*conn)); atomic_dec(&kibnal_data.kib_nconns); @@ -1706,7 +1711,7 @@ kibnal_api_startup (nal_t *nal, ptl_pid_t requested_pid, } /* TODO: apparently only one adapter is supported */ - vvrc = vv_hca_open("ANY_HCA", NULL, &kibnal_data.kib_hca); + vvrc = vv_hca_open("InfiniHost0", NULL, &kibnal_data.kib_hca); if (vvrc != vv_return_ok) { CERROR ("Can't open CA: %d\n", vvrc); goto failed; diff --git a/lnet/klnds/viblnd/viblnd.h b/lnet/klnds/viblnd/viblnd.h index e3720b6..c887209 100644 --- a/lnet/klnds/viblnd/viblnd.h +++ b/lnet/klnds/viblnd/viblnd.h @@ -101,7 +101,7 @@ #define IBNAL_LOCAL_SUB 1 #define IBNAL_TRAFFIC_CLASS 0 #define IBNAL_SOURCE_PATH_BIT 0 -#define IBNAL_OUS_DST_RD 32 +#define IBNAL_OUS_DST_RD 1 #define IBNAL_IB_MTU vv_mtu_1024 /* sdp-hca-params.h */ @@ -379,16 +379,17 @@ typedef struct kib_conn } kib_conn_t; #define IBNAL_CONN_INIT_NOTHING 0 /* incomplete init */ -#define IBNAL_CONN_INIT 1 /* completed init */ -#define IBNAL_CONN_ACTIVE_ARP 2 /* active arping */ -#define IBNAL_CONN_ACTIVE_CONNECT 3 /* active sending req */ -#define IBNAL_CONN_ACTIVE_CHECK_REPLY 4 /* active checking reply */ -#define IBNAL_CONN_ACTIVE_RTU 5 /* active sending rtu */ -#define IBNAL_CONN_PASSIVE_WAIT 6 /* passive waiting for rtu */ -#define IBNAL_CONN_ESTABLISHED 7 /* connection established */ -#define IBNAL_CONN_DISCONNECT1 8 /* disconnect phase 1 */ -#define IBNAL_CONN_DISCONNECT2 9 /* disconnect phase 2 */ -#define IBNAL_CONN_DISCONNECTED 10 /* disconnect complete */ +#define IBNAL_CONN_INIT_QP 1 /* QP allocated */ +#define IBNAL_CONN_INIT 2 /* completed init */ +#define IBNAL_CONN_ACTIVE_ARP 3 /* active arping */ +#define IBNAL_CONN_ACTIVE_CONNECT 4 /* active sending req */ +#define IBNAL_CONN_ACTIVE_CHECK_REPLY 5 /* active checking reply */ +#define IBNAL_CONN_ACTIVE_RTU 6 /* active sending rtu */ +#define IBNAL_CONN_PASSIVE_WAIT 7 /* passive waiting for rtu */ +#define IBNAL_CONN_ESTABLISHED 8 /* connection established */ +#define IBNAL_CONN_DISCONNECT1 9 /* disconnect phase 1 */ +#define IBNAL_CONN_DISCONNECT2 10 /* disconnect phase 2 */ +#define IBNAL_CONN_DISCONNECTED 11 /* disconnect complete */ typedef struct kib_peer {