[PATCH v3 0/3] introduce maximum Rx buffer size

Stephen Hemminger stephen at networkplumber.org
Sun Oct 29 16:48:38 CET 2023


On Sat, 28 Oct 2023 09:48:44 +0800
Huisong Li <lihuisong at huawei.com> wrote:

> The "min_rx_bufsize" in struct rte_eth_dev_info stands for the minimum
> Rx buffer size supported by hardware. Actually, some engines also have
> the maximum Rx buffer specification, like, hns3.
> 
> If mbuf data room size in mempool is greater then the maximum Rx buffer
> size supported by HW, the data size application used in each mbuf is just
> as much as the maximum Rx buffer size supported by HW instead of the whole
> data room size.
> 
> So introduce maximum Rx buffer size which is not enforced just to report
> user to avoid memory waste.

I am not convinced this is really necessary.
Your device will use up to 4K of buffer size, not sure why an application
would want to use much larger than that because it would be wasting
a lot of buffer space (most packets are smaller) anyway.

The only case where it might be useful is if application is using jumbo
frames (9K) and the application was not able to handle multi segment packets.
Not handling multi segment packets in SW is just programmer laziness.


More information about the dev mailing list