netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] r8169: don't advertise pause in jumbo mode
@ 2021-04-14  7:40 Heiner Kallweit
  2021-04-14  7:49 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2021-04-14  7:40 UTC (permalink / raw)
  To: Jakub Kicinski, David Miller, Realtek linux nic maintainers
  Cc: netdev, stable, Roman Mamedov

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

Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
Reported-by: Roman Mamedov <rm+bko@romanrm.net>
Tested-by: Roman Mamedov <rm+bko@romanrm.net>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
This patch doesn't apply cleanly on some kernel versions, but the needed
changes are trivial.
---
 drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 1b48084f2..7d02bab1c 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2386,6 +2386,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)
@@ -4647,8 +4654,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;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] r8169: don't advertise pause in jumbo mode
  2021-04-14  7:40 [PATCH net] r8169: don't advertise pause in jumbo mode Heiner Kallweit
@ 2021-04-14  7:49 ` Greg KH
  2021-04-14  7:56   ` Heiner Kallweit
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-04-14  7:49 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Jakub Kicinski, David Miller, Realtek linux nic maintainers,
	netdev, stable, Roman Mamedov

On Wed, Apr 14, 2021 at 09:40:51AM +0200, Heiner Kallweit wrote:
> 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
> 
> Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
> Reported-by: Roman Mamedov <rm+bko@romanrm.net>
> Tested-by: Roman Mamedov <rm+bko@romanrm.net>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> This patch doesn't apply cleanly on some kernel versions, but the needed
> changes are trivial.
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] r8169: don't advertise pause in jumbo mode
  2021-04-14  7:49 ` Greg KH
@ 2021-04-14  7:56   ` Heiner Kallweit
  2021-04-14  8:18     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2021-04-14  7:56 UTC (permalink / raw)
  To: Greg KH, Jakub Kicinski, David Miller
  Cc: Realtek linux nic maintainers, netdev, stable, Roman Mamedov

On 14.04.2021 09:49, Greg KH wrote:
> On Wed, Apr 14, 2021 at 09:40:51AM +0200, Heiner Kallweit wrote:
>> 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
>>
>> Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
>> Reported-by: Roman Mamedov <rm+bko@romanrm.net>
>> Tested-by: Roman Mamedov <rm+bko@romanrm.net>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>> This patch doesn't apply cleanly on some kernel versions, but the needed
>> changes are trivial.
>> ---
>>  drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> 
> <formletter>
> 
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>     https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
> 
> </formletter>
> 
Until recently the procedure in netdev has been to annotate the patch as
"net" and not cc stable. IIRC there is an experiment to cc stable.
If this isn't applicable any longer and the old process still applies,
then please ignore the cc'ed stable.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] r8169: don't advertise pause in jumbo mode
  2021-04-14  7:56   ` Heiner Kallweit
@ 2021-04-14  8:18     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-04-14  8:18 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Jakub Kicinski, David Miller, Realtek linux nic maintainers,
	netdev, stable, Roman Mamedov

On Wed, Apr 14, 2021 at 09:56:30AM +0200, Heiner Kallweit wrote:
> On 14.04.2021 09:49, Greg KH wrote:
> > On Wed, Apr 14, 2021 at 09:40:51AM +0200, Heiner Kallweit wrote:
> >> 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
> >>
> >> Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause")
> >> Reported-by: Roman Mamedov <rm+bko@romanrm.net>
> >> Tested-by: Roman Mamedov <rm+bko@romanrm.net>
> >> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> >> ---
> >> This patch doesn't apply cleanly on some kernel versions, but the needed
> >> changes are trivial.
> >> ---
> >>  drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++--
> >>  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > 
> > <formletter>
> > 
> > This is not the correct way to submit patches for inclusion in the
> > stable kernel tree.  Please read:
> >     https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> > for how to do this properly.
> > 
> > </formletter>
> > 
> Until recently the procedure in netdev has been to annotate the patch as
> "net" and not cc stable. IIRC there is an experiment to cc stable.
> If this isn't applicable any longer and the old process still applies,
> then please ignore the cc'ed stable.

You need to put the "Cc: stable..." in the signed-off-by area, as the
documentation link above states.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-14  8:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  7:40 [PATCH net] r8169: don't advertise pause in jumbo mode Heiner Kallweit
2021-04-14  7:49 ` Greg KH
2021-04-14  7:56   ` Heiner Kallweit
2021-04-14  8:18     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).