[openib-general] [PATCH] libibmad - Fix bit field access of RMPP Header
Jan Daley
jdaley at systemfabricworks.com
Tue Apr 25 12:59:35 PDT 2006
The wrong macro is being used to access the RMPP header in libibmad.
Discovered
this issue by using mad_set/get_field on an RMPP header. With this
change,
reading and writing the RMPP header fields is done correctly.
Signed-off-by: Jan Daley <jdaley at systemfabricworks.com>
Index: fields.c
===================================================================
--- fields.c (revision 6631)
+++ fields.c (working copy)
@@ -241,11 +241,11 @@
/*
* SA RMPP
*/
- [IB_SA_RMPP_VERS_F] {BITSOFFS(24*8+24, 8),
"RmppVers", mad_dump_uint},
- [IB_SA_RMPP_TYPE_F] {BITSOFFS(24*8+16, 8),
"RmppType", mad_dump_uint},
- [IB_SA_RMPP_RESP_F] {BITSOFFS(24*8+11, 5),
"RmppResp", mad_dump_uint},
- [IB_SA_RMPP_FLAGS_F] {BITSOFFS(24*8+8, 3),
"RmppFlags", mad_dump_hex},
- [IB_SA_RMPP_STATUS_F] {BITSOFFS(24*8+0, 8),
"RmppStatus", mad_dump_hex},
+ [IB_SA_RMPP_VERS_F] {BE_OFFS(24*8+24, 8),
"RmppVers", mad_dump_uint},
+ [IB_SA_RMPP_TYPE_F] {BE_OFFS(24*8+16, 8),
"RmppType", mad_dump_uint},
+ [IB_SA_RMPP_RESP_F] {BE_OFFS(24*8+11, 5),
"RmppResp", mad_dump_uint},
+ [IB_SA_RMPP_FLAGS_F] {BE_OFFS(24*8+8, 3),
"RmppFlags", mad_dump_hex},
+ [IB_SA_RMPP_STATUS_F] {BE_OFFS(24*8+0, 8),
"RmppStatus", mad_dump_hex},
/* data1 */
[IB_SA_RMPP_D1_F] {28*8, 32, "RmppData1",
mad_dump_hex},
Jan Daley
System Fabric Works
(512) 343-6101 x 14
More information about the general
mailing list