Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
@ 2013-02-21 19:01 Hal Rosenstock
       [not found] ` <51266F1F.608-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Hal Rosenstock @ 2013-02-21 19:01 UTC (permalink / raw)
  To: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
  Cc: Ilya Nelkenbaum


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
       [not found] ` <51266F1F.608-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2013-02-21 19:44   ` Ira Weiny
       [not found]     ` <20130221114427.0b82d4054d46a0920dda104e-i2BcT+NCU+M@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Ira Weiny @ 2013-02-21 19:44 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Ilya Nelkenbaum

What about QP1?  It was my understanding that CM was still required for RoCE.

Ira

On Thu, 21 Feb 2013 14:01:51 -0500
Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:

> 
> 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


-- 
Ira Weiny
Member of Technical Staff
Lawrence Livermore National Lab
925-423-8008
weiny2-i2BcT+NCU+M@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] 5+ messages in thread

* Re: [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
       [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>
  0 siblings, 1 reply; 5+ messages in thread
From: Hal Rosenstock @ 2013-02-21 19:59 UTC (permalink / raw)
  To: Ira Weiny
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Ilya Nelkenbaum

On 2/21/2013 2:44 PM, Ira Weiny wrote:
> What about QP1?  It was my understanding that CM was still required for RoCE.

Yes, RoCE requires CM support but AFAIK CM doesn't use/require these
interfaces to get send or receive it's MADs.

RoCE is a weird animal in terms of IB management as SM/QP0 is not
used/deprecated and QP1 is only required for CM with most other QP1
things beyond the spec with the exception of SA which is also not
used/deprecated.

-- Hal

> 
> Ira
>
--
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] 5+ messages in thread

* RE: [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
       [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>
  0 siblings, 1 reply; 5+ messages in thread
From: Hefty, Sean @ 2013-02-21 20:08 UTC (permalink / raw)
  To: Hal Rosenstock, Ira Weiny
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Ilya Nelkenbaum

> On 2/21/2013 2:44 PM, Ira Weiny wrote:
> > What about QP1?  It was my understanding that CM was still required for RoCE.
> 
> Yes, RoCE requires CM support but AFAIK CM doesn't use/require these
> interfaces to get send or receive it's MADs.
> 
> RoCE is a weird animal in terms of IB management as SM/QP0 is not
> used/deprecated and QP1 is only required for CM with most other QP1
> things beyond the spec with the exception of SA which is also not
> used/deprecated.

Does the kernel expose QP1 for RoCE to user space?
--
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] 5+ messages in thread

* Re: [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports
       [not found]             ` <1828884A29C6694DAF28B7E6B8A823736F35242C-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2013-02-21 20:38               ` Hal Rosenstock
  0 siblings, 0 replies; 5+ messages in thread
From: Hal Rosenstock @ 2013-02-21 20:38 UTC (permalink / raw)
  To: Hefty, Sean
  Cc: Ira Weiny,
	linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Ilya Nelkenbaum

On 2/21/2013 3:08 PM, Hefty, Sean wrote:
>> On 2/21/2013 2:44 PM, Ira Weiny wrote:
>>> What about QP1?  It was my understanding that CM was still required for RoCE.
>>
>> Yes, RoCE requires CM support but AFAIK CM doesn't use/require these
>> interfaces to get send or receive it's MADs.
>>
>> RoCE is a weird animal in terms of IB management as SM/QP0 is not
>> used/deprecated and QP1 is only required for CM with most other QP1
>> things beyond the spec with the exception of SA which is also not
>> used/deprecated.
> 
> Does the kernel expose QP1 for RoCE to user space?

kernel MAD does not create QP0 for ethernet link layer ports but it does
create QP1. There's no link layer specific code in kernel user MAD so I
presume that QP1 is exposed to user space.
--
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] 5+ messages in thread

end of thread, other threads:[~2013-02-21 20:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 19:01 [PATCH] libibumad/umad.c: In resolve_ca_port, skip ethernet link layer ports Hal Rosenstock
     [not found] ` <51266F1F.608-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-02-21 19:44   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox