be2net: support asymmetric rx/tx queue counts
[deliverable/linux.git] / net / sched / act_simple.c
index e42f8daca14796f4efd5175e2b298e9a70c2f2c9..318328d34d12aa7784ffd0a2de7486b02df6f399 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
@@ -86,8 +86,9 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,
        struct nlattr *tb[TCA_DEF_MAX + 1];
        struct tc_defact *parm;
        struct tcf_defact *d;
+       bool exists = false;
+       int ret = 0, err;
        char *defdata;
-       int ret = 0, err, exists = 0;
 
        if (nla == NULL)
                return -EINVAL;
@@ -158,9 +159,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.026661 seconds and 5 git commands to generate.