Commit 00a89393 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: mirred: use gnet_stats for action stats

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13d3a888
...@@ -195,9 +195,9 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a) ...@@ -195,9 +195,9 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a)
bad_mirred: bad_mirred:
if (NULL != skb2) if (NULL != skb2)
kfree_skb(skb2); kfree_skb(skb2);
p->stats.overlimits++; p->qstats.overlimits++;
p->stats.bytes += skb->len; p->bstats.bytes += skb->len;
p->stats.packets++; p->bstats.packets++;
spin_unlock(&p->lock); spin_unlock(&p->lock);
/* should we be asking for packet to be dropped? /* should we be asking for packet to be dropped?
* may make sense for redirect case only * may make sense for redirect case only
...@@ -216,8 +216,8 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a) ...@@ -216,8 +216,8 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a)
goto bad_mirred; goto bad_mirred;
} }
p->stats.bytes += skb2->len; p->bstats.bytes += skb2->len;
p->stats.packets++; p->bstats.packets++;
if ( !(at & AT_EGRESS)) { if ( !(at & AT_EGRESS)) {
if (p->ok_push) { if (p->ok_push) {
skb_push(skb2, skb2->dev->hard_header_len); skb_push(skb2, skb2->dev->hard_header_len);
...@@ -268,18 +268,6 @@ tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) ...@@ -268,18 +268,6 @@ tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
return -1; return -1;
} }
int
tcf_mirred_stats(struct sk_buff *skb, struct tc_action *a)
{
struct tcf_mirred *p;
p = PRIV(a,mirred);
if (NULL != p)
return qdisc_copy_stats(skb, &p->stats, p->stats_lock);
return 1;
}
static struct tc_action_ops act_mirred_ops = { static struct tc_action_ops act_mirred_ops = {
.next = NULL, .next = NULL,
.kind = "mirred", .kind = "mirred",
...@@ -287,7 +275,6 @@ static struct tc_action_ops act_mirred_ops = { ...@@ -287,7 +275,6 @@ static struct tc_action_ops act_mirred_ops = {
.capab = TCA_CAP_NONE, .capab = TCA_CAP_NONE,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.act = tcf_mirred, .act = tcf_mirred,
.get_stats = tcf_mirred_stats,
.dump = tcf_mirred_dump, .dump = tcf_mirred_dump,
.cleanup = tcf_mirred_cleanup, .cleanup = tcf_mirred_cleanup,
.lookup = tcf_hash_search, .lookup = tcf_hash_search,
......
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