Re: [PATCH net-next] net: ibm: emac: size RX buffers for the MTU

From: Daniel Machon

Date: Tue Oct 13 2026 - 06:29:30 EST


> Any MTU above ETH_DATA_LEN selects the largest MAL buffer size of 4080
> bytes. A DSA conduit always runs with a slightly larger MTU for the
> switch tag (1502 for qca8k), so every received frame then uses an 8K
> slab object and a 4K cache invalidate even though it is at most 1520
> bytes long. Size the buffers for the MTU instead, capped at the MAL
> maximum as before. Larger jumbo frames still span several descriptors.
>
> emac_change_mtu() only resized the ring, which is also where the jumbo
> mode and the APM821xx maximum jumbo size are programmed, when the RX skb
> size changed. 1500 and 1502 now share a skb size, so also resize the
> ring whenever the old or new MTU is a jumbo one. Otherwise jumbo mode
> stays off and 1502 byte frames are dropped when the MTU is raised while
> the interface is up.
>
> Routing a single TCP stream through the qca8k switch of a Meraki MX60
> (APM82181, iperf3 median of 3, A/B in the same boot):
>
> LAN->WAN WAN->LAN (Mbit/s)
> before 538 476
> after 564 498
>

Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>