All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Saleem, Shiraz" <shiraz.saleem@intel.com>
To: "yanjun.zhu@linux.dev" <yanjun.zhu@linux.dev>,
	"Ismail, Mustafa" <mustafa.ismail@intel.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"leonro@nvidia.com" <leonro@nvidia.com>
Subject: RE: [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary copy
Date: Fri, 29 Oct 2021 19:53:26 +0000	[thread overview]
Message-ID: <731072121b4245d2beefd07ce1cb757f@intel.com> (raw)
In-Reply-To: <20211029162340.241768-1-yanjun.zhu@linux.dev>

> Subject: [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary
> copy
> 
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> In the function irdma_post_recv, the function irdma_copy_sg_list is not needed
> since the struct irdma_sge and ib_sge have the similar member variables. The
> struct irdma_sge can be replaced with the struct ib_sge totally.
> 
> This can increase the rx performance of irdma.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
>  drivers/infiniband/hw/irdma/uk.c    | 38 +++++++++++++-------------
>  drivers/infiniband/hw/irdma/user.h  | 23 ++++++----------
> drivers/infiniband/hw/irdma/verbs.c | 41 +++++++++--------------------
>  3 files changed, 39 insertions(+), 63 deletions(-)

Thanks much for the patch! Minor comment...

[....]

> a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
> index 02ca1f80968e..7ab9645d6f18 100644
> --- a/drivers/infiniband/hw/irdma/verbs.c
> +++ b/drivers/infiniband/hw/irdma/verbs.c
> @@ -3039,24 +3039,6 @@ static int irdma_dereg_mr(struct ib_mr *ib_mr, struct
> ib_udata *udata)
>  	return 0;
>  }
> 
> -/**
> - * irdma_copy_sg_list - copy sg list for qp
> - * @sg_list: copied into sg_list
> - * @sgl: copy from sgl
> - * @num_sges: count of sg entries
> - */
> -static void irdma_copy_sg_list(struct irdma_sge *sg_list, struct ib_sge *sgl,
> -			       int num_sges)
> -{
> -	unsigned int i;
> -
> -	for (i = 0; (i < num_sges) && (i < IRDMA_MAX_WQ_FRAGMENT_COUNT);
> i++) {
> -		sg_list[i].tag_off = sgl[i].addr;
> -		sg_list[i].len = sgl[i].length;
> -		sg_list[i].stag = sgl[i].lkey;
> -	}
> -}
> -
>  /**
>   * irdma_post_send -  kernel application wr
>   * @ibqp: qp ptr for wr
> @@ -3133,7 +3115,7 @@ static int irdma_post_send(struct ib_qp *ibqp,
>  				ret = irdma_uk_inline_send(ukqp, &info, false);
>  			} else {
>  				info.op.send.num_sges = ib_wr->num_sge;
> -				info.op.send.sg_list = (struct irdma_sge *)
> +				info.op.send.sg_list = (struct ib_sge *)
>  						       ib_wr->sg_list;

Don't think we need the typecast.

Shiraz 

  reply	other threads:[~2021-10-29 19:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 16:23 [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary copy yanjun.zhu
2021-10-29 19:53 ` Saleem, Shiraz [this message]
2021-10-30  2:55   ` yanjun.zhu

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=731072121b4245d2beefd07ce1cb757f@intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=yanjun.zhu@linux.dev \
    /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.