Re: [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary copy

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

 



October 30, 2021 3:53 AM, "Saleem, Shiraz" <shiraz.saleem@xxxxxxxxx> wrote:

>> Subject: [PATCH 1/1] RDMA/irdma: optimize rx path by removing unnecessary
>> copy
>> 
>> From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
>> 
>> 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@xxxxxxxxx>
>> ---
>> 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




[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