summaryrefslogtreecommitdiffstats
path: root/include/net/act_api.h
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2016-06-06 12:32:55 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-08 00:53:43 +0200
commit48d8ee1694dd1ab25614b58f968123a4598f887e (patch)
tree175c3ca36e719394ab7f882e2030d0c55b4487c8 /include/net/act_api.h
parentnet sched actions: introduce timestamp for firsttime use (diff)
downloadlinux-48d8ee1694dd1ab25614b58f968123a4598f887e.tar.xz
linux-48d8ee1694dd1ab25614b58f968123a4598f887e.zip
net sched actions: aggregate dumping of actions timeinfo
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r--include/net/act_api.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 8389c007076f..a891978310e9 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -80,6 +80,14 @@ static inline void tcf_lastuse_update(struct tcf_t *tm)
tm->firstuse = now;
}
+static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm)
+{
+ dtm->install = jiffies_to_clock_t(jiffies - stm->install);
+ dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
+ dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
+ dtm->expires = jiffies_to_clock_t(stm->expires);
+}
+
struct tc_action {
void *priv;
const struct tc_action_ops *ops;