All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3 5/6] RDMA/rxe: Lookup kernel AH from ah index in UD WQEs
Date: Fri, 27 Aug 2021 09:53:23 -0300	[thread overview]
Message-ID: <20210827125323.GA1353944@nvidia.com> (raw)
In-Reply-To: <20210722212244.412157-6-rpearsonhpe@gmail.com>

On Thu, Jul 22, 2021 at 04:22:44PM -0500, Bob Pearson wrote:
> Add code to rxe_get_av in rxe_av.c to use the AH index in UD send WQEs
> to lookup the kernel AH. For old user providers continue to use the AV
> passed in WQEs. Move setting pkt->rxe to before the call to rxe_get_av()
> to get access to the AH pool.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
>  drivers/infiniband/sw/rxe/rxe_av.c  | 20 +++++++++++++++++++-
>  drivers/infiniband/sw/rxe/rxe_req.c |  8 +++++---
>  2 files changed, 24 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
> index 85580ea5eed0..38c7b6fb39d7 100644
> +++ b/drivers/infiniband/sw/rxe/rxe_av.c
> @@ -101,11 +101,29 @@ void rxe_av_fill_ip_info(struct rxe_av *av, struct rdma_ah_attr *attr)
>  
>  struct rxe_av *rxe_get_av(struct rxe_pkt_info *pkt)
>  {
> +	struct rxe_ah *ah;
> +	u32 ah_num;
> +
>  	if (!pkt || !pkt->qp)
>  		return NULL;
>  
>  	if (qp_type(pkt->qp) == IB_QPT_RC || qp_type(pkt->qp) == IB_QPT_UC)
>  		return &pkt->qp->pri_av;
>  
> -	return (pkt->wqe) ? &pkt->wqe->wr.wr.ud.av : NULL;
> +	if (!pkt->wqe)
> +		return NULL;
> +
> +	ah_num = pkt->wqe->wr.wr.ud.ah_num;
> +	if (ah_num) {
> +		/* only new user provider or kernel client */
> +		ah = rxe_pool_get_index(&pkt->rxe->ah_pool, ah_num);

rxe_pool_get_index() incr's a kref, but I don't see any put of that
kref in this code?

Jason

  reply	other threads:[~2021-08-27 12:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 21:22 [PATCH for-next v3 0/5] Replace AV by AH in UD sends Bob Pearson
2021-07-22 21:22 ` [PATCH v3 1/6] RDMA/rxe: Move AV from rxe_send_wqe to rxe_send_wr Bob Pearson
2021-07-22 21:22 ` [PATCH v3 2/6] RDMA/rxe: Change AH objects to indexed Bob Pearson
2021-07-22 21:22 ` [PATCH v3 3/6] RDMA/rxe: Create AH index and return to user space Bob Pearson
2021-08-27 12:51   ` Jason Gunthorpe
2021-07-22 21:22 ` [PATCH v3 4/6] RDMA/rxe: Replace ah->pd by ah->ibah.pd Bob Pearson
2021-07-22 21:22 ` [PATCH v3 5/6] RDMA/rxe: Lookup kernel AH from ah index in UD WQEs Bob Pearson
2021-08-27 12:53   ` Jason Gunthorpe [this message]
2021-07-22 21:22 ` [PATCH v3 6/6] RDMA/rxe: Convert kernel UD post send to use ah_num Bob Pearson

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=20210827125323.GA1353944@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.