[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5a1cf31-eab3-817b-917f-ee975681bac3@linux.ibm.com>
Date: Mon, 16 Nov 2020 12:18:41 -0600
From: Thomas Falcon <tlfalcon@...ux.ibm.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
dnbanerg@...ibm.com, brking@...ux.vnet.ibm.com, pradeep@...ibm.com,
drt@...ux.vnet.ibm.com, sukadev@...ux.vnet.ibm.com,
ljp@...ux.vnet.ibm.com, cforno12@...ux.ibm.com,
ricklind@...ux.ibm.com
Subject: Re: [PATCH net-next 02/12] ibmvnic: Introduce indirect subordinate
Command Response Queue buffer
On 11/14/20 5:35 PM, Jakub Kicinski wrote:
> On Thu, 12 Nov 2020 13:09:57 -0600 Thomas Falcon wrote:
>> This patch introduces the infrastructure to send batched subordinate
>> Command Response Queue descriptors, which are used by the ibmvnic
>> driver to send TX frame and RX buffer descriptors.
>>
>> Signed-off-by: Thomas Falcon <tlfalcon@...ux.ibm.com>
>> @@ -2957,6 +2963,19 @@ static struct ibmvnic_sub_crq_queue *init_sub_crq_queue(struct ibmvnic_adapter
>>
>> scrq->adapter = adapter;
>> scrq->size = 4 * PAGE_SIZE / sizeof(*scrq->msgs);
>> + scrq->ind_buf.index = 0;
>> +
>> + scrq->ind_buf.indir_arr =
>> + dma_alloc_coherent(dev,
>> + IBMVNIC_IND_ARR_SZ,
>> + &scrq->ind_buf.indir_dma,
>> + GFP_KERNEL);
>> +
>> + if (!scrq->ind_buf.indir_arr) {
>> + dev_err(dev, "Couldn't allocate indirect scrq buffer\n");
> This warning/error is not necessary, memory allocation will trigger an
> OOM message already.
Thanks, I can fix that in a v2.
>
>> + goto reg_failed;
> Don't you have to do something like
>
> rc = plpar_hcall_norets(H_FREE_SUB_CRQ,
> adapter->vdev->unit_address,
> scrq->crq_num);
>
> ?
Yes, you're right, I will include that in a v2 also.
>> + }
>> +
>> spin_lock_init(&scrq->lock);
>>
Powered by blists - more mailing lists