* [PATCH] ibnetdiscover: fix error when discovery started on node with more that one port
@ 2010-10-04 10:12 Eli Dorfman (Voltaire)
[not found] ` <4CA9A875.4050604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Eli Dorfman (Voltaire) @ 2010-10-04 10:12 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma
When discovery is started on a node with more than one active port
it tries to send mads from second Hca port and fails.
ibnetdiscover should not try and extend_path from Hca except for starting point.
Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
.../libibnetdisc/include/infiniband/ibnetdisc.h | 1 +
infiniband-diags/libibnetdisc/src/ibnetdisc.c | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
index cfd3bbe..fe953e6 100644
--- a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
+++ b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
@@ -149,6 +149,7 @@ typedef struct ibnd_fabric {
* or by default the node you ar running on
*/
ibnd_node_t *from_node;
+ int from_port;
/* NULL term list of all nodes in the fabric */
ibnd_node_t *nodes;
/* NULL terminated list of all chassis found in the fabric */
diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
index f525d71..64e1c60 100644
--- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
+++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
@@ -199,7 +199,7 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t * smp,
if (port_num && mad_get_field(port->info, 0, IB_PORT_PHYS_STATE_F)
== IB_PORT_PHYS_STATE_LINKUP
&& ((node->type == IB_NODE_SWITCH && port_num != local_port) ||
- (node == fabric->from_node && port_num == local_port))) {
+ (node == fabric->from_node && port_num == fabric->from_port))) {
ib_portid_t path = smp->path;
if (extend_dpath(engine, &path, port_num) > 0)
query_node_info(engine, &path, node);
@@ -324,9 +324,10 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,
dump_endnode(&smp->path, node_is_new ? "new" : "known",
node, port);
- if (rem_node == NULL) /* this is the start node */
+ if (rem_node == NULL) { /* this is the start node */
fabric->from_node = node;
- else {
+ fabric->from_port = port_num;
+ } else {
/* link ports... */
int rem_port_num = get_last_port(&smp->path);
--
1.7.2.1
--
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] 2+ messages in thread
* Re: [PATCH] ibnetdiscover: fix error when discovery started on node with more that one port
[not found] ` <4CA9A875.4050604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-10-04 10:57 ` Hal Rosenstock
0 siblings, 0 replies; 2+ messages in thread
From: Hal Rosenstock @ 2010-10-04 10:57 UTC (permalink / raw)
To: Eli Dorfman (Voltaire); +Cc: Sasha Khapyorsky, linux-rdma
Eli,
Isn't this the same as what I submitted back on 8/25 and subsequently
applied (http://www.spinics.net/lists/linux-rdma/msg05590.html) ?
-- Hal
On Mon, Oct 4, 2010 at 6:12 AM, Eli Dorfman (Voltaire)
<dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> When discovery is started on a node with more than one active port
> it tries to send mads from second Hca port and fails.
> ibnetdiscover should not try and extend_path from Hca except for starting point.
>
> Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
> ---
> .../libibnetdisc/include/infiniband/ibnetdisc.h | 1 +
> infiniband-diags/libibnetdisc/src/ibnetdisc.c | 7 ++++---
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
> index cfd3bbe..fe953e6 100644
> --- a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
> +++ b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
> @@ -149,6 +149,7 @@ typedef struct ibnd_fabric {
> * or by default the node you ar running on
> */
> ibnd_node_t *from_node;
> + int from_port;
> /* NULL term list of all nodes in the fabric */
> ibnd_node_t *nodes;
> /* NULL terminated list of all chassis found in the fabric */
> diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> index f525d71..64e1c60 100644
> --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> @@ -199,7 +199,7 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t * smp,
> if (port_num && mad_get_field(port->info, 0, IB_PORT_PHYS_STATE_F)
> == IB_PORT_PHYS_STATE_LINKUP
> && ((node->type == IB_NODE_SWITCH && port_num != local_port) ||
> - (node == fabric->from_node && port_num == local_port))) {
> + (node == fabric->from_node && port_num == fabric->from_port))) {
> ib_portid_t path = smp->path;
> if (extend_dpath(engine, &path, port_num) > 0)
> query_node_info(engine, &path, node);
> @@ -324,9 +324,10 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,
> dump_endnode(&smp->path, node_is_new ? "new" : "known",
> node, port);
>
> - if (rem_node == NULL) /* this is the start node */
> + if (rem_node == NULL) { /* this is the start node */
> fabric->from_node = node;
> - else {
> + fabric->from_port = port_num;
> + } else {
> /* link ports... */
> int rem_port_num = get_last_port(&smp->path);
>
> --
> 1.7.2.1
>
> --
> 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
>
--
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] 2+ messages in thread
end of thread, other threads:[~2010-10-04 10:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 10:12 [PATCH] ibnetdiscover: fix error when discovery started on node with more that one port Eli Dorfman (Voltaire)
[not found] ` <4CA9A875.4050604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-04 10:57 ` Hal Rosenstock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox