History

net sched: actions use tcf_lastuse_update for consistency

Jamal Hadi Salim committed 10 years ago

Commit 9c4a4e41 parent e69985c10 files · +11 −12Browse files

Unified · Split

10 files
  1. net/sched/act_connmark.c +1 −1
  2. net/sched/act_csum.c +1 −1
  3. net/sched/act_ife.c +3 −3
  4. net/sched/act_ipt.c +1 −1
  5. net/sched/act_mirred.c +0 −1
  6. net/sched/act_nat.c +1 −1
  7. net/sched/act_pedit.c +1 −1
  8. net/sched/act_simple.c +1 −1
  9. net/sched/act_skbedit.c +1 −1
  10. net/sched/act_vlan.c +1 −1
net/sched/act_connmark.c+1−1
@@ -44,7 +44,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a, · 43 unmodified lines
4444 int proto;
4545
4646 spin_lock(&ca->tcf_lock);
47− ca->tcf_tm.lastuse = jiffies;
47+ tcf_lastuse_update(&ca->tcf_tm);
4848 bstats_update(&ca->tcf_bstats, skb);
4949
5050 if (skb->protocol == htons(ETH_P_IP)) {
net/sched/act_csum.c+1−1
@@ -501,7 +501,7 @@ static int tcf_csum(struct sk_buff *skb, · 500 unmodified lines
501501 u32 update_flags;
502502
503503 spin_lock(&p->tcf_lock);
504− p->tcf_tm.lastuse = jiffies;
504+ tcf_lastuse_update(&p->tcf_tm);
505505 bstats_update(&p->tcf_bstats, skb);
506506 action = p->tcf_action;
507507 update_flags = p->update_flags;
net/sched/act_ife.c+3−3
@@ -623,7 +623,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a, · 622 unmodified lines
623623
624624 spin_lock(&ife->tcf_lock);
625625 bstats_update(&ife->tcf_bstats, skb);
626− ife->tcf_tm.lastuse = jiffies;
626+ tcf_lastuse_update(&ife->tcf_tm);
627627 spin_unlock(&ife->tcf_lock);
628628
629629 ifehdrln = ntohs(ifehdrln);
@@ -711,7 +711,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a, · 81 unmodified lines
711711
712712 spin_lock(&ife->tcf_lock);
713713 bstats_update(&ife->tcf_bstats, skb);
714− ife->tcf_tm.lastuse = jiffies;
714+ tcf_lastuse_update(&ife->tcf_tm);
715715
716716 if (!metalen) { /* no metadata to send */
717717 /* 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, · 84 unmodified lines
802802 pr_info_ratelimited("unknown failure(policy neither de/encode\n");
803803 spin_lock(&ife->tcf_lock);
804804 bstats_update(&ife->tcf_bstats, skb);
805− ife->tcf_tm.lastuse = jiffies;
805+ tcf_lastuse_update(&ife->tcf_tm);
806806 ife->tcf_qstats.drops++;
807807 spin_unlock(&ife->tcf_lock);
808808
net/sched/act_ipt.c+1−1
@@ -212,7 +212,7 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a, · 211 unmodified lines
212212
213213 spin_lock(&ipt->tcf_lock);
214214
215− ipt->tcf_tm.lastuse = jiffies;
215+ tcf_lastuse_update(&ipt->tcf_tm);
216216 bstats_update(&ipt->tcf_bstats, skb);
217217
218218 /* yes, we have to worry about both in and out dev
net/sched/act_mirred.c+0−1
@@ -157,7 +157,6 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, · 156 unmodified lines
157157 u32 at;
158158
159159 tcf_lastuse_update(&m->tcf_tm);
160−
161160 bstats_cpu_update(this_cpu_ptr(m->common.cpu_bstats), skb);
162161
163162 rcu_read_lock();
net/sched/act_nat.c+1−1
@@ -103,7 +103,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a, · 102 unmodified lines
103103
104104 spin_lock(&p->tcf_lock);
105105
106− p->tcf_tm.lastuse = jiffies;
106+ tcf_lastuse_update(&p->tcf_tm);
107107 old_addr = p->old_addr;
108108 new_addr = p->new_addr;
109109 mask = p->mask;
net/sched/act_pedit.c+1−1
@@ -121,7 +121,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a, · 120 unmodified lines
121121
122122 spin_lock(&p->tcf_lock);
123123
124− p->tcf_tm.lastuse = jiffies;
124+ tcf_lastuse_update(&p->tcf_tm);
125125
126126 if (p->tcfp_nkeys > 0) {
127127 struct tc_pedit_key *tkey = p->tcfp_keys;
net/sched/act_simple.c+1−1
@@ -35,7 +35,7 @@ static int tcf_simp(struct sk_buff *skb, const struct tc_action *a, · 34 unmodified lines
3535 struct tcf_defact *d = a->priv;
3636
3737 spin_lock(&d->tcf_lock);
38− d->tcf_tm.lastuse = jiffies;
38+ tcf_lastuse_update(&d->tcf_tm);
3939 bstats_update(&d->tcf_bstats, skb);
4040
4141 /* print policy string followed by _ then packet count
net/sched/act_skbedit.c+1−1
@@ -37,7 +37,7 @@ static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, · 36 unmodified lines
3737 struct tcf_skbedit *d = a->priv;
3838
3939 spin_lock(&d->tcf_lock);
40− d->tcf_tm.lastuse = jiffies;
40+ tcf_lastuse_update(&d->tcf_tm);
4141 bstats_update(&d->tcf_bstats, skb);
4242
4343 if (d->flags & SKBEDIT_F_PRIORITY)
net/sched/act_vlan.c+1−1
@@ -31,7 +31,7 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a, · 30 unmodified lines
3131 int err;
3232
3333 spin_lock(&v->tcf_lock);
34− v->tcf_tm.lastuse = jiffies;
34+ tcf_lastuse_update(&v->tcf_tm);
3535 bstats_update(&v->tcf_bstats, skb);
3636 action = v->tcf_action;
3737

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t