net sched: actions use tcf_lastuse_update for consistency
authorJamal Hadi Salim <jhs@mojatatu.com>
Mon, 6 Jun 2016 10:32:53 +0000 (06:32 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 22:53:43 +0000 (15:53 -0700)
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_connmark.c
net/sched/act_csum.c
net/sched/act_ife.c
net/sched/act_ipt.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sched/act_pedit.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/sched/act_vlan.c

index 2ba700c..e0e6c68 100644 (file)
@@ -44,7 +44,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
        int proto;
 
        spin_lock(&ca->tcf_lock);
-       ca->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&ca->tcf_tm);
        bstats_update(&ca->tcf_bstats, skb);
 
        if (skb->protocol == htons(ETH_P_IP)) {
index 28e934e..065f716 100644 (file)
@@ -501,7 +501,7 @@ static int tcf_csum(struct sk_buff *skb,
        u32 update_flags;
 
        spin_lock(&p->tcf_lock);
-       p->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&p->tcf_tm);
        bstats_update(&p->tcf_bstats, skb);
        action = p->tcf_action;
        update_flags = p->update_flags;
index 658046d..6491576 100644 (file)
@@ -623,7 +623,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&ife->tcf_lock);
        bstats_update(&ife->tcf_bstats, skb);
-       ife->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&ife->tcf_tm);
        spin_unlock(&ife->tcf_lock);
 
        ifehdrln = ntohs(ifehdrln);
@@ -711,7 +711,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&ife->tcf_lock);
        bstats_update(&ife->tcf_bstats, skb);
-       ife->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&ife->tcf_tm);
 
        if (!metalen) {         /* no metadata to send */
                /* abuse overlimits to count when we allow packet
@@ -802,7 +802,7 @@ static int tcf_ife_act(struct sk_buff *skb, const struct tc_action *a,
        pr_info_ratelimited("unknown failure(policy neither de/encode\n");
        spin_lock(&ife->tcf_lock);
        bstats_update(&ife->tcf_bstats, skb);
-       ife->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&ife->tcf_tm);
        ife->tcf_qstats.drops++;
        spin_unlock(&ife->tcf_lock);
 
index 9f002ad..30e9087 100644 (file)
@@ -212,7 +212,7 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&ipt->tcf_lock);
 
-       ipt->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&ipt->tcf_tm);
        bstats_update(&ipt->tcf_bstats, skb);
 
        /* yes, we have to worry about both in and out dev
index 128942b..d3ac73e 100644 (file)
@@ -157,7 +157,6 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
        u32 at;
 
        tcf_lastuse_update(&m->tcf_tm);
-
        bstats_cpu_update(this_cpu_ptr(m->common.cpu_bstats), skb);
 
        rcu_read_lock();
index c0a879f..9135aa8 100644 (file)
@@ -103,7 +103,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&p->tcf_lock);
 
-       p->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&p->tcf_tm);
        old_addr = p->old_addr;
        new_addr = p->new_addr;
        mask = p->mask;
index c6e18f2..67a1726 100644 (file)
@@ -121,7 +121,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
 
        spin_lock(&p->tcf_lock);
 
-       p->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&p->tcf_tm);
 
        if (p->tcfp_nkeys > 0) {
                struct tc_pedit_key *tkey = p->tcfp_keys;
index e42f8da..f95d1c5 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
index e928802..82105c8 100644 (file)
@@ -37,7 +37,7 @@ static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a,
        struct tcf_skbedit *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);
 
        if (d->flags & SKBEDIT_F_PRIORITY)
index ac4adc8..da5120f 100644 (file)
@@ -31,7 +31,7 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
        int err;
 
        spin_lock(&v->tcf_lock);
-       v->tcf_tm.lastuse = jiffies;
+       tcf_lastuse_update(&v->tcf_tm);
        bstats_update(&v->tcf_bstats, skb);
        action = v->tcf_action;