[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5b5ac624-6abd-406b-ae8a-bb6a361aee75@broadcom.com>
Date: Wed, 28 Feb 2024 09:53:46 -0800
From: Justin Chen <justin.chen@...adcom.com>
To: Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, florian.fainelli@...adcom.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org, opendmb@...il.com,
bcm-kernel-feedback-list@...adcom.com, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, rafal@...ecki.pl, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 5/6] net: bcmasp: Keep buffers through power
management
On 2/28/24 1:45 AM, Simon Horman wrote:
> On Tue, Feb 27, 2024 at 10:54:53AM -0800, Justin Chen wrote:
>> There is no advantage of freeing and re-allocating buffers through
>> suspend and resume. This waste cycles and makes suspend/resume time
>> longer. We also open ourselves to failed allocations in systems with
>> heavy memory fragmentation.
>>
>> Signed-off-by: Justin Chen <justin.chen@...adcom.com>
>> Acked-by: Florian Fainelli <florian.fainelli@...adcom.com>
>
> ...
>
>> @@ -1118,6 +1083,10 @@ static int bcmasp_open(struct net_device *dev)
>>
>> netif_dbg(intf, ifup, dev, "bcmasp open\n");
>>
>> + ret = bcmasp_alloc_buffers(intf);
>> + if (ret)
>> + return ret;
>> +
>
> Hi Justin,
>
> Do the resources allocated by bcmasp_alloc_buffers() need
> to be released if an error occurs in bcmasp_open() below this line?
>
Yes good catch. Will send v3.
Thanks,
Justin
>> ret = clk_prepare_enable(intf->parent->clk);
>> if (ret)
>> return ret;
>> --
>> 2.34.1
>>
>
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4206 bytes)
Powered by blists - more mailing lists