aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPaul Blakey <paulb@mellanox.com>2016-10-19 10:42:39 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-20 11:14:24 -0400
commit5712bf9c5c30ade3204016147d7b04bece6952d9 (patch)
tree914614d0fc2a612104cd30f298d3036a739e6abe /net/sched
parent164c971d1cc365dc85e5cf9a9302a91c0cf7f126 (diff)
net/sched: act_mirred: Use passed lastuse argument
stats_update callback is called by NIC drivers doing hardware offloading of the mirred action. Lastuse is passed as argument to specify when the stats was actually last updated and is not always the current time. Fixes: 9798e6fe4f9b ('net: act_mirred: allow statistic updates from offloaded actions') Signed-off-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_mirred.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 667dc382df82..6b07fba5770b 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -207,8 +207,11 @@ out:
207static void tcf_stats_update(struct tc_action *a, u64 bytes, u32 packets, 207static void tcf_stats_update(struct tc_action *a, u64 bytes, u32 packets,
208 u64 lastuse) 208 u64 lastuse)
209{ 209{
210 tcf_lastuse_update(&a->tcfa_tm); 210 struct tcf_mirred *m = to_mirred(a);
211 struct tcf_t *tm = &m->tcf_tm;
212
211 _bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), bytes, packets); 213 _bstats_cpu_update(this_cpu_ptr(a->cpu_bstats), bytes, packets);
214 tm->lastuse = lastuse;
212} 215}
213 216
214static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, 217static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind,