linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000e: Disable TSO for buffer overrun workaround
@ 2020-05-07 14:21 Kai-Heng Feng
  2020-05-21  7:18 ` Brown, Aaron F
  0 siblings, 1 reply; 2+ messages in thread
From: Kai-Heng Feng @ 2020-05-07 14:21 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: Kai-Heng Feng, David S. Miller, Sasha Neftin, Dima Ruinskiy,
	Raanan Avargil, moderated list:INTEL ETHERNET DRIVERS,
	open list:NETWORKING DRIVERS, open list

Commit b10effb92e27 ("e1000e: fix buffer overrun while the I219 is
processing DMA transactions") imposes roughly 30% performance penalty.

The commit log states that "Disabling TSO eliminates performance loss
for TCP traffic without a noticeable impact on CPU performance", so
let's disable TSO by default to regain the loss.

Fixes: b10effb92e27 ("e1000e: fix buffer overrun while the I219 is processing DMA transactions")
BugLink: https://bugs.launchpad.net/bugs/1802691
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 177c6da80c57..9b5509149578 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5294,6 +5294,10 @@ static void e1000_watchdog_task(struct work_struct *work)
 					/* oops */
 					break;
 				}
+				if (hw->mac.type == e1000_pch_spt) {
+					netdev->features &= ~NETIF_F_TSO;
+					netdev->features &= ~NETIF_F_TSO6;
+				}
 			}
 
 			/* enable transmits in the hardware, need to do this
-- 
2.17.1


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

* RE: [PATCH] e1000e: Disable TSO for buffer overrun workaround
  2020-05-07 14:21 [PATCH] e1000e: Disable TSO for buffer overrun workaround Kai-Heng Feng
@ 2020-05-21  7:18 ` Brown, Aaron F
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2020-05-21  7:18 UTC (permalink / raw)
  To: Kai-Heng Feng, Kirsher, Jeffrey T
  Cc: David S. Miller, Neftin, Sasha, Dima Ruinskiy, Avargil, Raanan,
	moderated list:INTEL ETHERNET DRIVERS,
	open list:NETWORKING DRIVERS, open list

> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org> On
> Behalf Of Kai-Heng Feng
> Sent: Thursday, May 7, 2020 7:21 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>; David S. Miller
> <davem@davemloft.net>; Neftin, Sasha <sasha.neftin@intel.com>; Dima
> Ruinskiy <dima.ruinskiy@intel.com>; Avargil, Raanan
> <raanan.avargil@intel.com>; moderated list:INTEL ETHERNET DRIVERS <intel-
> wired-lan@lists.osuosl.org>; open list:NETWORKING DRIVERS
> <netdev@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
> Subject: [PATCH] e1000e: Disable TSO for buffer overrun workaround
> 
> Commit b10effb92e27 ("e1000e: fix buffer overrun while the I219 is
> processing DMA transactions") imposes roughly 30% performance penalty.
> 
> The commit log states that "Disabling TSO eliminates performance loss
> for TCP traffic without a noticeable impact on CPU performance", so
> let's disable TSO by default to regain the loss.
> 
> Fixes: b10effb92e27 ("e1000e: fix buffer overrun while the I219 is processing
> DMA transactions")
> BugLink: https://bugs.launchpad.net/bugs/1802691
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
Tested-by: Aaron Brown <aaron.f.brown@intel.com>


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

end of thread, other threads:[~2020-05-21  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 14:21 [PATCH] e1000e: Disable TSO for buffer overrun workaround Kai-Heng Feng
2020-05-21  7:18 ` Brown, Aaron F

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).