Re: [PATCH 1/4] net/skbuff: don't waste memory reserves

From: Eric Dumazet
Date: Fri Apr 19 2019 - 14:16:08 EST


On Fri, Apr 19, 2019 at 9:24 AM Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> wrote:
>
>
> But why that failed allocation is such a problem?
>
> 1. sk_memalloc_socks() false
> 2. NIC driver tries to allocate pages and fails

The NIC then is unable to receive any frames.

We need to be able to populate the RX ring buffer, before NIC can
actually be started.

Basically you are saying : We need to allocate memory only _after_
frame has been received by the NIC.
I am saying : We need to allocate memory so that the NIC can put a
future frame in it.