From: yanjun.zhu@linux.dev
To: "Saleem, Shiraz" <shiraz.saleem@intel.com>,
"Ismail, Mustafa" <mustafa.ismail@intel.com>,
dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
leonro@nvidia.com
Subject: Re: [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary copy
Date: Sat, 30 Oct 2021 02:55:18 +0000 [thread overview]
Message-ID: <2b15fa90db74b2c4d200e058de3d9710@linux.dev> (raw)
In-Reply-To: <731072121b4245d2beefd07ce1cb757f@intel.com>
October 30, 2021 3:53 AM, "Saleem, Shiraz" <shiraz.saleem@intel.com> wrote:
>> 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.
Got it. Thanks. A new patch is sent for review.
In the new patch, the unnecessary typecast is removed.
Zhu Yanjun
>
> Shiraz
prev parent reply other threads:[~2021-10-30 2:55 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
2021-10-30 2:55 ` yanjun.zhu [this message]
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=2b15fa90db74b2c4d200e058de3d9710@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mustafa.ismail@intel.com \
--cc=shiraz.saleem@intel.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.