[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6c268a1-a186-8fbc-81b2-302611abf8ec@amd.com>
Date: Wed, 11 Dec 2024 09:18:20 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: Edward Cree <ecree.xilinx@...il.com>, alejandro.lucero-palau@....com,
linux-cxl@...r.kernel.org, netdev@...r.kernel.org, dan.j.williams@...el.com,
martin.habets@...inx.com, edward.cree@....com, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v7 23/28] sfc: create cxl region
On 12/11/24 02:26, Edward Cree wrote:
> On 09/12/2024 18:54, alejandro.lucero-palau@....com wrote:
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Use cxl api for creating a region using the endpoint decoder related to
>> a DPA range.
>>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>> Reviewed-by: Martin Habets <habetsm.xilinx@...il.com>
> Acked-by: Edward Cree <ecree.xilinx@...il.com>
>
>> ---
>> drivers/net/ethernet/sfc/efx_cxl.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
>> index 09827bb9e861..9b34795f7853 100644
>> --- a/drivers/net/ethernet/sfc/efx_cxl.c
>> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
>> @@ -128,10 +128,19 @@ int efx_cxl_init(struct efx_probe_data *probe_data)
>> goto err3;
>> }
>>
>> + cxl->efx_region = cxl_create_region(cxl->cxlrd, cxl->cxled);
>> + if (!cxl->efx_region) {
>> + pci_err(pci_dev, "CXL accel create region failed");
>> + rc = PTR_ERR(cxl->efx_region);
>> + goto err_region;
> Little bit weird to have this mixture of numbered and named labels in the
> failure ladder. Ideally I'd prefer the named kind throughout, in which
> case e.g. err3: would become three labels called something like
> err_memdev:, err_freespace:, and err_dpa:, all pointing to the same stmt
> (the cxl_release_resource call).
> But up to you whether you want to bother.
>
I agree it is not ideal. I will try to use better labeling.
Thanks.
>> + }
>> +
>> probe_data->cxl = cxl;
>>
>> return 0;
>>
>> +err_region:
>> + cxl_dpa_free(cxl->cxled);
>> err3:
>> cxl_release_resource(cxl->cxlds, CXL_RES_RAM);
>> err2:
Powered by blists - more mailing lists