net sched actions: introduce timestamp for firsttime use

Useful to know when the action was first used for accounting
(and debugging)

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jamal Hadi Salim
2016-06-06 06:32:54 -04:00
committed by David S. Miller
parent 9c4a4e488b
commit 53eb440f4a
15 changed files with 17 additions and 0 deletions

View File

@@ -160,6 +160,7 @@ static int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - d->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - d->tcf_tm.lastuse);
t.firstuse = jiffies_to_clock_t(jiffies - d->tcf_tm.firstuse);
t.expires = jiffies_to_clock_t(d->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_DEF_TM, sizeof(t), &t, TCA_DEF_PAD))
goto nla_put_failure;