return ib_qps;\r
}\r
\r
+enum ib_mig_state to_apm_state(ib_apm_state_t apm)\r
+{\r
+ if (apm == IB_APM_MIGRATED) return IB_MIG_MIGRATED;\r
+ if (apm == IB_APM_REARM) return IB_MIG_REARM;\r
+ if (apm == IB_APM_ARMED) return IB_MIG_ARMED;\r
+ return 0xffffffff;\r
+}\r
+\r
ib_api_status_t\r
to_qp_attr(\r
IN const struct ib_qp *p_ib_qp,\r
// IB_QP_PATH_MIG_STATE\r
if (p_ib_qp_mod->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
*p_qp_attr_mask |= IB_QP_PATH_MIG_STATE; \r
- p_ib_qp_attr->path_mig_state = p_ib_qp_mod->state.rts.apm_state;\r
+ p_ib_qp_attr->path_mig_state = to_apm_state(p_ib_qp_mod->state.rts.apm_state);\r
}\r
\r
// IB_QP_ACCESS_FLAGS\r
status = IB_ERROR;\r
break;\r
}\r
- p_ib_qp_attr->alt_timeout = p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: conv\r
+ p_ib_qp_attr->alt_timeout = p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: conv\r
+ p_ib_qp_attr->alt_port_num = p_ib_qp_mod->state.rts.alternate_av.port_num;\r
}\r
break;\r
\r
// IB_QP_PATH_MIG_STATE\r
if (p_ib_qp_mod->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
*p_qp_attr_mask |= IB_QP_PATH_MIG_STATE; \r
- p_ib_qp_attr->path_mig_state = p_ib_qp_mod->state.rts.apm_state;\r
+ p_ib_qp_attr->path_mig_state = to_apm_state(p_ib_qp_mod->state.rts.apm_state);\r
}\r
\r
// IB_QP_ACCESS_FLAGS\r
status = IB_ERROR;\r
break;\r
}\r
+ p_ib_qp_attr->alt_timeout = p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: conv\r
+ p_ib_qp_attr->alt_port_num = p_ib_qp_mod->state.rts.alternate_av.port_num;\r
}\r
break;\r
\r
return qps;\r
}\r
\r
+enum ib_mig_state to_apm_state(ib_apm_state_t apm)\r
+{\r
+ if (apm == IB_APM_MIGRATED) return IB_MIG_MIGRATED;\r
+ if (apm == IB_APM_REARM) return IB_MIG_REARM;\r
+ if (apm == IB_APM_ARMED) return IB_MIG_ARMED;\r
+ return 0xffffffff;\r
+}\r
+\r
ib_api_status_t\r
mlnx_conv_qp_modify_attr(\r
IN const struct ib_qp *ib_qp_p,\r
// IB_QP_PATH_MIG_STATE\r
if (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
*qp_attr_mask_p |= IB_QP_PATH_MIG_STATE; \r
- qp_attr_p->path_mig_state = modify_attr_p->state.rts.apm_state;\r
+ qp_attr_p->path_mig_state = to_apm_state(modify_attr_p->state.rts.apm_state);\r
}\r
\r
// IB_QP_ACCESS_FLAGS\r
// IB_QP_PATH_MIG_STATE\r
if (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) {\r
*qp_attr_mask_p |= IB_QP_PATH_MIG_STATE; \r
- qp_attr_p->path_mig_state = modify_attr_p->state.rts.apm_state;\r
+ qp_attr_p->path_mig_state = to_apm_state(modify_attr_p->state.rts.apm_state);\r
}\r
\r
// IB_QP_ACCESS_FLAGS\r