public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv8 03/11] IB/umad: Enable support only for IB ports
@ 2010-02-18 17:23 Eli Cohen
  2010-05-05 22:11 ` [ewg] " Roland Dreier
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Cohen @ 2010-02-18 17:23 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Linux RDMA list, ewg

Initialize umad context only for Infiniband (as opposed to Ethernet) ports.

Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
 drivers/infiniband/core/user_mad.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 7de0296..e962c5a 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -1138,8 +1138,9 @@ static void ib_umad_add_one(struct ib_device *device)
 	for (i = s; i <= e; ++i) {
 		umad_dev->port[i - s].umad_dev = umad_dev;
 
-		if (ib_umad_init_port(device, i, &umad_dev->port[i - s]))
-			goto err;
+		if (rdma_port_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
+			if (ib_umad_init_port(device, i, &umad_dev->port[i - s]))
+				goto err;
 	}
 
 	ib_set_client_data(device, &umad_client, umad_dev);
@@ -1148,7 +1149,8 @@ static void ib_umad_add_one(struct ib_device *device)
 
 err:
 	while (--i >= s)
-		ib_umad_kill_port(&umad_dev->port[i - s]);
+		if (rdma_port_link_layer(device, i) == IB_LINK_LAYER_INFINIBAND)
+			ib_umad_kill_port(&umad_dev->port[i - s]);
 
 	kref_put(&umad_dev->ref, ib_umad_release_dev);
 }
@@ -1162,7 +1164,8 @@ static void ib_umad_remove_one(struct ib_device *device)
 		return;
 
 	for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i)
-		ib_umad_kill_port(&umad_dev->port[i]);
+		if (rdma_port_link_layer(device, i + 1) == IB_LINK_LAYER_INFINIBAND)
+			ib_umad_kill_port(&umad_dev->port[i]);
 
 	kref_put(&umad_dev->ref, ib_umad_release_dev);
 }
-- 
1.7.0

--
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: [ewg] [PATCHv8 03/11] IB/umad: Enable support only for IB ports
  2010-02-18 17:23 [PATCHv8 03/11] IB/umad: Enable support only for IB ports Eli Cohen
@ 2010-05-05 22:11 ` Roland Dreier
       [not found]   ` <adazl0eatj6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2010-05-05 22:11 UTC (permalink / raw)
  To: Eli Cohen; +Cc: Linux RDMA list, ewg

Why do we not allow umad for IBoE ports?  I understand there's no QP0
but why can't userspace use QP1 just like for IB link layer ports?
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.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] 5+ messages in thread

* Re: [ewg] [PATCHv8 03/11] IB/umad: Enable support only for IB ports
       [not found]   ` <adazl0eatj6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
@ 2010-05-06 10:48     ` Eli Cohen
       [not found]       ` <20100506104848.GA29792-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Cohen @ 2010-05-06 10:48 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Eli Cohen, Linux RDMA list, ewg

On Wed, May 05, 2010 at 03:11:09PM -0700, Roland Dreier wrote:
> Why do we not allow umad for IBoE ports?  I understand there's no QP0
> but why can't userspace use QP1 just like for IB link layer ports?

Currently QP1 is only used by the CM protocol which is implemented in
the kernel.
Since we handle the iboe specific flow in the cma rather than the SA,
there is no need to expose qp1 to userspace.

--
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: [ewg] [PATCHv8 03/11] IB/umad: Enable support only for IB ports
       [not found]       ` <20100506104848.GA29792-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
@ 2010-05-16  5:21         ` Or Gerlitz
       [not found]           ` <4BEF80D9.5060200-smomgflXvOZWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Or Gerlitz @ 2010-05-16  5:21 UTC (permalink / raw)
  To: Eli Cohen; +Cc: Roland Dreier, Eli Cohen, Linux RDMA list

Eli Cohen wrote:
> Roland Dreier wrote:
>   
>> Why do we not allow umad for IBoE ports?  I understand there's no QP0 but why can't userspace use QP1 just like for IB link layer ports?
>>     
> Currently QP1 is only used by the CM protocol which is implemented in the kernel. Since we handle the iboe specific flow in the cma rather than the SA, there is no need to expose qp1 to userspace.
Eli, any reason not to let reading (e.g perfquery) the HCA/port traffic 
counters with  IBoE?

Or.
--
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: [ewg] [PATCHv8 03/11] IB/umad: Enable support only for IB ports
       [not found]           ` <4BEF80D9.5060200-smomgflXvOZWk0Htik3J/w@public.gmane.org>
@ 2010-05-17 13:11             ` Eli Cohen
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Cohen @ 2010-05-17 13:11 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Roland Dreier, Eli Cohen, Linux RDMA list

On Sun, May 16, 2010 at 08:21:29AM +0300, Or Gerlitz wrote:
> Eli, any reason not to let reading (e.g perfquery) the HCA/port
> traffic counters with  IBoE?
> 
RoCE assumes Eth management practices (including performance
management). But this is an interesting idea that we can consider for
the future.
--
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:[~2010-05-17 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 17:23 [PATCHv8 03/11] IB/umad: Enable support only for IB ports Eli Cohen
2010-05-05 22:11 ` [ewg] " Roland Dreier
     [not found]   ` <adazl0eatj6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-06 10:48     ` Eli Cohen
     [not found]       ` <20100506104848.GA29792-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
2010-05-16  5:21         ` Or Gerlitz
     [not found]           ` <4BEF80D9.5060200-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-05-17 13:11             ` Eli Cohen

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