Re: [PATCH net-next v27 07/13] rtase: Implement a function to receive packets
From: Jakub Kicinski
Date: Thu Aug 15 2024 - 21:55:03 EST
On Mon, 12 Aug 2024 14:35:33 +0800 Justin Lai wrote:
> + if (!delta && workdone)
> + netdev_info(dev, "no Rx buffer allocated\n");
> +
> + ring->dirty_idx += delta;
> +
> + if ((ring->dirty_idx + RTASE_NUM_DESC) == ring->cur_idx)
> + netdev_emerg(dev, "Rx buffers exhausted\n");
Memory allocation failures happen, we shouldn't risk spamming the logs.
I mean these two messages and the one in rtase_alloc_rx_data_buf(),
the should be removed.
There is a alloc_fail statistic defined in include/net/netdev_queues.h
that's the correct way to report buffer allocation failures.
And you should have a periodic service task / work which checks for
buffers being exhausted, and if they are schedule NAPI so that it tries
to allocate.