Re: [PATCH for-next 7/8] RDMA/hns: Add UD support for HIP09

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

 



On 2020/11/13 2:35, Jason Gunthorpe wrote:
> On Fri, Oct 30, 2020 at 07:39:34PM +0800, Weihang Li wrote:
>> HIP09 supports service type of Unreliable Datagram, add necessary process
>> to enable this feature.
>>
>> Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx>
>>  drivers/infiniband/hw/hns/hns_roce_device.h | 2 ++
>>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c  | 8 +++++---
>>  drivers/infiniband/hw/hns/hns_roce_qp.c     | 3 ++-
>>  3 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
>> index 9a032d0..23f8fe7 100644
>> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h
>> @@ -222,7 +222,9 @@ enum {
>>  	HNS_ROCE_CAP_FLAG_FRMR                  = BIT(8),
>>  	HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL		= BIT(9),
>>  	HNS_ROCE_CAP_FLAG_ATOMIC		= BIT(10),
>> +	HNS_ROCE_CAP_FLAG_UD			= BIT(11),
> 
> Why add this flag if nothing reads it?

Hi Jason,

I checked it to set IB_USER_VERBS_CMD_CREATE_AH and IB_USER_VERBS_CMD_DESTROY_AH
in uverbs_cmd_mask which is not needed recently, I forgot to remove it in this
patch :) Will drop it.

> 
>>  	HNS_ROCE_CAP_FLAG_SDI_MODE		= BIT(14),
>> +
>>  };
> 
> Extra space

OK, will remove it.

> 
> 
> If I recall properly earlier chips did not have a GID table so could
> not support UD because they could not secure the AH, or something like
> that.
> 
> So, I would expect to see that only the new devices support UD, but
> I can't quite see that in this patch??

You are right. I made a mistake, I thought it's enough to add judgment of hardware
version in rdma-core to prevent the HIP08's user from using UD in userspace and I
realize it's meaningless just now...

I think I can add a check about the hardware version when creating a user's UD QP.

Thanks again for the reminder.

Weihang

> 
> Jason
> 




[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