diff mbox series

[1/1,SRU,B,E,F,G,Unstable] UBUNTU: SAUCE: e1000e: Disable TSO for buffer overrun workaround

Message ID 20200513085836.862964-2-acelan.kao@canonical.com
State New
Headers show
Series Slow send speed with Intel I219-V | expand

Commit Message

AceLan Kao May 13, 2020, 8:58 a.m. UTC
From: Kai-Heng Feng <kai.heng.feng@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1802691

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")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
(cherry picked from commit https://lkml.org/lkml/2020/5/7/676)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stefan Bader May 13, 2020, 12:01 p.m. UTC | #1
On 13.05.20 10:58, AceLan Kao wrote:
> From: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1802691
> 
> 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")
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> (cherry picked from commit https://lkml.org/lkml/2020/5/7/676)
> Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
> ---

Disabling segmentation offload does not sound like a proper fix to the problem.
Even if you do not notice anything on your CPU that might be different in other
scenarios. And this does not seem to have any response upstream on the mailing list.

>  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 cfbdcf4838a7..6e85032d8916 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -5293,6 +5293,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
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index cfbdcf4838a7..6e85032d8916 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5293,6 +5293,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