All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/3] infiniband-diags: libibnetdisc Allow a DR Path partial fabric query starting at a CA
Date: Wed, 20 Jul 2011 21:17:13 -0600	[thread overview]
Message-ID: <20110721031713.GA19500@obsidianresearch.com> (raw)
In-Reply-To: <20110720165336.894b1298.weiny2-i2BcT+NCU+M@public.gmane.org>

On Wed, Jul 20, 2011 at 04:53:36PM -0700, Ira Weiny wrote:

> > The ibtool version of this switches the starting LID with the
> > connected switch in this case..
> 
> Given a LID (resolved from a PR query of a GUID) for a CA port, how
> do you know the connected switch?  Via sa query?

Yes, there is also a general question when and if various tools should
use SMPs vs use the SA...

> > Note, doing tricks like this with the DR path screws up the
> > localPortNum value, so if you ever read Port/NodeInfo using a path
> > that has been manipulated like this it needs a fixup step.
> 
> Not sure I follow you.  To be clear this patch alters the path like this:
> 
> Given DR path 0,1,3,4, where 0,1,3,4 ends at a CA
> 
> "retract" the path to 0,1,3 and query that node as well as 0,1,3,4.
> Resolve the port linkage and return that "fabric" to the user.

If you issue a NodeRecord SMP to DR path 0,1,3,4 you will get
localPortNum of 1. If you then algorithmically want to construct a
DR path of 0,1,3,4,1 to reach the device connected to the CA port your
algorithm will adjust it to 0,1,3, but a NodeRecord SMP will not
return a localPortNum of 3, which would be expected from the
construction of the original path.

It depends on how your other algorithms are using this feature, but,
eg for a tracing application that wants to print each hop along the
path, messing up the localPortNum during the adjustment is bad news.

> Given a combined route DLID+path the CA is resolved and returned.
> There is, as you say below, no way to resolve (via SMP queries) the
> connected node without scanning the entire fabric and resolving the
> connection.

You trace through the LFT from the local end port to the target CA
DLID and that gives you a path to the switch.
 
> > Also, there is a bug, you can't DLID route to the local HCA and then
> > use that as a source of a DR path, even though intuitively that should
> > work.
> 
> A bug in the code?

In Linux or the HCA I think.

Jason
--
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-07-21  3:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 23:16 [PATCH 2/3] infiniband-diags: libibnetdisc Allow a DR Path partial fabric query starting at a CA Ira Weiny
     [not found] ` <20110720161655.1ed38052.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-07-20 23:34   ` Jason Gunthorpe
     [not found]     ` <20110720233451.GL18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-20 23:53       ` Ira Weiny
     [not found]         ` <20110720165336.894b1298.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-07-21  3:17           ` Jason Gunthorpe [this message]
2011-07-22 13:21       ` Hal Rosenstock
     [not found]         ` <4E297949.2000607-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-07-22 17:29           ` Jason Gunthorpe
     [not found]             ` <20110722172945.GP18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-22 22:00               ` Ira Weiny
     [not found]                 ` <20110722150049.ba8e592f.weiny2-i2BcT+NCU+M@public.gmane.org>
2011-07-22 22:13                   ` Jason Gunthorpe
     [not found]                     ` <20110722221349.GT18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-22 22:26                       ` Ira Weiny
2011-07-22 22: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=20110721031713.GA19500@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@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 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.