Patch "net: ethernet: mtk_eth_soc: fix remaining throughput regression" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ethernet: mtk_eth_soc: fix remaining throughput regression

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 170d343347c5528f700dec96a59d62a57a2c102f
Author: Felix Fietkau <nbd@xxxxxxxx>
Date:   Fri Mar 31 14:49:59 2023 +0200

    net: ethernet: mtk_eth_soc: fix remaining throughput regression
    
    [ Upstream commit e669ce46740a9815953bb4452a6bc5a7fdc21a50 ]
    
    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@xxxxxxxxxxxxxxx>
    Reported-by: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index bd7c18c839d42..f56d4e7d4ae5d 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -703,6 +703,7 @@ static void mtk_mac_link_up(struct phylink_config *config,
 		 MAC_MCR_FORCE_RX_FC);
 
 	/* Configure speed */
+	mac->speed = speed;
 	switch (speed) {
 	case SPEED_2500:
 	case SPEED_1000:
@@ -3169,6 +3170,9 @@ static int mtk_device_event(struct notifier_block *n, unsigned long event, void
 	if (dp->index >= MTK_QDMA_NUM_QUEUES)
 		return NOTIFY_DONE;
 
+	if (mac->speed > 0 && mac->speed <= s.base.speed)
+		s.base.speed = 0;
+
 	mtk_set_queue_speed(eth, dp->index + 3, s.base.speed);
 
 	return NOTIFY_DONE;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux