Re: [PATCH v3 for-next 2/4] RDMA/hns: Init SRQ table for hip08

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

 



在 2018/11/30 8:06, Jason Gunthorpe 写道:
> On Sat, Nov 24, 2018 at 04:49:20PM +0800, Lijun Ou wrote:
>
>> diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c
>> new file mode 100644
>> index 0000000..d8a8613
>> +++ b/drivers/infiniband/hw/hns/hns_roce_srq.c
>> @@ -0,0 +1,26 @@
>> +// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
>> +/*
>> + * Copyright (c) 2018 Hisilicon Limited.
>> + */
>> +
>> +#include <rdma/ib_umem.h>
>> +#include <rdma/hns-abi.h>
>> +#include "hns_roce_device.h"
>> +#include "hns_roce_cmd.h"
>> +#include "hns_roce_hem.h"
>> +
>> +int hns_roce_init_srq_table(struct hns_roce_dev *hr_dev)
>> +{
>> +	struct hns_roce_srq_table *srq_table = &hr_dev->srq_table;
>> +
>> +	xa_init(&srq_table->xa);
> Is a call to xa_destroy missing?
>
> Jason
Hi, Jason
    It uses xarray instead radix tree. the orign code as follows:
     spin_lock_int(&srq_table->lock);
     INIT_RADIX_TREE(&srq_table->tree, GFP_ATOMIC);

   So, we should use xa_init instead of it.  I think that it  should not use xa_destroy.

thanks
Lijun Ou
>





[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