From patchwork Thu Dec 10 06:59:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Kumar X-Patchwork-Id: 40786 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id D8BC5B6F1B for ; Thu, 10 Dec 2009 18:00:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbZLJG74 (ORCPT ); Thu, 10 Dec 2009 01:59:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753151AbZLJG74 (ORCPT ); Thu, 10 Dec 2009 01:59:56 -0500 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:40774 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753300AbZLJG7z (ORCPT ); Thu, 10 Dec 2009 01:59:55 -0500 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp09.in.ibm.com (8.14.3/8.13.1) with ESMTP id nBA6bHkJ021241 for ; Thu, 10 Dec 2009 12:07:17 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBA700KF311448 for ; Thu, 10 Dec 2009 12:30:00 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nBA6xxE3019914 for ; Thu, 10 Dec 2009 17:59:59 +1100 Received: from localhost.localdomain ([9.77.198.224]) by d28av04.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nBA6xwm7019875; Thu, 10 Dec 2009 17:59:58 +1100 From: Krishna Kumar To: davem@davemloft.net Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, Krishna Kumar Date: Thu, 10 Dec 2009 12:29:58 +0530 Message-Id: <20091210065958.10261.89370.sendpatchset@localhost.localdomain> Subject: [PATCH] net: release dst entry while cache-hot for GSO case too Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Krishna Kumar Non-GSO code drops dst entry for performance reasons, but the same is missing for GSO code. Drop dst while cache-hot for GSO case too. Signed-off-by: Krishna Kumar Acked-by: Eric Dumazet --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -ruNp org/net/core/dev.c new/net/core/dev.c --- org/net/core/dev.c 2009-12-10 10:20:39.000000000 +0530 +++ new/net/core/dev.c 2009-12-10 10:21:17.000000000 +0530 @@ -1853,6 +1853,14 @@ gso: skb->next = nskb->next; nskb->next = NULL; + + /* + * If device doesnt need nskb->dst, release it right now while + * its hot in this cpu cache + */ + if (dev->priv_flags & IFF_XMIT_DST_RELEASE) + skb_dst_drop(nskb); + rc = ops->ndo_start_xmit(nskb, dev); if (unlikely(rc != NETDEV_TX_OK)) { if (rc & ~NETDEV_TX_MASK)