* [PATCH infiniband-diags v2] ibportstate: Fixed switch peer port probing when using DR routing
@ 2016-10-10 8:50 Knut Omang
[not found] ` <8d3851995d389220a979543740862bd8884cacac.1476089300.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Knut Omang @ 2016-10-10 8:50 UTC (permalink / raw)
To: Ira Weiny
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen, Knut Omang,
Dag Moxnes
From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
ibportstate queries to a remote peer port on a switch using direct
routing would result in timeouts. The reason for this is that the
DR path was not correctly constructed.
Signed-off-by: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Line Holen <line.holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
src/ibportstate.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/ibportstate.c b/src/ibportstate.c
index cb47aa9..7046f47 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -1,6 +1,8 @@
/*
* Copyright (c) 2004-2009 Voltaire Inc. All rights reserved.
* Copyright (c) 2010,2011 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. 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
@@ -655,15 +657,22 @@ int main(int argc, char **argv)
/* Setup portid for peer port */
memcpy(&peerportid, &portid, sizeof(peerportid));
- peerportid.drpath.cnt = 1;
- peerportid.drpath.p[1] = (uint8_t) portnum;
-
- /* Set DrSLID to local lid */
- if (resolve_self(ibd_ca, ibd_ca_port, &selfportid,
- &selfport, 0) < 0)
- IBEXIT("could not resolve self");
- peerportid.drpath.drslid = (uint16_t) selfportid.lid;
- peerportid.drpath.drdlid = 0xffff;
+ if (portid.lid == 0) {
+ peerportid.drpath.cnt++;
+ if (peerportid.drpath.cnt == IB_SUBNET_PATH_HOPS_MAX) {
+ IBEXIT("Too many hops");
+ }
+ } else {
+ peerportid.drpath.cnt = 1;
+
+ /* Set DrSLID to local lid */
+ if (resolve_self(ibd_ca, ibd_ca_port, &selfportid, argv[0],
+ &selfportid, 0) < 0)
+ IBEXIT("could not resolve self");
+ peerportid.drpath.drslid = selfportid.lid;
+ peerportid.drpath.drdlid = 0xffff;
+ }
+ peerportid.drpath.p[peerportid.drpath.cnt] = (uint8_t) portnum;
/* Get peer port NodeInfo to obtain peer port number */
is_peer_switch = get_node_info(&peerportid, data);
base-commit: 2937cf99350a2e423b705e8b8dd10499796a7b41
--
git-series 0.8.10
--
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
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <8d3851995d389220a979543740862bd8884cacac.1476089300.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH infiniband-diags v2] ibportstate: Fixed switch peer port probing when using DR routing [not found] ` <8d3851995d389220a979543740862bd8884cacac.1476089300.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> @ 2016-10-10 14:57 ` Hal Rosenstock [not found] ` <079f879e-9b81-4faa-ab3b-1ea68a5e2799-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Hal Rosenstock @ 2016-10-10 14:57 UTC (permalink / raw) To: Knut Omang, Ira Weiny Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen, Dag Moxnes On 10/10/2016 4:50 AM, Knut Omang wrote: > From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > > ibportstate queries to a remote peer port on a switch using direct > routing would result in timeouts. The reason for this is that the > DR path was not correctly constructed. Should the following be added here to make it clearer: in case where local LID for switch port 0 is not yet configured. ? > > Signed-off-by: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > Reviewed-by: Line Holen <line.holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> Reviewed-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <079f879e-9b81-4faa-ab3b-1ea68a5e2799-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>]
* Re: [PATCH infiniband-diags v2] ibportstate: Fixed switch peer port probing when using DR routing [not found] ` <079f879e-9b81-4faa-ab3b-1ea68a5e2799-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> @ 2016-10-10 20:29 ` Dag Moxnes [not found] ` <57FBFA2A.80003-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Dag Moxnes @ 2016-10-10 20:29 UTC (permalink / raw) To: Hal Rosenstock, Knut Omang, Ira Weiny Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen Den 10.10.2016 16.57, skrev Hal Rosenstock: > On 10/10/2016 4:50 AM, Knut Omang wrote: >> From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> >> >> ibportstate queries to a remote peer port on a switch using direct >> routing would result in timeouts. The reason for this is that the >> DR path was not correctly constructed. > Should the following be added here to make it clearer: > in case where local LID for switch port 0 is not yet configured. > ? I don't think so. The issue will happen every time the user is calling ibportstate with direct routing (-D argument) irrespective of wether the local LID for switch port 0 is configured or not. -Dag > >> Signed-off-by: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> >> Reviewed-by: Line Holen <line.holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> >> Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > Reviewed-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <57FBFA2A.80003-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH infiniband-diags v2] ibportstate: Fixed switch peer port probing when using DR routing [not found] ` <57FBFA2A.80003-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> @ 2016-10-10 22:04 ` Hal Rosenstock 0 siblings, 0 replies; 4+ messages in thread From: Hal Rosenstock @ 2016-10-10 22:04 UTC (permalink / raw) To: Dag Moxnes, Knut Omang, Ira Weiny Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen On 10/10/2016 4:29 PM, Dag Moxnes wrote: > > > Den 10.10.2016 16.57, skrev Hal Rosenstock: >> On 10/10/2016 4:50 AM, Knut Omang wrote: >>> From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> >>> >>> ibportstate queries to a remote peer port on a switch using direct >>> routing would result in timeouts. The reason for this is that the >>> DR path was not correctly constructed. >> Should the following be added here to make it clearer: >> in case where local LID for switch port 0 is not yet configured. >> ? > I don't think so. The issue will happen every time the user is calling > ibportstate > with direct routing (-D argument) irrespective of wether the local LID > for switch > port 0 is configured or not. Oh right; portid.lid is not changed from 0 by ib_resolve_portid_str when DR is used. -- Hal > -Dag -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-10 22:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 8:50 [PATCH infiniband-diags v2] ibportstate: Fixed switch peer port probing when using DR routing Knut Omang
[not found] ` <8d3851995d389220a979543740862bd8884cacac.1476089300.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-10-10 14:57 ` Hal Rosenstock
[not found] ` <079f879e-9b81-4faa-ab3b-1ea68a5e2799-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-10-10 20:29 ` Dag Moxnes
[not found] ` <57FBFA2A.80003-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-10-10 22:04 ` Hal Rosenstock
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.