public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/core: use rdma_cap_iw_cm() in rdma_resolve_route()
@ 2023-09-18 14:27 Vitaly Mayatskikh
  2023-09-19  7:21 ` Leon Romanovsky
  0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Mayatskikh @ 2023-09-18 14:27 UTC (permalink / raw)
  To: linux-rdma; +Cc: David Ahern, Roland Dreier

rdma_resolve_route checks for the full rdma_protocol_iwarp support
before calling cma_resolve_iw_route, while in fact rdma_cap_iw_cm is
sufficient. This makes it possible to use IW CM for device
implementing IW Connection Management only, but not the whole iWarp.

Signed-off-by: Vitaly Mayatskikh <vitaly@enfabrica.net>
---
 drivers/infiniband/core/cma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index c343edf2f664..356da8e625aa 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3378,7 +3378,7 @@ int rdma_resolve_route(struct rdma_cm_id *id, unsigned long timeout_ms)
 		if (!ret)
 			cma_add_id_to_tree(id_priv);
 	}
-	else if (rdma_protocol_iwarp(id->device, id->port_num))
+	else if (rdma_cap_iw_cm(id->device, id->port_num))
 		ret = cma_resolve_iw_route(id_priv);
 	else
 		ret = -ENOSYS;
-- 
2.34.1


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

end of thread, other threads:[~2023-09-20 16:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 14:27 [PATCH] RDMA/core: use rdma_cap_iw_cm() in rdma_resolve_route() Vitaly Mayatskikh
2023-09-19  7:21 ` Leon Romanovsky
     [not found]   ` <CAF0Wxh=YhKCLbOLZ+-b+_rmzRoWQtqoBGn6Bo9X3zR308Vm1zA@mail.gmail.com>
2023-09-19 20:08     ` Vitaly Mayatskikh
2023-09-20  5:44       ` Leon Romanovsky
2023-09-20 12:55         ` Jason Gunthorpe
2023-09-20 13:07           ` Vitaly Mayatskikh
2023-09-20 13:10             ` Jason Gunthorpe
2023-09-20 13:53               ` Vitaly Mayatskikh
2023-09-20 13:55                 ` Jason Gunthorpe
2023-09-20 14:24                   ` Vitaly Mayatskikh
2023-09-20 16:02                     ` Jason Gunthorpe

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