All of lore.kernel.org
 help / color / mirror / Atom feed
From: "ira.weiny" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@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: [PATCH infiniband-diags 6/6] ibdiag_common.c: In is_port_info_extended_supported, query PortInfo for port 0 when node is a switch
Date: Mon, 4 Dec 2017 10:40:53 -0500	[thread overview]
Message-ID: <20171204154052.GA23691@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <372d2c64-ce18-4264-267b-294bac8524be-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Tue, Nov 28, 2017 at 05:12:19PM -0500, Hal Rosenstock wrote:
> 
> to be able to obtain CapabilityMask and CapabilityMask2
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>


Rejected.  I already took an earlier version of this patch and I don't see any
difference in this one...

Ira


> ---
>  src/ibdiag_common.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ibdiag_common.c b/src/ibdiag_common.c
> index 9245146..c33cacc 100644
> --- a/src/ibdiag_common.c
> +++ b/src/ibdiag_common.c
> @@ -506,8 +506,18 @@ int is_port_info_extended_supported(ib_portid_t * dest, int port,
>  	uint8_t data[IB_SMP_DATA_SIZE] = { 0 };
>  	uint32_t cap_mask;
>  	uint16_t cap_mask2;
> +	int type, portnum;
>  
> -	if (!smp_query_via(data, dest, IB_ATTR_PORT_INFO, port, 0, srcport))
> +	if (!smp_query_via(data, dest, IB_ATTR_NODE_INFO, 0, 0, srcport))
> +		IBEXIT("node info query failed");
> +
> +	mad_decode_field(data, IB_NODE_TYPE_F, &type);
> +	if (type == IB_NODE_SWITCH)
> +		portnum = 0;
> +	else
> +		portnum = port;
> +
> +	if (!smp_query_via(data, dest, IB_ATTR_PORT_INFO, portnum, 0, srcport))
>  		IBEXIT("port info query failed");
>  
>  	mad_decode_field(data, IB_PORT_CAPMASK_F, &cap_mask);
> -- 
> 2.8.4
> 
--
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:[~2017-12-04 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 22:12 [PATCH infiniband-diags 6/6] ibdiag_common.c: In is_port_info_extended_supported, query PortInfo for port 0 when node is a switch Hal Rosenstock
     [not found] ` <372d2c64-ce18-4264-267b-294bac8524be-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-12-04 15:40   ` ira.weiny [this message]
     [not found]     ` <20171204154052.GA23691-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2017-12-04 16:02       ` Hal Rosenstock

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=20171204154052.GA23691@phlsvsds.ph.intel.com \
    --to=ira.weiny-ral2jqcrhueavxtiumwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.