Commit be119913 authored by David S. Miller's avatar David S. Miller

Merge branch 'sch-action-tstamp'

Jamal Hadi Salim says:

====================
net sched action timestamp improvements

Various aggregations of duplicated code, fixes and introduction of firstused
timestamp

v2: add const for source time info per suggestion from Cong
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e69985c6 48d8ee16
...@@ -76,6 +76,16 @@ static inline void tcf_lastuse_update(struct tcf_t *tm) ...@@ -76,6 +76,16 @@ static inline void tcf_lastuse_update(struct tcf_t *tm)
if (tm->lastuse != now) if (tm->lastuse != now)
tm->lastuse = now; tm->lastuse = now;
if (unlikely(!tm->firstuse))
tm->firstuse = now;
}
static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm)
{
dtm->install = jiffies_to_clock_t(jiffies - stm->install);
dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
dtm->expires = jiffies_to_clock_t(stm->expires);
} }
struct tc_action { struct tc_action {
......
...@@ -124,6 +124,7 @@ struct tcf_t { ...@@ -124,6 +124,7 @@ struct tcf_t {
__u64 install; __u64 install;
__u64 lastuse; __u64 lastuse;
__u64 expires; __u64 expires;
__u64 firstuse;
}; };
struct tc_cnt { struct tc_cnt {
......
...@@ -283,6 +283,7 @@ int tcf_hash_create(struct tc_action_net *tn, u32 index, struct nlattr *est, ...@@ -283,6 +283,7 @@ int tcf_hash_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
p->tcfc_index = index ? index : tcf_hash_new_index(tn); p->tcfc_index = index ? index : tcf_hash_new_index(tn);
p->tcfc_tm.install = jiffies; p->tcfc_tm.install = jiffies;
p->tcfc_tm.lastuse = jiffies; p->tcfc_tm.lastuse = jiffies;
p->tcfc_tm.firstuse = 0;
if (est) { if (est) {
err = gen_new_estimator(&p->tcfc_bstats, p->cpu_bstats, err = gen_new_estimator(&p->tcfc_bstats, p->cpu_bstats,
&p->tcfc_rate_est, &p->tcfc_rate_est,
......
...@@ -154,10 +154,7 @@ static int tcf_bpf_dump(struct sk_buff *skb, struct tc_action *act, ...@@ -154,10 +154,7 @@ static int tcf_bpf_dump(struct sk_buff *skb, struct tc_action *act,
if (ret) if (ret)
goto nla_put_failure; goto nla_put_failure;
tm.install = jiffies_to_clock_t(jiffies - prog->tcf_tm.install); tcf_tm_dump(&tm, &prog->tcf_tm);
tm.lastuse = jiffies_to_clock_t(jiffies - prog->tcf_tm.lastuse);
tm.expires = jiffies_to_clock_t(prog->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_ACT_BPF_TM, sizeof(tm), &tm, if (nla_put_64bit(skb, TCA_ACT_BPF_TM, sizeof(tm), &tm,
TCA_ACT_BPF_PAD)) TCA_ACT_BPF_PAD))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -44,7 +44,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a, ...@@ -44,7 +44,7 @@ static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
int proto; int proto;
spin_lock(&ca->tcf_lock); spin_lock(&ca->tcf_lock);
ca->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&ca->tcf_tm);
bstats_update(&ca->tcf_bstats, skb); bstats_update(&ca->tcf_bstats, skb);
if (skb->protocol == htons(ETH_P_IP)) { if (skb->protocol == htons(ETH_P_IP)) {
...@@ -160,9 +160,7 @@ static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a, ...@@ -160,9 +160,7 @@ static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a,
if (nla_put(skb, TCA_CONNMARK_PARMS, sizeof(opt), &opt)) if (nla_put(skb, TCA_CONNMARK_PARMS, sizeof(opt), &opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - ci->tcf_tm.install); tcf_tm_dump(&t, &ci->tcf_tm);
t.lastuse = jiffies_to_clock_t(jiffies - ci->tcf_tm.lastuse);
t.expires = jiffies_to_clock_t(ci->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_CONNMARK_TM, sizeof(t), &t, if (nla_put_64bit(skb, TCA_CONNMARK_TM, sizeof(t), &t,
TCA_CONNMARK_PAD)) TCA_CONNMARK_PAD))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -501,7 +501,7 @@ static int tcf_csum(struct sk_buff *skb, ...@@ -501,7 +501,7 @@ static int tcf_csum(struct sk_buff *skb,
u32 update_flags; u32 update_flags;
spin_lock(&p->tcf_lock); spin_lock(&p->tcf_lock);
p->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&p->tcf_tm);
bstats_update(&p->tcf_bstats, skb); bstats_update(&p->tcf_bstats, skb);
action = p->tcf_action; action = p->tcf_action;
update_flags = p->update_flags; update_flags = p->update_flags;
...@@ -546,9 +546,8 @@ static int tcf_csum_dump(struct sk_buff *skb, ...@@ -546,9 +546,8 @@ static int tcf_csum_dump(struct sk_buff *skb,
if (nla_put(skb, TCA_CSUM_PARMS, sizeof(opt), &opt)) if (nla_put(skb, TCA_CSUM_PARMS, sizeof(opt), &opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); tcf_tm_dump(&t, &p->tcf_tm);
t.expires = jiffies_to_clock_t(p->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_CSUM_TM, sizeof(t), &t, TCA_CSUM_PAD)) if (nla_put_64bit(skb, TCA_CSUM_TM, sizeof(t), &t, TCA_CSUM_PAD))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -188,9 +188,7 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ...@@ -188,9 +188,7 @@ static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int
goto nla_put_failure; goto nla_put_failure;
} }
#endif #endif
t.install = jiffies_to_clock_t(jiffies - gact->tcf_tm.install); tcf_tm_dump(&t, &gact->tcf_tm);
t.lastuse = jiffies_to_clock_t(jiffies - gact->tcf_tm.lastuse);
t.expires = jiffies_to_clock_t(gact->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_GACT_TM, sizeof(t), &t, TCA_GACT_PAD)) if (nla_put_64bit(skb, TCA_GACT_TM, sizeof(t), &t, TCA_GACT_PAD))
goto nla_put_failure; goto nla_put_failure;
return skb->len; return skb->len;
......
...@@ -553,9 +553,7 @@ static int tcf_ife_dump(struct sk_buff *skb, struct tc_action *a, int bind, ...@@ -553,9 +553,7 @@ static int tcf_ife_dump(struct sk_buff *skb, struct tc_action *a, int bind,
if (nla_put(skb, TCA_IFE_PARMS, sizeof(opt), &opt)) if (nla_put(skb, TCA_IFE_PARMS, sizeof(opt), &opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - ife->tcf_tm.install); tcf_tm_dump(&t, &ife->tcf_tm);
t.lastuse = jiffies_to_clock_t(jiffies - ife->tcf_tm.lastuse);
t.expires = jiffies_to_clock_t(ife->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_IFE_TM, sizeof(t), &t, TCA_IFE_PAD)) if (nla_put_64bit(skb, TCA_IFE_TM, sizeof(t), &t, TCA_IFE_PAD))
goto nla_put_failure; goto nla_put_failure;
...@@ -623,7 +621,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a, ...@@ -623,7 +621,7 @@ static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a,
spin_lock(&ife->tcf_lock); spin_lock(&ife->tcf_lock);
bstats_update(&ife->tcf_bstats, skb); bstats_update(&ife->tcf_bstats, skb);
ife->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&ife->tcf_tm);
spin_unlock(&ife->tcf_lock); spin_unlock(&ife->tcf_lock);
ifehdrln = ntohs(ifehdrln); ifehdrln = ntohs(ifehdrln);
...@@ -711,7 +709,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a, ...@@ -711,7 +709,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a,
spin_lock(&ife->tcf_lock); spin_lock(&ife->tcf_lock);
bstats_update(&ife->tcf_bstats, skb); bstats_update(&ife->tcf_bstats, skb);
ife->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&ife->tcf_tm);
if (!metalen) { /* no metadata to send */ if (!metalen) { /* no metadata to send */
/* abuse overlimits to count when we allow packet /* abuse overlimits to count when we allow packet
...@@ -802,7 +800,7 @@ static int tcf_ife_act(struct sk_buff *skb, const struct tc_action *a, ...@@ -802,7 +800,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"); pr_info_ratelimited("unknown failure(policy neither de/encode\n");
spin_lock(&ife->tcf_lock); spin_lock(&ife->tcf_lock);
bstats_update(&ife->tcf_bstats, skb); bstats_update(&ife->tcf_bstats, skb);
ife->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&ife->tcf_tm);
ife->tcf_qstats.drops++; ife->tcf_qstats.drops++;
spin_unlock(&ife->tcf_lock); spin_unlock(&ife->tcf_lock);
......
...@@ -212,7 +212,7 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a, ...@@ -212,7 +212,7 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
spin_lock(&ipt->tcf_lock); spin_lock(&ipt->tcf_lock);
ipt->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&ipt->tcf_tm);
bstats_update(&ipt->tcf_bstats, skb); bstats_update(&ipt->tcf_bstats, skb);
/* yes, we have to worry about both in and out dev /* yes, we have to worry about both in and out dev
...@@ -277,11 +277,11 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ...@@ -277,11 +277,11 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int
nla_put(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c) || nla_put(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c) ||
nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname)) nla_put_string(skb, TCA_IPT_TABLE, ipt->tcfi_tname))
goto nla_put_failure; goto nla_put_failure;
tm.install = jiffies_to_clock_t(jiffies - ipt->tcf_tm.install);
tm.lastuse = jiffies_to_clock_t(jiffies - ipt->tcf_tm.lastuse); tcf_tm_dump(&tm, &ipt->tcf_tm);
tm.expires = jiffies_to_clock_t(ipt->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_IPT_TM, sizeof(tm), &tm, TCA_IPT_PAD)) if (nla_put_64bit(skb, TCA_IPT_TM, sizeof(tm), &tm, TCA_IPT_PAD))
goto nla_put_failure; goto nla_put_failure;
kfree(t); kfree(t);
return skb->len; return skb->len;
......
...@@ -157,7 +157,6 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a, ...@@ -157,7 +157,6 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
u32 at; u32 at;
tcf_lastuse_update(&m->tcf_tm); tcf_lastuse_update(&m->tcf_tm);
bstats_cpu_update(this_cpu_ptr(m->common.cpu_bstats), skb); bstats_cpu_update(this_cpu_ptr(m->common.cpu_bstats), skb);
rcu_read_lock(); rcu_read_lock();
...@@ -219,9 +218,8 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i ...@@ -219,9 +218,8 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i
if (nla_put(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt)) if (nla_put(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse); tcf_tm_dump(&t, &m->tcf_tm);
t.expires = jiffies_to_clock_t(m->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_MIRRED_TM, sizeof(t), &t, TCA_MIRRED_PAD)) if (nla_put_64bit(skb, TCA_MIRRED_TM, sizeof(t), &t, TCA_MIRRED_PAD))
goto nla_put_failure; goto nla_put_failure;
return skb->len; return skb->len;
......
...@@ -103,7 +103,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a, ...@@ -103,7 +103,7 @@ static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
spin_lock(&p->tcf_lock); spin_lock(&p->tcf_lock);
p->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&p->tcf_tm);
old_addr = p->old_addr; old_addr = p->old_addr;
new_addr = p->new_addr; new_addr = p->new_addr;
mask = p->mask; mask = p->mask;
...@@ -264,9 +264,8 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a, ...@@ -264,9 +264,8 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a,
if (nla_put(skb, TCA_NAT_PARMS, sizeof(opt), &opt)) if (nla_put(skb, TCA_NAT_PARMS, sizeof(opt), &opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); tcf_tm_dump(&t, &p->tcf_tm);
t.expires = jiffies_to_clock_t(p->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_NAT_TM, sizeof(t), &t, TCA_NAT_PAD)) if (nla_put_64bit(skb, TCA_NAT_TM, sizeof(t), &t, TCA_NAT_PAD))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -121,7 +121,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a, ...@@ -121,7 +121,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
spin_lock(&p->tcf_lock); spin_lock(&p->tcf_lock);
p->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&p->tcf_tm);
if (p->tcfp_nkeys > 0) { if (p->tcfp_nkeys > 0) {
struct tc_pedit_key *tkey = p->tcfp_keys; struct tc_pedit_key *tkey = p->tcfp_keys;
...@@ -200,11 +200,11 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a, ...@@ -200,11 +200,11 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
if (nla_put(skb, TCA_PEDIT_PARMS, s, opt)) if (nla_put(skb, TCA_PEDIT_PARMS, s, opt))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse); tcf_tm_dump(&t, &p->tcf_tm);
t.expires = jiffies_to_clock_t(p->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_PEDIT_TM, sizeof(t), &t, TCA_PEDIT_PAD)) if (nla_put_64bit(skb, TCA_PEDIT_TM, sizeof(t), &t, TCA_PEDIT_PAD))
goto nla_put_failure; goto nla_put_failure;
kfree(opt); kfree(opt);
return skb->len; return skb->len;
......
...@@ -241,6 +241,7 @@ static int tcf_act_police_locate(struct net *net, struct nlattr *nla, ...@@ -241,6 +241,7 @@ static int tcf_act_police_locate(struct net *net, struct nlattr *nla,
tcf_hash_new_index(tn); tcf_hash_new_index(tn);
police->tcf_tm.install = jiffies; police->tcf_tm.install = jiffies;
police->tcf_tm.lastuse = jiffies; police->tcf_tm.lastuse = jiffies;
police->tcf_tm.firstuse = 0;
h = tcf_hash(police->tcf_index, POL_TAB_MASK); h = tcf_hash(police->tcf_index, POL_TAB_MASK);
spin_lock_bh(&hinfo->lock); spin_lock_bh(&hinfo->lock);
hlist_add_head(&police->tcf_head, &hinfo->htab[h]); hlist_add_head(&police->tcf_head, &hinfo->htab[h]);
...@@ -347,6 +348,7 @@ tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) ...@@ -347,6 +348,7 @@ tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
t.install = jiffies_to_clock_t(jiffies - police->tcf_tm.install); t.install = jiffies_to_clock_t(jiffies - police->tcf_tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - police->tcf_tm.lastuse); t.lastuse = jiffies_to_clock_t(jiffies - police->tcf_tm.lastuse);
t.firstuse = jiffies_to_clock_t(jiffies - police->tcf_tm.firstuse);
t.expires = jiffies_to_clock_t(police->tcf_tm.expires); t.expires = jiffies_to_clock_t(police->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_POLICE_TM, sizeof(t), &t, TCA_POLICE_PAD)) if (nla_put_64bit(skb, TCA_POLICE_TM, sizeof(t), &t, TCA_POLICE_PAD))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -35,7 +35,7 @@ static int tcf_simp(struct sk_buff *skb, const struct tc_action *a, ...@@ -35,7 +35,7 @@ static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
struct tcf_defact *d = a->priv; struct tcf_defact *d = a->priv;
spin_lock(&d->tcf_lock); spin_lock(&d->tcf_lock);
d->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&d->tcf_tm);
bstats_update(&d->tcf_bstats, skb); bstats_update(&d->tcf_bstats, skb);
/* print policy string followed by _ then packet count /* 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, ...@@ -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) || if (nla_put(skb, TCA_DEF_PARMS, sizeof(opt), &opt) ||
nla_put_string(skb, TCA_DEF_DATA, d->tcfd_defdata)) nla_put_string(skb, TCA_DEF_DATA, d->tcfd_defdata))
goto nla_put_failure; 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); tcf_tm_dump(&t, &d->tcf_tm);
t.expires = jiffies_to_clock_t(d->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_DEF_TM, sizeof(t), &t, TCA_DEF_PAD)) if (nla_put_64bit(skb, TCA_DEF_TM, sizeof(t), &t, TCA_DEF_PAD))
goto nla_put_failure; goto nla_put_failure;
return skb->len; return skb->len;
......
...@@ -37,7 +37,7 @@ static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, ...@@ -37,7 +37,7 @@ static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a,
struct tcf_skbedit *d = a->priv; struct tcf_skbedit *d = a->priv;
spin_lock(&d->tcf_lock); spin_lock(&d->tcf_lock);
d->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&d->tcf_tm);
bstats_update(&d->tcf_bstats, skb); bstats_update(&d->tcf_bstats, skb);
if (d->flags & SKBEDIT_F_PRIORITY) if (d->flags & SKBEDIT_F_PRIORITY)
...@@ -168,9 +168,8 @@ static int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a, ...@@ -168,9 +168,8 @@ static int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
nla_put(skb, TCA_SKBEDIT_MARK, sizeof(d->mark), nla_put(skb, TCA_SKBEDIT_MARK, sizeof(d->mark),
&d->mark)) &d->mark))
goto nla_put_failure; 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); tcf_tm_dump(&t, &d->tcf_tm);
t.expires = jiffies_to_clock_t(d->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_SKBEDIT_TM, sizeof(t), &t, TCA_SKBEDIT_PAD)) if (nla_put_64bit(skb, TCA_SKBEDIT_TM, sizeof(t), &t, TCA_SKBEDIT_PAD))
goto nla_put_failure; goto nla_put_failure;
return skb->len; return skb->len;
......
...@@ -31,7 +31,7 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a, ...@@ -31,7 +31,7 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
int err; int err;
spin_lock(&v->tcf_lock); spin_lock(&v->tcf_lock);
v->tcf_tm.lastuse = jiffies; tcf_lastuse_update(&v->tcf_tm);
bstats_update(&v->tcf_bstats, skb); bstats_update(&v->tcf_bstats, skb);
action = v->tcf_action; action = v->tcf_action;
...@@ -182,9 +182,7 @@ static int tcf_vlan_dump(struct sk_buff *skb, struct tc_action *a, ...@@ -182,9 +182,7 @@ static int tcf_vlan_dump(struct sk_buff *skb, struct tc_action *a,
nla_put_be16(skb, TCA_VLAN_PUSH_VLAN_PROTOCOL, v->tcfv_push_proto))) nla_put_be16(skb, TCA_VLAN_PUSH_VLAN_PROTOCOL, v->tcfv_push_proto)))
goto nla_put_failure; goto nla_put_failure;
t.install = jiffies_to_clock_t(jiffies - v->tcf_tm.install); tcf_tm_dump(&t, &v->tcf_tm);
t.lastuse = jiffies_to_clock_t(jiffies - v->tcf_tm.lastuse);
t.expires = jiffies_to_clock_t(v->tcf_tm.expires);
if (nla_put_64bit(skb, TCA_VLAN_TM, sizeof(t), &t, TCA_VLAN_PAD)) if (nla_put_64bit(skb, TCA_VLAN_TM, sizeof(t), &t, TCA_VLAN_PAD))
goto nla_put_failure; goto nla_put_failure;
return skb->len; return skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment