From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
Date: Thu, 21 Feb 2013 14:01:51 -0500 [thread overview]
Message-ID: <51266F1F.608@dev.mellanox.co.il> (raw)
Signed-off-by: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/umad.c b/src/umad.c
index 8f817d2..8ab5e80 100644
--- a/src/umad.c
+++ b/src/umad.c
@@ -256,6 +256,11 @@ static int resolve_ca_port(char *ca_name, int *port)
ret = -1;
goto Exit;
}
+ if (strcmp(ca.ports[*port]->link_layer, "InfiniBand") &&
+ strcmp(ca.ports[*port]->link_layer, "IB")) {
+ ret = -1;
+ goto Exit;
+ }
if (ca.ports[*port]->state == 4) {
ret = 1;
goto Exit;
@@ -270,6 +275,9 @@ static int resolve_ca_port(char *ca_name, int *port)
DEBUG("checking port %d", i);
if (!ca.ports[i])
continue;
+ if (strcmp(ca.ports[i]->link_layer, "InfiniBand") &&
+ strcmp(ca.ports[i]->link_layer, "IB"))
+ continue;
if (up < 0 && ca.ports[i]->phys_state == 5)
up = *port = i;
if (ca.ports[i]->state == 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
next reply other threads:[~2013-02-21 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 19:01 Hal Rosenstock [this message]
[not found] ` <51266F1F.608-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-02-21 19:44 ` [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports Ira Weiny
[not found] ` <20130221114427.0b82d4054d46a0920dda104e-i2BcT+NCU+M@public.gmane.org>
2013-02-21 19:59 ` Hal Rosenstock
[not found] ` <51267C8D.7030002-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-02-21 20:08 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A823736F35242C-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-02-21 20:38 ` 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=51266F1F.608@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=ilyan-VPRAkNaXOzVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox