Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp775208ybj; Thu, 7 May 2020 07:23:44 -0700 (PDT) X-Google-Smtp-Source: APiQypL05wNUvcjX0Ii2srXQyOAn3ystgIOfYQvW/lOWTy6P77H3aAXgJzWoIqS+N3n9iP/IewaS X-Received: by 2002:a05:6402:2293:: with SMTP id cw19mr12026275edb.351.1588861424756; Thu, 07 May 2020 07:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588861424; cv=none; d=google.com; s=arc-20160816; b=GgQk/6Xt3y7kHi9zmI9XnIK38XTg7911Dt7TKnbM5ueJr/wPnnQkJTgZv7uuCho87q MaDJfrAe4Ps5wsTTHHToRRdD60pLvcjMs20/aFgCHr/knW3V1NTBPPptgWl0JoG1PjWj l4p6Ck8+/7BIukxSJ5vfr2m2/G+qyWUgbLdNHn3TR4HWw8LIoOE8GJQs4OLxOAq72/Qo tgw53AtqnHbghc9c9V2HLpALi8EyvTV/ATJt8gCU1S1KJoWeb9FJ+KzqTEDE1OGY/+y0 n5kbqA81JNlA7kh02L6yixx49aDqnRmOTv95j4q6glnyegBAmhHTCbuFKRnqjilyJl7m 87wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=lYAkH33ZG1aGU9y8cweYWjxVpLdv7ylYCFePj/LHAkI=; b=BazB1cc0wT0Bk4ysnWBoo4YYWy5MYQn/0ZXorLuA6uVFeO8UkLsurxxkm1CwHgYMUC x9BEUgHOJrXYzHVFHEO1G9HHYCzgu05NikzTsAIEO5TSbM7+GsqOA4GiNOoQxoZBTfE3 V+ZNzVdfixr/zc6n34cV2EIqWsYHUyjr/8rcw98G0jlvlfG6DfCI7VTn3hxqmuCKS3H4 +oNtdnouHmaOAZ91HiOrDAGo1eeQsvNEixhB0o0k/be7C9yABI4vF0lXAisSYbocY9gX DiRUxr/GI6yRkJ34+bbx8uZGgrXMZsmtnjUvzp2PBx2XnWS6dz8Gpin5S1BUKT3vJbGb CePQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by19si1283192ejc.362.2020.05.07.07.23.18; Thu, 07 May 2020 07:23:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbgEGOV3 (ORCPT + 99 others); Thu, 7 May 2020 10:21:29 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54949 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbgEGOV2 (ORCPT ); Thu, 7 May 2020 10:21:28 -0400 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jWhOn-00036d-BO; Thu, 07 May 2020 14:21:17 +0000 From: Kai-Heng Feng To: jeffrey.t.kirsher@intel.com Cc: Kai-Heng Feng , "David S. Miller" , Sasha Neftin , Dima Ruinskiy , Raanan Avargil , intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET DRIVERS), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] e1000e: Disable TSO for buffer overrun workaround Date: Thu, 7 May 2020 22:21:07 +0800 Message-Id: <20200507142108.13090-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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