libibmad: Add support for PortInfo CapabilityMask2
PATCH 1/1 libibmad: Add support for PortInfo CapabilityMask2
---
include/infiniband/mad.h +1 -0
@@ -772,6 +772,7 @@ enum MAD_FIELDS {/* * More PortInfo fields */ +IB_PORT_CAPMASK2_F ,IB_PORT_LINK_SPEED_EXT_ACTIVE_F ,IB_PORT_LINK_SPEED_EXT_SUPPORTED_F , IB_PORT_LINK_SPEED_EXT_ENABLED_F,
src/dump.c +3 -2
@@ -561,6 +563,8 @@ void mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz) "\t\t\t\tIsPkeySwitchExternalPortTrapSupported\n");if (mask & (1 <<14 )) s +=sprintf (s,"\t\t\t\tIsExtendedSpeedsSupported\n" ); +if (mask & (1 <<15 )) + s +=sprintf (s,"\t\t\t\tIsCapabilityMask2Supported\n" );if (mask & (1 <<16 )) s +=sprintf (s,"\t\t\t\tIsCommunicatonManagementSupported\n" );if (mask & (1 <<17 ))
@@ -762,8 +766,7 @@ void mad_dump_portinfo(char *buf, int bufsz, void *val, int valsz) cnt =_dump_fields (buf, bufsz, val,IB_PORT_FIRST_F ,IB_PORT_LAST_F );_dump_fields (buf + cnt, bufsz - cnt, val, -IB_PORT_LINK_SPEED_EXT_ACTIVE_F , -IB_PORT_LINK_SPEED_EXT_LAST_F ); +IB_PORT_CAPMASK2_F ,IB_PORT_LINK_SPEED_EXT_LAST_F ); }void mad_dump_portstates (char *buf,int bufsz,void *val,int valsz)
src/fields.c +2 -1
@@ -1,7 +1,7 @@/* * Copyright (c) 2004-2009 Voltaire Inc. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. -* Copyright (c) 2009-2010 Mellanox Technologies LTD. All rights reserved. +* Copyright (c) 2009-2011 Mellanox Technologies LTD. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU
@@ -529,6 +529,7 @@ static const ib_field_t ib_mad_f[] = {/* * More PortInfo fields */ + {BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex}, {BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext}, {BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup}, {BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
--
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
Ira Weiny
AppliedQuoted 2 lines · On Mon, 15 Aug 2011 13:39:14 -0700 Hal Rosenstock…
Thanks applied,
Ira
Quoted 57 lines
---
include/infiniband/mad.h +1
-0@@ -772,6 +772,7 @@ enum MAD_FIELDS {/* * More PortInfo fields */ +IB_PORT_CAPMASK2_F ,IB_PORT_LINK_SPEED_EXT_ACTIVE_F ,IB_PORT_LINK_SPEED_EXT_SUPPORTED_F , IB_PORT_LINK_SPEED_EXT_ENABLED_F,src/dump.c +3
-2@@ -561,6 +563,8 @@ void mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz) "\t\t\t\tIsPkeySwitchExternalPortTrapSupported\n");if (mask & (1 <<14 )) s +=sprintf (s,"\t\t\t\tIsExtendedSpeedsSupported\n" ); +if (mask & (1 <<15 )) + s +=sprintf (s,"\t\t\t\tIsCapabilityMask2Supported\n" );if (mask & (1 <<16 )) s +=sprintf (s,"\t\t\t\tIsCommunicatonManagementSupported\n" );if (mask & (1 <<17 ))@@ -762,8 +766,7 @@ void mad_dump_portinfo(char *buf, int bufsz, void *val, int valsz) cnt =_dump_fields (buf, bufsz, val,IB_PORT_FIRST_F ,IB_PORT_LAST_F );_dump_fields (buf + cnt, bufsz - cnt, val, -IB_PORT_LINK_SPEED_EXT_ACTIVE_F , -IB_PORT_LINK_SPEED_EXT_LAST_F ); +IB_PORT_CAPMASK2_F ,IB_PORT_LINK_SPEED_EXT_LAST_F ); }void mad_dump_portstates (char *buf,int bufsz,void *val,int valsz)src/fields.c +2
-1@@ -1,7 +1,7 @@/* * Copyright (c) 2004-2009 Voltaire Inc. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. -* Copyright (c) 2009-2010 Mellanox Technologies LTD. All rights reserved. +* Copyright (c) 2009-2011 Mellanox Technologies LTD. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -529,6 +529,7 @@ static const ib_field_t ib_mad_f[] = {/* * More PortInfo fields */ + {BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex}, {BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext}, {BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup}, {BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
Signature · 9 lines
Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 [email protected] -- 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