From patchwork Fri Jun 19 14:33:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 697BBC433E0 for ; Fri, 19 Jun 2020 16:16:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D00D21707 for ; Fri, 19 Jun 2020 16:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592583386; bh=47bjv5OmHgy6hA58VLYMWuBDqhtIvn88MVvyr/tlets=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FkdnNrPHidNHtomTnuolkg76AJwwMa9z0j/NhMw3XooN7I5yQkQaZd84wmbzQCY5n 8KoNb2VWFuPDwOKW8/qcOjVrGtvx09TxbVbf1+rhsY3Vm7rH2dHxJ+mag/D4q4e5fu EqzgcMCPtwz1gtElvL3XA1SZBOAIVNeyYaBsYUo4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404451AbgFSQQW (ORCPT ); Fri, 19 Jun 2020 12:16:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:59858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390928AbgFSPDD (ORCPT ); Fri, 19 Jun 2020 11:03:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D684621841; Fri, 19 Jun 2020 15:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578983; bh=47bjv5OmHgy6hA58VLYMWuBDqhtIvn88MVvyr/tlets=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WedEIFEQpCH/ymgkgMJRYMbLpYtNntNEBHAicMoOpqOciWJMlIV+FsS6C5iPlW7OO 5Bc6lznP7Y+9GgmvePf7dzOOsL5XbGIKsf2onYQxxFYZ2pIkyNzricmDVso4mlF5o3 otijXhn1AFEZyPOX6NBWx3Qx5+fIBYYoYkMY5xkc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai-Heng Feng , Aaron Brown , Jeff Kirsher Subject: [PATCH 4.19 232/267] e1000e: Disable TSO for buffer overrun workaround Date: Fri, 19 Jun 2020 16:33:37 +0200 Message-Id: <20200619141659.848204481@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kai-Heng Feng commit f29801030ac67bf98b7a65d3aea67b30769d4f7c upstream. 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. CC: stable 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 Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -5251,6 +5251,10 @@ static void e1000_watchdog_task(struct w /* 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