Re: [PATCH rdma-next v5 10/12] RDMA/efa: Add EFA verbs implementation

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

 



On 28-Apr-19 14:28, Leon Romanovsky wrote:
> On Mon, Apr 15, 2019 at 03:20:39PM +0300, Gal Pressman wrote:
>> Add a file that implements the EFA verbs.
>>
>> Signed-off-by: Gal Pressman <galpress@xxxxxxxxxx>
>> Reviewed-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
>> Reviewed-by: Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx>
>> ---
>>  drivers/infiniband/hw/efa/efa_verbs.c | 1924 +++++++++++++++++++++++++++++++++
>>  1 file changed, 1924 insertions(+)
>>  create mode 100644 drivers/infiniband/hw/efa/efa_verbs.c
> 
> <...>
> 
>> +int efa_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
>> +{
>> +	struct efa_dev *dev = to_edev(ibqp->pd->device);
>> +	struct efa_qp *qp = to_eqp(ibqp);
>> +	int err;
>> +
>> +	if (!udata) {
>> +		ibdev_dbg(&dev->ibdev, "udata is NULL\n");
>> +		return -EOPNOTSUPP;
>> +	}
>> +
>> +	if (udata->inlen &&
>> +	    !ib_is_udata_cleared(udata, 0, udata->inlen)) {
>> +		ibdev_dbg(&dev->ibdev, "Incompatible ABI params\n");
>> +		return -EINVAL;
>> +	}
> 
> You are checking the conditions above in all destroy functions, it is
> not needed because you won't be called to destroy since EFA doesn't
> support kverbs.

Thanks, the first check can be removed (from create functions as well).
The second one is needed in order to extend the udata in the future.



[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