Subject: Re: [EXT] Aquantia ethernet driver suspend/resume issues

From: Jakub Kicinski <[email-masked]>
Date: Mon, 27 Nov 2023 14:59:45 -0800

On Mon, 27 Nov 2023 18:29:19 +0100 Igor Russkikh wrote:
> > Anyway, I suspect a fix for the fatal error might be something like
> > the attached, but I think the *root* of the problem is how the
> > aquantia driver tried to allocate a humongous buff_ring with kmalloc,
> > which really doesn't work.  You can see that "order:6", ie we're
> > talking an allocation > 100kB, and in low-memory situations that kind
> > of kmalloc space simply isn't available. It *will* fail.  
> 
> Correct.
> It seems after some series of pm-related changes the driver logic was changed to always
> reinit full sw structures during suspend/resume, which is obviously an overkill.

Another option you can consider is lowering the default ring size.
If I'm looking right you default to 4k descriptors for Tx.
Is it based on real life experience?

Longer term hopefully the queue management API will help drivers
avoid freeing memory at suspend. We'll be able to disarm and
unconfigure queues without freeing the memory.