[ofa-general] [PATCH] osmtest: fix qpn encoding in osmtest_informinfo_request()

Sasha Khapyorsky sashak at voltaire.com
Thu Aug 7 10:44:06 PDT 2008


In osmtest_informinfo_request() function qpn was wrongly encoded when
used as part of InformInfo. For this reason osmtest didn't work on a big
endian machines.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/osmtest/osmtest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opensm/osmtest/osmtest.c b/opensm/osmtest/osmtest.c
index b173e49..5545c8f 100644
--- a/opensm/osmtest/osmtest.c
+++ b/opensm/osmtest/osmtest.c
@@ -4733,7 +4733,7 @@ osmtest_informinfo_request(IN osmtest_t * const p_osmt,
 		rec.subscribe = (uint8_t) p_inform_info_opt->subscribe;
 		if (p_inform_info_opt->qpn) {
 			rec.g_or_v.generic.qpn_resp_time_val =
-			    cl_hton32(p_inform_info_opt->qpn) >> 8;
+			    cl_hton32(p_inform_info_opt->qpn << 8);
 			user.comp_mask |= IB_IIR_COMPMASK_QPN;
 		}
 		if (p_inform_info_opt->trap) {
-- 
1.5.4.rc2.60.gb2e62




More information about the general mailing list