Re: [PATCH for-next 1/2] RDMA/erdma: Introduce dma pool for hardware responses of CMDQ requests

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

 




On 12/20/23 6:12 PM, Leon Romanovsky wrote:
> On Wed, Dec 20, 2023 at 04:54:23PM +0800, Cheng Xu wrote:
>> Hardware response, such as the result of query statistics, may be too
>> long to be directly accommodated within the CQE structure. To address
>> this, we introduce a DMA pool to hold the hardware's responses of CMDQ
>> requests.
>>
>> Signed-off-by: Cheng Xu <chengyou@xxxxxxxxxxxxxxxxx>
>> ---
>>  drivers/infiniband/hw/erdma/erdma.h      |  2 ++
>>  drivers/infiniband/hw/erdma/erdma_main.c | 38 ++++++++++++++++++++++--
>>  2 files changed, 38 insertions(+), 2 deletions(-)
>>

<...>

>> +static int erdma_dma_pools_init(struct erdma_dev *dev)
>> +{
>> +	dev->resp_pool = dma_pool_create("erdma_resp_pool", &dev->pdev->dev,
>> +					 ERDMA_HW_RESP_SIZE, ERDMA_HW_RESP_SIZE,
>> +					 0);
>> +	if (!dev->resp_pool)
>> +		return -ENOMEM;
>> +
>> +	return 0;
>> +}
>> +
>> +static void erdma_dma_pools_destroy(struct erdma_dev *dev)
>> +{
>> +	dma_pool_destroy(dev->resp_pool);
>> +}
> 
> Please don't add extra layer of functions which will be called in same
> file anyway. Call directly to dma_pool_destroy(), same goes for dma_pool_create().

Get it.

Will fix in v2.

Thanks,
Cheng Xu

 
> Thanks




[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