From patchwork Wed Oct 16 09:49:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 283906 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.180.67]) by ozlabs.org (Postfix) with ESMTP id E65DC2C00AA for ; Wed, 16 Oct 2013 20:49:11 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760249Ab3JPJtH (ORCPT ); Wed, 16 Oct 2013 05:49:07 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:56422 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760173Ab3JPJtG (ORCPT ); Wed, 16 Oct 2013 05:49:06 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so595914pbc.35 for ; Wed, 16 Oct 2013 02:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type :content-transfer-encoding:mime-version; bh=10HWlqTO82NEDqTCs5tKgBehOiCaLxq5wUA7X6xecsE=; b=jgSO2Meek1Glmt082YsgoeyKMpre25QHmocSg8M1OEAHt3D0zbIg4gtwh10dRNptyr 1iNK5KudOzSjHeYt/rh4AGn2UCFfdS8XSmFmFiy9JVxVDF3Dijzb37Ue9Drub5DcBOpk vwUpMQFy1B4Q+nCNtGCvpapv1tiRnnJHGD39/DtrtZQMPjCRUiEPx2yqxPKTlrF5OkuB iAcBX19UI/U4FkE7ulpPLD0Su50uJejK8s8nABLHyEQE9QLgf80cYoUvU3lJyRsCfiGr JlUX8U9xWn1VsnXSfgvVY7tFD7tIh7RmlgviFtD4FsaK+RDebYGXQPbnudLuvMV37NQO aHBw== X-Received: by 10.68.172.164 with SMTP id bd4mr1891538pbc.153.1381916945188; Wed, 16 Oct 2013 02:49:05 -0700 (PDT) Received: from [172.29.162.1] ([172.29.162.1]) by mx.google.com with ESMTPSA id fy4sm90090196pbb.1.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 16 Oct 2013 02:49:04 -0700 (PDT) Message-ID: <1381916944.2045.124.camel@edumazet-glaptop.roam.corp.google.com> Subject: [PATCH net-next] ipv4: shrink rt_cache_stat From: Eric Dumazet To: David Miller Cc: netdev Date: Wed, 16 Oct 2013 02:49:04 -0700 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet Half of the rt_cache_stat fields are no longer used after IP route cache removal, lets shrink this per cpu area. Signed-off-by: Eric Dumazet --- include/net/route.h | 8 -------- net/ipv4/route.c | 16 ++++++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) -- 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 --git a/include/net/route.h b/include/net/route.h index 0ad8e01..dd4ae00 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -88,22 +88,14 @@ struct ip_rt_acct { }; struct rt_cache_stat { - unsigned int in_hit; unsigned int in_slow_tot; unsigned int in_slow_mc; unsigned int in_no_route; unsigned int in_brd; unsigned int in_martian_dst; unsigned int in_martian_src; - unsigned int out_hit; unsigned int out_slow_tot; unsigned int out_slow_mc; - unsigned int gc_total; - unsigned int gc_ignored; - unsigned int gc_goal_miss; - unsigned int gc_dst_overflow; - unsigned int in_hlist_search; - unsigned int out_hlist_search; }; extern struct ip_rt_acct __percpu *ip_rt_acct; diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6011615..d2d3253 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -295,7 +295,7 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v) seq_printf(seq,"%08x %08x %08x %08x %08x %08x %08x %08x " " %08x %08x %08x %08x %08x %08x %08x %08x %08x \n", dst_entries_get_slow(&ipv4_dst_ops), - st->in_hit, + 0, /* st->in_hit */ st->in_slow_tot, st->in_slow_mc, st->in_no_route, @@ -303,16 +303,16 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v) st->in_martian_dst, st->in_martian_src, - st->out_hit, + 0, /* st->out_hit */ st->out_slow_tot, st->out_slow_mc, - st->gc_total, - st->gc_ignored, - st->gc_goal_miss, - st->gc_dst_overflow, - st->in_hlist_search, - st->out_hlist_search + 0, /* st->gc_total */ + 0, /* st->gc_ignored */ + 0, /* st->gc_goal_miss */ + 0, /* st->gc_dst_overflow */ + 0, /* st->in_hlist_search */ + 0 /* st->out_hlist_search */ ); return 0; }