public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Vitaly Mayatskikh <vitaly@enfabrica.net>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>
Cc: linux-rdma@vger.kernel.org, David Ahern <dsahern@kernel.org>,
	Roland Dreier <roland@enfabrica.net>
Subject: Re: [PATCH] RDMA/core: use rdma_cap_iw_cm() in rdma_resolve_route()
Date: Tue, 19 Sep 2023 10:21:36 +0300	[thread overview]
Message-ID: <20230919072136.GB4494@unreal> (raw)
In-Reply-To: <20230918142700.12745-1-vitaly@enfabrica.net>

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

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
> 

  reply	other threads:[~2023-09-19  7:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230919072136.GB4494@unreal \
    --to=leon@kernel.org \
    --cc=dsahern@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=roland@enfabrica.net \
    --cc=shiraz.saleem@intel.com \
    --cc=vitaly@enfabrica.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox