Re: [PATCH net-next 2/3] net: stmmac: dwmac-sun8i: emit pause frames when the RX FIFO fills
From: Nicolai Buchwitz
Date: Sun Nov 22 2026 - 10:57:46 EST
On 22.11.2026 15:49, Maxime Chevallier wrote:
The TX flow control mechanism needs multiple things setup to actually
work:
- The TX_FLOW_CTL_EN bit needs to be set in the TC_FLOW_CTL register,
nit: finger off by one :) TC_FLOW_CTL -> TX_FLOW_CTL
this is already done
- The RX fifo thresholds needs to be set, to indicate when the MAC needs
to start sending pause frames based on the RX fifo occupancy, and
when it should stop.
Let's configure the threshold the following way:
- Send pause frames when there's less than 2K left in the RX fifo
- Stop sending them when there's more than 4K left in the RX fifo.
This was tested in Allwinner H2+ using the ethtool -t "flow control"
selftest. On that SoC, the RX fifo is 16K.
Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
[...]
Reviewed-by: Nicolai Buchwitz <nbb@xxxxxxxxxxx>
Thanks,
Nicolai