be2net: support asymmetric rx/tx queue counts
[deliverable/linux.git] / net / sched / act_simple.c
index 3a33fb648a6d48db38627b66b1f54e0ab54bfcc7..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,10 +159,9 @@ 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);
-       if (nla_put(skb, TCA_DEF_TM, sizeof(t), &t))
+
+       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.027996 seconds and 5 git commands to generate.