Skip to contentSkip to conversation

osmtest/osmt_multicast.c: In some multicast flows, insufficient comps should be a warning

PATCH In review Hal Rosenstock 2 participants 2 messages Apr 4, 2011 – Apr 5, 2011 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 osmtest/osmt_multicast.c: In some multicast flows, insufficient comps should be a warning

rather than error (it's preferred but not required)

---

osmtest/osmt_multicast.c +0 -1
index b4e2a54..52577bc 100644
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2006-2009 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005,2008 Mellanox Technologies LTD. All rights

reserved.
+ * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
* Copyright (c) 2010 HNR Consulting. All rights reserved.
*
@@ -738,13 +738,15 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
sa_mad);
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");

- if (status != IB_REMOTE_ERROR ||
- ((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
- IB_SA_MAD_STATUS_INSUF_COMPS) {
- OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EE: "
- "Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
- ib_get_err_str(status),
+ if (((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
+ IB_SA_MAD_STATUS_INSUF_COMPS)
+ OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+ "Expected IB_SA_MAD_STATUS_INSUF_COMPS got:%s\n",
ib_get_mad_status_str((ib_mad_t *) sa_mad));
+ if (status != IB_REMOTE_ERROR) {
+ OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02EE: "
+ "Expected REMOTE ERROR got:%s\n",
+ ib_get_err_str(status));
status = IB_ERROR;
goto Exit;
}
@@ -769,13 +771,15 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
sa_mad);
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");

- if (status != IB_REMOTE_ERROR ||
- ((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
- IB_SA_MAD_STATUS_INSUF_COMPS) {
- OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02ED: "
- "Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
- ib_get_err_str(status),
+ if (((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
+ IB_SA_MAD_STATUS_INSUF_COMPS)
+ OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+ "Expected IB_SA_MAD_STATUS_INSUF_COMPS got:%s\n",
ib_get_mad_status_str((ib_mad_t *) sa_mad));
+ if (status != IB_REMOTE_ERROR) {
+ OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02ED: "
+ "Expected REMOTE ERROR got:%s\n",
+ ib_get_err_str(status));
status = IB_ERROR;
goto Exit;
}
@@ -1073,6 +1077,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
/* no MGID */
memset(&mc_req_rec.mgid, 0, sizeof(ib_gid_t));
/* Request Join */
+ mc_req_rec.pkey = IB_DEFAULT_PKEY;
ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_FULL_MEMBER);

comp_mask =
@@ -1087,13 +1092,15 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t
* const p_osmt)
sa_mad);
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");

- if (status != IB_REMOTE_ERROR ||
- ((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
- IB_SA_MAD_STATUS_INSUF_COMPS) {
- OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A8: "
- "Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
- ib_get_err_str(status),
+ if (((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
+ IB_SA_MAD_STATUS_INSUF_COMPS)
+ OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+ "Expected IB_SA_MAD_STATUS_INSUF_COMPS got:%s\n",
ib_get_mad_status_str((ib_mad_t *) sa_mad));
+ if (status != IB_REMOTE_ERROR) {
+ OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A8: "
+ "Expected REMOTE ERROR got:%s\n",
+ ib_get_err_str(status));
status = IB_ERROR;
goto Exit;
}
@@ -1165,6 +1172,7 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t * const p_osmt)
/* no MGID */
memset(&mc_req_rec.mgid, 0, sizeof(ib_gid_t));
/* Request Join */
+ mc_req_rec.pkey = IB_DEFAULT_PKEY;
ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_FULL_MEMBER);

comp_mask =
@@ -1180,13 +1188,15 @@ ib_api_status_t osmt_run_mcast_flow(IN osmtest_t
* const p_osmt)
sa_mad);
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, EXPECTING_ERRORS_END "\n");

- if (status != IB_REMOTE_ERROR ||
- ((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
- IB_SA_MAD_STATUS_INSUF_COMPS) {
- OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A6: "
- "Expected REMOTE ERROR IB_SA_MAD_STATUS_INSUF_COMPS got:%s/%s\n",
- ib_get_err_str(status),
+ if (((ib_net16_t) (sa_mad->status & IB_SMP_STATUS_MASK)) !=
+ IB_SA_MAD_STATUS_INSUF_COMPS)
+ OSM_LOG(&p_osmt->log, OSM_LOG_INFO,
+ "Expected IB_SA_MAD_STATUS_INSUF_COMPS got:%s\n",
ib_get_mad_status_str((ib_mad_t *) sa_mad));
+ if (status != IB_REMOTE_ERROR) {
+ OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 02A6: "
+ "Expected REMOTE ERROR got:%s\n",
+ ib_get_err_str(status));
status = IB_ERROR;
goto Exit;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html