public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH] opensm: perfmgr, only set orig_lid when we have a valid port.  Otherwise leave it as 0
Date: Sun, 17 Apr 2011 11:21:09 -0400	[thread overview]
Message-ID: <4DAB0565.8020505@dev.mellanox.co.il> (raw)
In-Reply-To: <20110415151736.809c550b.weiny2-i2BcT+NCU+M@public.gmane.org>

On 4/15/2011 6:17 PM, Ira Weiny wrote:
> 
> Subject: [PATCH] opensm: perfmgr, only set orig_lid when we have a valid port.  Otherwise leave it as 0
> 
> 
> Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
> ---
>  opensm/osm_perfmgr.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/opensm/osm_perfmgr.c b/opensm/osm_perfmgr.c
> index 6a1fa63..3e1575a 100644
> --- a/opensm/osm_perfmgr.c
> +++ b/opensm/osm_perfmgr.c
> @@ -454,7 +454,9 @@ static void collect_guids(cl_map_item_t * p_map_item, void *context)
>  				  ib_switch_info_is_enhanced_port0(&node->sw->
>  								   switch_info));
>  		for (port = mon_node->esp0 ? 0 : 1; port < num_ports; port++) {
> -			mon_node->port[port].orig_lid = get_base_lid(node, port);
> +			mon_node->port[port].orig_lid = 0;
> +			if (osm_physp_is_valid(&node->physp_table[port]))
> +				mon_node->port[port].orig_lid = get_base_lid(node, port);
>  			mon_node->port[port].valid = TRUE;
>  		}
>  

There are several other calls to get_base_lid. Is it also an issue there
too or is port always valid there ? If it's not always valid for those
cases, why not just move this check into get_base_lid ?
--
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-04-17 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 22:17 [PATCH] opensm: perfmgr, only set orig_lid when we have a valid port. Otherwise leave it as 0 Ira Weiny
     [not found] ` <20110415151736.809c550b.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-04-17 15:06   ` Alex Netes
     [not found]     ` <20110417150614.GA31503-iQai9MGU/dyyaiaB+Ve85laTQe2KTcn/@public.gmane.org>
2011-04-18  5:32       ` Weiny, Ira K.
2011-04-17 15:21   ` Hal Rosenstock [this message]
     [not found]     ` <4DAB0565.8020505-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-04-18  1:26       ` Weiny, Ira K.
     [not found]         ` <53790366-BE39-4A3D-8144-EA1DE3F0197A-i2BcT+NCU+M@public.gmane.org>
2011-04-18 12:42           ` Hal Rosenstock
     [not found]             ` <4DAC31D0.3050004-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-04-18 17:05               ` Ira Weiny

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=4DAB0565.8020505@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@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