[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201114153501.66072756@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Sat, 14 Nov 2020 15:35:01 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Thomas Falcon <tlfalcon@...ux.ibm.com>
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 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.
> + 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);
?
> + }
> +
> spin_lock_init(&scrq->lock);
>
Powered by blists - more mailing lists