net: ethernet: mtk_eth_soc: fix remaining throughput regression
authorFelix Fietkau <nbd@nbd.name>
Fri, 31 Mar 2023 12:49:59 +0000 (14:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Apr 2023 12:34:27 +0000 (13:34 +0100)
commite669ce46740a9815953bb4452a6bc5a7fdc21a50
tree13059a93e8632fc266b6dfffd31e2400be0669f9
parent089b91a0155c4de1209a07ff2a7dd299ff3ece47
net: ethernet: mtk_eth_soc: fix remaining throughput regression

Based on further tests, it seems that the QDMA shaper is not able to
perform shaping close to the MAC link rate without throughput loss.
This cannot be compensated by increasing the shaping rate, so it seems
to be an internal limit.

Fix the remaining throughput regression by detecting that condition and
limiting shaping to ports with lower link speed.

This patch intentionally ignores link speed gain from TRGMII, because
even on such links, shaping to 1000 Mbit/s incurs some throughput
degradation.

Fixes: f63959c7eec3 ("net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues")
Tested-By: Frank Wunderlich <frank-w@public-files.de>
Reported-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c