FAILED: patch "[PATCH] r8169: don't advertise pause in jumbo mode" failed to apply to 5.10-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 453a77894efa4d9b6ef9644d74b9419c47ac427c Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <[email protected]>
Date: Wed, 14 Apr 2021 10:47:10 +0200
Subject: [PATCH] r8169: don't advertise pause in jumbo mode
It has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617
drivers/net/ethernet/realtek/r8169_main.c +7 -2
@@ -2350,6 +2350,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)if (pci_is_pcie (tp->pci_dev) && tp->supports_gmii)pcie_set_readrq (tp->pci_dev, readrq); + +/* Chip doesn't support pause in jumbo mode */ +linkmode_mod_bit (ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); +linkmode_mod_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); +phy_start_aneg (tp->phydev); }DECLARE_RTL_COND (rtl_chipcmd_cond)
@@ -4630,8 +4637,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)if (!tp->supports_gmii)phy_set_max_speed (phydev,SPEED_100 ); -phy_support_asym_pause (phydev); -phy_attached_info (phydev);return 0 ;
Quoted 60 lines · On 18.04.2021 12:36, [email protected] wrote:
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
453a77894efa4d9b6ef9644d74b9419c47ac427cMon Sep 17 00:00:00 2001From: Heiner Kallweit <[email protected]>
Date: Wed, 14 Apr 2021 10:47:10 +0200
Subject: [PATCH] r8169: don't advertise pause in jumbo modeIt has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617
Fixes 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")Reported-by Roman Mamedov <[email protected]>Tested-by Roman Mamedov <[email protected]>Signed-off-by Heiner Kallweit <[email protected]>Signed-off-by David S. Miller <[email protected]>drivers/net/ethernet/realtek/r8169_main.c +7
-2@@ -2350,6 +2350,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)if (pci_is_pcie (tp->pci_dev) && tp->supports_gmii)pcie_set_readrq (tp->pci_dev, readrq); + +/* Chip doesn't support pause in jumbo mode */ +linkmode_mod_bit (ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); +linkmode_mod_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); +phy_start_aneg (tp->phydev); }DECLARE_RTL_COND (rtl_chipcmd_cond)@@ -4630,8 +4637,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)if (!tp->supports_gmii)phy_set_max_speed (phydev,SPEED_100 ); -phy_support_asym_pause (phydev); -phy_attached_info (phydev);return 0 ;
Quoted 1 line
From
ed6aaf67921a7ed44a3e07785c2125835ca5a969Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <[email protected]>
Date: Sun, 18 Apr 2021 17:50:06 +0200
Subject: [PATCH] r8169: don't advertise pause in jumbo mode
It has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617
--- drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +7 -2
@@ -2419,6 +2419,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)if (!jumbo &&pci_is_pcie (tp->pci_dev) && tp->supports_gmii)pcie_set_readrq (tp->pci_dev,4096 ); + +/* Chip doesn't support pause in jumbo mode */ +linkmode_mod_bit (ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); +linkmode_mod_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); +phy_start_aneg (tp->phydev); }DECLARE_RTL_COND (rtl_chipcmd_cond)
@@ -4710,8 +4717,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)if (!tp->supports_gmii)phy_set_max_speed (phydev,SPEED_100 ); -phy_support_asym_pause (phydev); -phy_attached_info (phydev);return 0 ;
Signature · 1 line
2.31.1
Quoted 101 lines · Heiner Kallweit
Quoted 60 lines · On 18.04.2021 12:36, [email protected] wrote:
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
453a77894efa4d9b6ef9644d74b9419c47ac427cMon Sep 17 00:00:00 2001From: Heiner Kallweit <[email protected]>
Date: Wed, 14 Apr 2021 10:47:10 +0200
Subject: [PATCH] r8169: don't advertise pause in jumbo modeIt has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617
Fixes 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")Reported-by Roman Mamedov <[email protected]>Tested-by Roman Mamedov <[email protected]>Signed-off-by Heiner Kallweit <[email protected]>Signed-off-by David S. Miller <[email protected]>drivers/net/ethernet/realtek/r8169_main.c +7
-2@@ -2350,6 +2350,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)if (pci_is_pcie (tp->pci_dev) && tp->supports_gmii)pcie_set_readrq (tp->pci_dev, readrq); + +/* Chip doesn't support pause in jumbo mode */ +linkmode_mod_bit (ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); +linkmode_mod_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); +phy_start_aneg (tp->phydev); }DECLARE_RTL_COND (rtl_chipcmd_cond)@@ -4630,8 +4637,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)if (!tp->supports_gmii)phy_set_max_speed (phydev,SPEED_100 ); -phy_support_asym_pause (phydev); -phy_attached_info (phydev);return 0 ;Quoted 1 line
From
ed6aaf67921a7ed44a3e07785c2125835ca5a969Mon Sep 17 00:00:00 2001From: Heiner Kallweit <[email protected]>
Date: Sun, 18 Apr 2021 17:50:06 +0200
Subject: [PATCH] r8169: don't advertise pause in jumbo modeIt has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue.
[0] https://bugzilla.kernel.org/show_bug.cgi?id=212617
Fixes 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")Reported-by Roman Mamedov <[email protected]>Tested-by Roman Mamedov <[email protected]>Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/net/ethernet/realtek/r8169_main.c +7
-0@@ -2419,6 +2419,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)if (!jumbo &&pci_is_pcie (tp->pci_dev) && tp->supports_gmii)pcie_set_readrq (tp->pci_dev,4096 ); + +/* Chip doesn't support pause in jumbo mode */ +linkmode_mod_bit (ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); +linkmode_mod_bit (ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); +phy_start_aneg (tp->phydev); }DECLARE_RTL_COND (rtl_chipcmd_cond)
drivers/net/ethernet/realtek/r8169_main.c static int r8169_phy_connect(struct rtl8169_private *tp) · line 4722
Quoted 8 lines
drivers/net/ethernet/realtek/r8169_main.c +0
-2@@ -4710,8 +4717,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp)if (!tp->supports_gmii)phy_set_max_speed (phydev,SPEED_100 ); -phy_support_asym_pause (phydev); -phy_attached_info (phydev);return 0 ;
I've *just* been looking into this as well (new machine with an r8169 onboard..sigh) and found that simply applying 5e00e16cb989 ("r8169: tweak max read request size for newer chips also in jumbo mtu mode") makes it apply cleanly. Said patch also seems (to me) make sense by itself, so maybe just pick that instead?
thanks,
Holger