Re: Re: [PATCH for-next v2] RDMA/siw: Simplify QP representation.

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

 



-----"Jason Gunthorpe" <jgg@xxxxxxxx> wrote: -----

>To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>
>From: "Jason Gunthorpe" <jgg@xxxxxxxx>
>Date: 01/03/2020 08:55PM
>Cc: linux-rdma@xxxxxxxxxxxxxxx, krishna2@xxxxxxxxxxx, leon@xxxxxxxxxx
>Subject: [EXTERNAL] Re: [PATCH for-next v2] RDMA/siw: Simplify QP
>representation.
>
>On Tue, Dec 10, 2019 at 05:17:29PM +0100, Bernard Metzler wrote:
>> Change siw_qp to contain ib_qp. Use rdma_is_kernel_res()
>> on contained ib_qp to distinguish kernel level from user
>> level applications resources. Apply same mechanism for
>> kernel/user level application detection to completion queues.
>> 
>> Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
>> ---
>> Changelog:
>> v1 -> v2: Use rdma_is_kernel_res() to detect
>>           kernel level application.
>> 
>>  drivers/infiniband/sw/siw/siw.h       | 26 +++---------
>>  drivers/infiniband/sw/siw/siw_cq.c    |  2 +-
>>  drivers/infiniband/sw/siw/siw_main.c  |  2 +-
>>  drivers/infiniband/sw/siw/siw_qp.c    | 13 +++---
>>  drivers/infiniband/sw/siw/siw_qp_rx.c |  6 +--
>>  drivers/infiniband/sw/siw/siw_qp_tx.c |  2 +-
>>  drivers/infiniband/sw/siw/siw_verbs.c | 61
>+++++++++++----------------
>>  7 files changed, 42 insertions(+), 70 deletions(-)
>> 
>> diff --git a/drivers/infiniband/sw/siw/siw.h
>b/drivers/infiniband/sw/siw/siw.h
>> index b939f489cd46..2bf7a7300343 100644
>> --- a/drivers/infiniband/sw/siw/siw.h
>> +++ b/drivers/infiniband/sw/siw/siw.h
>> @@ -7,6 +7,7 @@
>>  #define _SIW_H
>>  
>>  #include <rdma/ib_verbs.h>
>> +#include <rdma/restrack.h>
>>  #include <linux/socket.h>
>>  #include <linux/skbuff.h>
>>  #include <crypto/hash.h>
>> @@ -209,7 +210,6 @@ struct siw_cq {
>>  	u32 cq_put;
>>  	u32 cq_get;
>>  	u32 num_cqe;
>> -	bool kernel_verbs;
>>  	struct rdma_user_mmap_entry *cq_entry; /* mmap info for CQE array
>*/
>>  	u32 id; /* For debugging only */
>>  };
>> @@ -254,8 +254,8 @@ struct siw_srq {
>>  	u32 rq_get;
>>  	u32 num_rqe; /* max # of wqe's allowed */
>>  	struct rdma_user_mmap_entry *srq_entry; /* mmap info for SRQ
>array */
>> -	char armed; /* inform user if limit hit */
>> -	char kernel_verbs; /* '1' if kernel client */
>> +	bool armed; /* inform user if limit hit */
>> +	bool is_kernel_res; /* true if kernel client */
>>  };
>
>I changed these bools into bool bitfields, and applied to for-next
>
>Thanks,
>Jason
>
>
Hi Jason,
thanks a lot!


Bernard.




[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