From patchwork Thu Apr 30 20:58:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 466729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3036C140310 for ; Fri, 1 May 2015 06:58:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 658A7A3829; Thu, 30 Apr 2015 20:58:31 +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 IyYZEoldf7RN; Thu, 30 Apr 2015 20:58:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AB0FEA3827; Thu, 30 Apr 2015 20:58:30 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 58BF71C22B8 for ; Thu, 30 Apr 2015 20:58:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 545C3A3834 for ; Thu, 30 Apr 2015 20:58:29 +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 KoZu-xvSsOMj for ; Thu, 30 Apr 2015 20:58:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C6E9BA3831 for ; Thu, 30 Apr 2015 20:58:28 +0000 (UTC) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3UKwPLc019833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Apr 2015 16:58:26 -0400 Received: from [192.168.122.149] (vpn-225-10.phx2.redhat.com [10.3.225.10]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3UKwPHR009093; Thu, 30 Apr 2015 16:58:25 -0400 From: Alexander Duyck To: netdev@vger.kernel.org Date: Thu, 30 Apr 2015 13:58:24 -0700 Message-ID: <20150430205824.1512.35158.stgit@ahduyck-vm-fedora22> In-Reply-To: <20150430205423.1512.13487.stgit@ahduyck-vm-fedora22> References: <20150430205423.1512.13487.stgit@ahduyck-vm-fedora22> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: nic_swsd@realtek.com, Dept-HSGLinuxNICDev@qlogic.com, sony.chacko@qlogic.com, intel-wired-lan@lists.osuosl.org, davem@davemloft.net Subject: [Intel-wired-lan] [PATCH 2/3] r8169: Use dev_kfree_skb in Tx cleanup path X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" This change replaces the use of either dev_kfree_skb_any or dev_consume_skb_any in the Tx cleanup path of this driver with dev_kfree_skb. There isn't any need for the "_any" version of these functions since the NAPI cleanup context is not a hard irq context. This change allows us to drop one function call from the clean-up path since dev_kfree_skb_any was just calling into dev_kfree_skb in these paths anyway. Signed-off-by: Alexander Duyck --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index c70ab40d8698..ca94040b0ec2 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -7215,7 +7215,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) tp->tx_stats.packets++; tp->tx_stats.bytes += tx_skb->skb->len; u64_stats_update_end(&tp->tx_stats.syncp); - dev_kfree_skb_any(tx_skb->skb); + dev_kfree_skb(tx_skb->skb); tx_skb->skb = NULL; } dirty_tx++;