Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c4a4e48 authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller
Browse files

net sched: actions use tcf_lastuse_update for consistency

parent e69985c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;
+3 −3
Original line number Original line Diff line number Diff line
@@ -623,7 +623,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 +711,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 +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");
	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);


+1 −1
Original line number Original line Diff line number Diff line
@@ -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
+0 −1
Original line number Original line Diff line number Diff line
@@ -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();
Loading