public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
To: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCHv3 1/2] libibmad: Support for Mellanox vendor specific ExtendedPortInfo SM class MAD
Date: Wed, 3 Aug 2011 13:14:11 -0700	[thread overview]
Message-ID: <20110803131411.fcbba6cf.weiny2@llnl.gov> (raw)
In-Reply-To: <4E2AAA51.5000902-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Sat, 23 Jul 2011 04:02:41 -0700
Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:

> 
> for FDR10 operation
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

applied, thanks,
Ira

> ---
> Changes since v2:
> Added enum for FDR10
> 
> Changes since v1:
> Rebased
> 
> diff --git a/include/infiniband/mad.h b/include/infiniband/mad.h
> index b1258bd..09c8d4a 100644
> --- a/include/infiniband/mad.h
> +++ b/include/infiniband/mad.h
> @@ -141,7 +141,9 @@ enum SMI_ATTR_ID {
>  	IB_ATTR_VENDORMADSTBL = 0x1d,
>  	IB_ATTR_SMINFO = 0x20,
>  
> -	IB_ATTR_LAST
> +	IB_ATTR_LAST,
> +
> +	IB_ATTR_MLNX_EXT_PORT_INFO = 0xff90,
>  };
>  
>  enum SA_ATTR_ID {
> @@ -1023,6 +1025,15 @@ enum MAD_FIELDS {
>  	IB_PC_VL_XMIT_TIME_CONG14,
>  	IB_PC_VL_XMIT_TIME_CONG_LAST_F,
>  
> +	/*
> +	 * Mellanox ExtendedPortInfo fields
> +	 */
> +	IB_MLNX_EXT_PORT_STATE_CHG_ENABLE_F,
> +	IB_MLNX_EXT_PORT_LINK_SPEED_SUPPORTED_F,
> +	IB_MLNX_EXT_PORT_LINK_SPEED_ENABLED_F,
> +	IB_MLNX_EXT_PORT_LINK_SPEED_ACTIVE_F,
> +	IB_MLNX_EXT_PORT_LAST_F,
> +
>  	IB_FIELD_LAST_		/* must be last */
>  };
>  
> @@ -1119,6 +1130,10 @@ enum MAD_NODE_TYPE {
>  	IB_NODE_MAX = NODE_RNIC
>  };
>  
> +enum MLNX_EXT_PORT_INFO_LINK_SPEEDS {
> +	FDR10 = 1
> +};
> +
>  /******************************************************************************/
>  
>  /* portid.c */
> @@ -1361,7 +1376,8 @@ MAD_EXPORT ib_mad_dump_fn
>      mad_dump_perfcounters_port_vl_xmit_flow_ctl_update_errors, mad_dump_perfcounters_port_vl_xmit_wait_counters,
>      mad_dump_perfcounters_sw_port_vl_congestion, mad_dump_perfcounters_rcv_con_ctrl,
>      mad_dump_perfcounters_sl_rcv_fecn, mad_dump_perfcounters_sl_rcv_becn,
> -    mad_dump_perfcounters_xmit_con_ctrl, mad_dump_perfcounters_vl_xmit_time_cong;
> +    mad_dump_perfcounters_xmit_con_ctrl, mad_dump_perfcounters_vl_xmit_time_cong,
> +    mad_dump_mlnx_ext_port_info;
>  
>  MAD_EXPORT void mad_dump_fields(char *buf, int bufsz, void *val, int valsz,
>  				int start, int end);
> diff --git a/src/dump.c b/src/dump.c
> index 52b2010..29fb742 100644
> --- a/src/dump.c
> +++ b/src/dump.c
> @@ -957,6 +957,12 @@ void mad_dump_perfcounters_vl_xmit_time_cong(char *buf, int bufsz, void *val, in
>  		     IB_PC_VL_XMIT_TIME_CONG_LAST_F);
>  }
>  
> +void mad_dump_mlnx_ext_port_info(char *buf, int bufsz, void *val, int valsz)
> +{
> +	_dump_fields(buf, bufsz, val, IB_MLNX_EXT_PORT_STATE_CHG_ENABLE_F,
> +		     IB_MLNX_EXT_PORT_LAST_F);
> +}
> +
>  void xdump(FILE * file, char *msg, void *p, int size)
>  {
>  #define HEX(x)  ((x) < 10 ? '0' + (x) : 'a' + ((x) -10))
> diff --git a/src/fields.c b/src/fields.c
> index 23947dc..04c60c7 100644
> --- a/src/fields.c
> +++ b/src/fields.c
> @@ -772,6 +772,15 @@ static const ib_field_t ib_mad_f[] = {
>  	{480, 32, "PortVLXmitTimeCong14", mad_dump_uint},
>  	{0, 0},			/* IB_PC_VL_XMIT_TIME_CONG_LAST_F */
>  
> +	/*
> +	 * Mellanox ExtendedPortInfo fields
> +	 */
> +	{BITSOFFS(24, 8), "StateChangeEnable", mad_dump_hex},
> +	{BITSOFFS(56, 8), "LinkSpeedSupported", mad_dump_hex},
> +	{BITSOFFS(88, 8), "LinkSpeedEnabled", mad_dump_hex},
> +	{BITSOFFS(120, 8), "LinkSpeedActive", mad_dump_hex},
> +	{0, 0},			/* IB_MLNX_EXT_PORT_LAST_F */
> +
>  	{0, 0}			/* IB_FIELD_LAST_ */
>  
>  };
> diff --git a/src/libibmad.map b/src/libibmad.map
> index f0b42a5..508c18b 100644
> --- a/src/libibmad.map
> +++ b/src/libibmad.map
> @@ -18,6 +18,7 @@ IBMAD_1.3 {
>  		mad_dump_linkwidth;
>  		mad_dump_linkwidthen;
>  		mad_dump_linkwidthsup;
> +		mad_dump_mlnx_ext_port_info;
>  		mad_dump_mtu;
>  		mad_dump_node_type;
>  		mad_dump_nodedesc;


-- 
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
925-423-8008
weiny2-i2BcT+NCU+M@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2011-08-03 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 11:02 [PATCHv3 1/2] libibmad: Support for Mellanox vendor specific ExtendedPortInfo SM class MAD Hal Rosenstock
     [not found] ` <4E2AAA51.5000902-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-03 20:14   ` Ira Weiny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110803131411.fcbba6cf.weiny2@llnl.gov \
    --to=weiny2-i2bct+ncu+m@public.gmane.org \
    --cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox