Subject: Re: [PATCH RFC v3 net-next 1/2] devlink: Add shared memory pool eswitch attribute

From: Jakub Kicinski <[email-masked]>
Date: Fri, 8 Mar 2024 20:44:31 -0800

On Thu, 7 Mar 2024 01:12:52 +0200 William Tu wrote:
> When using switchdev mode, the representor ports handles the slow path
> traffic, the traffic that can't be offloaded will be redirected to the
> representor port for processing. Memory consumption of the representor
> port's rx buffer can grow to several GB when scaling to 1k VFs reps.
> For example, in mlx5 driver, each RQ, with a typical 1K descriptors,
> consumes 3MB of DMA memory for packet buffer in WQEs, and with four
> channels, it consumes 4 * 3MB * 1024 = 12GB of memory. And since rep
> ports are for slow path traffic, most of these rx DMA memory are idle.
> 
> Add spool_size configuration, allowing multiple representor ports
> to share a rx memory buffer pool. When enabled, individual representor
> doesn't need to allocate its dedicated rx buffer, but just pointing
> its rq to the memory pool. This could make the memory being better
> utilized. The spool_size represents the number of bytes of the memory
> pool. Users can adjust it based on how many reps, total system
> memory, or performance expectation.

We may need to wordsmith the docs once present but in general, FWIW:
Acked-by: Jakub Kicinski <[email-masked]>