Re: [PATCH] RDMA/core: use rdma_cap_iw_cm() in rdma_resolve_route()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 18, 2023 at 02:27:00PM +0000, Vitaly Mayatskikh wrote:
> 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@xxxxxxxxxxxxx>
> ---
>  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))

I see that rdma_protocol_iwarp() is used in other places in cma.c too,
Don't they need to be updated too?

Also I see that we have check for protocol RoCE in else before the
changed line, shouldn't all cma.c be changed to rdma_cap_*_cm() calls?

  3376         else if (rdma_protocol_roce(id->device, id->port_num)) {

Thanks

>  		ret = cma_resolve_iw_route(id_priv);
>  	else
>  		ret = -ENOSYS;
> -- 
> 2.34.1
> 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux