diff options
author | Harout Hedeshian <harouth@codeaurora.org> | 2015-07-27 10:32:01 -0600 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:09:45 -0700 |
commit | e9a33bcd2f02f05d55e05d5ad1e64ca9ad2c4c2a (patch) | |
tree | 203d2dee240f564408e357e7b0c4d77d56200284 /net | |
parent | d04abc1ab24a0ba0c3803257ac89c7c5b3b9c374 (diff) |
net: add a per-cpu counter for the number of frames coalesced in GRO
A low cost method of determining GRO statistics is required. This
change introduces a new counter which tracks whenever GRO coalesces
ingress packets. The counter is per-CPU and exposed in
/proc/net/softnet_stat as the last column of data. No user space
impact is expected as a result of this change. However, this change
should be reverted if legacy tools have problems with the new column
in softnet_stat.
Change-Id: I05965c0cb150947935d5977884cc4d583b37131d
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 1 | ||||
-rw-r--r-- | net/core/net-procfs.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 5e213494bb0f..f1a645cc3573 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4093,6 +4093,7 @@ static int napi_gro_complete(struct sk_buff *skb) } out: + __this_cpu_add(softnet_data.gro_coalesced, NAPI_GRO_CB(skb)->count > 1); return netif_receive_skb_internal(skb); } diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 2bf83299600a..77969b71a50a 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c @@ -159,10 +159,11 @@ static int softnet_seq_show(struct seq_file *seq, void *v) #endif seq_printf(seq, - "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", + "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", sd->processed, sd->dropped, sd->time_squeeze, 0, 0, 0, 0, 0, /* was fastroute */ - sd->cpu_collision, sd->received_rps, flow_limit_count); + sd->cpu_collision, sd->received_rps, flow_limit_count, + sd->gro_coalesced); return 0; } |