From patchwork Sun Jan 28 11:53:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tonghao Zhang X-Patchwork-Id: 866818 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="e7cIqowX"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zTrdZ5DNwz9s0g for ; Sun, 28 Jan 2018 22:53:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7A48087D07; Sun, 28 Jan 2018 11:53:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id esBRZCt0EDAJ; Sun, 28 Jan 2018 11:53:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 56D9487CFE; Sun, 28 Jan 2018 11:53:50 +0000 (UTC) X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 41C081C05B0 for ; Sun, 28 Jan 2018 11:53:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3CC2A2DDCE for ; Sun, 28 Jan 2018 11:53:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3I0y8VBXB+xT for ; Sun, 28 Jan 2018 11:53:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by silver.osuosl.org (Postfix) with ESMTPS id A1A6B2DCD8 for ; Sun, 28 Jan 2018 11:53:48 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id y27so2419906pgc.5 for ; Sun, 28 Jan 2018 03:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=mdxsrxYDboJkF37fThzphg05Vu6WtW24Ho/g+K45llY=; b=e7cIqowXpT4OtXzr1ukszjQsx/5aAmIotCz8INrZCTfqb2addpCDHiNFTY5jrtOWVo wTrKyDyolmy9fhVEq6dbjR1Y+6BMDV2nFktCikQ1wVVn1SsxS1boDsbk0HZwwHdYifHH F9uLLo9J1T0MW4h6Ocx2rzV4zRrXZtlKwlLvrZkV/+XGIvli4gecL1YgoTSzEdTjbEgs IcFSjz57S0Xe6DWjkzwKJVd2+fGKnngjikmMj2op1J6PE6RBlhuQpdUJ7OHRxgjP+ZnM GnJY4hCpDe+3CMMF85tdkL4T1dHo6XadRn87vebENXDpSPwzb92nHF69mZb5bTG7vn0k ZU4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mdxsrxYDboJkF37fThzphg05Vu6WtW24Ho/g+K45llY=; b=W/GfKnWMPJ50C3uJfxDNYQoJL/ou52DhYbDHY3U/AlFbGEnYy4+EFecV5/XDmd/SuT i1IMFSUtU+JgzL65UpFUA2Tg/K25BZg7J9MiFfjKvX7amg+0KNIxNYZQZzBi5NaVeTif eWwGHgbMXe9/906fOFcbjoT1Qe0ShUrBMJG0yAqhlOSlU9K8u+sdqMNPm2FYrnY7WDzo bzhczsFK9qZ7ItI0TaQHiIeAFAzJPoeafAUqyXT+LCEgjD4J/p2k7MutkgnUdelxFiSr QbKENLeuaOJtR1ekzRqOcU6kUo+i0JyrLXQveMlZ1RlY3liJ8mzHA1eddAQ9VYeBGHgJ vHGQ== X-Gm-Message-State: AKwxyteAJa6ze6lWRdCls8r3RTayqYQ66dByzP6yC7NHyGSXNjMYaVvA QeMkZY+sPBHJ2WaxlDYQOBYqUqke X-Google-Smtp-Source: AH8x224LlCt65o/JG1Eq8+6IYFgQcw4g5LhYeuNTpb4AIr9sWAnLWEfHzUBdGchxn1saryNgzrxaxw== X-Received: by 10.98.60.67 with SMTP id j64mr24196588pfa.217.1517140428172; Sun, 28 Jan 2018 03:53:48 -0800 (PST) Received: from local.opencloud.tech.localdomain ([23.102.225.250]) by smtp.gmail.com with ESMTPSA id s14sm14549369pgc.36.2018.01.28.03.53.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 03:53:47 -0800 (PST) From: Tonghao Zhang To: intel-wired-lan@osuosl.org Date: Sun, 28 Jan 2018 03:53:37 -0800 Message-Id: <1517140417-26439-1-git-send-email-xiangxia.m.yue@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [Intel-wired-lan] [PATCH] ixgbe: Avoid to write the RETA table when unnecessary. X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" If indir == 0 in the ixgbe_set_rxfh(), it is unnecessary to write the HW. Because redirection table is not changed. Signed-off-by: Tonghao Zhang Tested-by: Andrew Bowers --- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 3173510..8c652c6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -3059,6 +3059,8 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir, for (i = 0; i < reta_entries; i++) adapter->rss_indir_tbl[i] = indir[i]; + + ixgbe_store_reta(adapter); } /* Fill out the rss hash key */ @@ -3067,8 +3069,6 @@ static int ixgbe_set_rxfh(struct net_device *netdev, const u32 *indir, ixgbe_store_key(adapter); } - ixgbe_store_reta(adapter); - return 0; }