* [PATCH] IB/CMA: Fix condition to search for InfiniBand route
@ 2015-06-08 13:32 Moni Shoua
[not found] ` <1433770345-17354-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Moni Shoua @ 2015-06-08 13:32 UTC (permalink / raw)
To: Doug Ledford, Ira Weiny, Michael Wang
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
The flag RDMA_CORE_CAP_IB_SA is set when link layer is InfiniBand but
also when link layer is Ethernet. Therefore, link layer is not implied by
this flag.
---
drivers/infiniband/core/cma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 3b943b7..f96d6fd 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1993,7 +1993,7 @@ int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms)
return -EINVAL;
atomic_inc(&id_priv->refcount);
- if (rdma_cap_ib_sa(id->device, id->port_num))
+ if (rdma_protocol_ib(id->device, id->port_num))
ret = cma_resolve_ib_route(id_priv, timeout_ms);
else if (rdma_protocol_roce(id->device, id->port_num))
ret = cma_resolve_iboe_route(id_priv);
--
1.7.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] 3+ messages in thread
* Re: [PATCH] IB/CMA: Fix condition to search for InfiniBand route
[not found] ` <1433770345-17354-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2015-06-08 15:44 ` ira.weiny
2015-06-08 16:48 ` Hefty, Sean
1 sibling, 0 replies; 3+ messages in thread
From: ira.weiny @ 2015-06-08 15:44 UTC (permalink / raw)
To: Moni Shoua; +Cc: Doug Ledford, Michael Wang, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Mon, Jun 08, 2015 at 04:32:25PM +0300, Moni Shoua wrote:
> The flag RDMA_CORE_CAP_IB_SA is set when link layer is InfiniBand but
> also when link layer is Ethernet.
Why? Ethernet does not have an SA nor need one.
>
> Therefore, link layer is not implied by
> this flag.
Of course not. This flag is explicitly saying this port needs to use the IB
SA to resolve the route information.
cma_resolve_ib_route finds the route information by issuing an SA query.
Therefore it should only be called on ports which require an SA.
Was this change inspired by a bug being found? If so it seems the underlying
device needs to be fixed to not set the RDMA_CORE_CAP_IB_SA flag when the link
layer is ethernet.
Ira
>
> ---
> drivers/infiniband/core/cma.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 3b943b7..f96d6fd 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -1993,7 +1993,7 @@ int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms)
> return -EINVAL;
>
> atomic_inc(&id_priv->refcount);
> - if (rdma_cap_ib_sa(id->device, id->port_num))
> + if (rdma_protocol_ib(id->device, id->port_num))
> ret = cma_resolve_ib_route(id_priv, timeout_ms);
> else if (rdma_protocol_roce(id->device, id->port_num))
> ret = cma_resolve_iboe_route(id_priv);
> --
> 1.7.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 [flat|nested] 3+ messages in thread
* RE: [PATCH] IB/CMA: Fix condition to search for InfiniBand route
[not found] ` <1433770345-17354-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-08 15:44 ` ira.weiny
@ 2015-06-08 16:48 ` Hefty, Sean
1 sibling, 0 replies; 3+ messages in thread
From: Hefty, Sean @ 2015-06-08 16:48 UTC (permalink / raw)
To: Moni Shoua, Doug Ledford, Weiny, Ira, Michael Wang
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> The flag RDMA_CORE_CAP_IB_SA is set when link layer is InfiniBand but
> also when link layer is Ethernet. Therefore, link layer is not implied by
This flag should NOT be set for Ethernet. What is setting this?
> this flag.
>
> ---
> drivers/infiniband/core/cma.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 3b943b7..f96d6fd 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -1993,7 +1993,7 @@ int rdma_resolve_route(struct rdma_cm_id *id, int
> timeout_ms)
> return -EINVAL;
>
> atomic_inc(&id_priv->refcount);
> - if (rdma_cap_ib_sa(id->device, id->port_num))
> + if (rdma_protocol_ib(id->device, id->port_num))
This change looks wrong. The check here has nothing to do with the link layer. It is stating that route resolution must be done using an SA.
--
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] 3+ messages in thread
end of thread, other threads:[~2015-06-08 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 13:32 [PATCH] IB/CMA: Fix condition to search for InfiniBand route Moni Shoua
[not found] ` <1433770345-17354-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-08 15:44 ` ira.weiny
2015-06-08 16:48 ` Hefty, Sean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox