net sched actions: aggregate dumping of actions timeinfo
[deliverable/linux.git] / net / sched / act_simple.c
index e42f8daca14796f4efd5175e2b298e9a70c2f2c9..be5fbb51cfeddad9e6215d4473d0c35b1df6fdf3 100644 (file)
@@ -35,7 +35,7 @@ static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
        struct tcf_defact *d = a->priv;
 
        spin_lock(&d->tcf_lock);
-       d->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&d->tcf_tm);
        bstats_update(&d->tcf_bstats, skb);
 
        /* print policy string followed by _ then packet count
@@ -158,9 +158,8 @@ static int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
        if (nla_put(skb, TCA_DEF_PARMS, sizeof(opt), &opt) ||
            nla_put_string(skb, TCA_DEF_DATA, d->tcfd_defdata))
                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.expires = jiffies_to_clock_t(d->tcf_tm.expires);
+
+       tcf_tm_dump(&t, &d->tcf_tm);
        if (nla_put_64bit(skb, TCA_DEF_TM, sizeof(t), &t, TCA_DEF_PAD))
                goto nla_put_failure;
        return skb->len;
This page took 0.026649 seconds and 5 git commands to generate.