netdev
[Top] [All Lists]

[PATCH 5/8] pedit: use gnet_stats for action stats

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [PATCH 5/8] pedit: use gnet_stats for action stats
From: Thomas Graf <tgraf@xxxxxxx>
Date: Wed, 3 Nov 2004 23:01:33 +0100
Cc: netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx
In-reply-to: <20041103215816.GA12289@xxxxxxxxxxxxxx>
References: <20041103215816.GA12289@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
Signed-off-by: Thomas Graf <tgraf@xxxxxxx>

diff -Nru linux-2.6.10-rc1-bk11.orig/net/sched/pedit.c 
linux-2.6.10-rc1-bk11/net/sched/pedit.c
--- linux-2.6.10-rc1-bk11.orig/net/sched/pedit.c        2004-11-02 
11:43:27.000000000 +0100
+++ linux-2.6.10-rc1-bk11/net/sched/pedit.c     2004-11-02 12:11:11.000000000 
+0100
@@ -183,10 +183,10 @@
        }
 
 bad:
-       p->stats.overlimits++;
+       p->qstats.overlimits++;
 done:
-       p->stats.bytes += skb->len;
-       p->stats.packets++;
+       p->bstats.bytes += skb->len;
+       p->bstats.packets++;
        spin_unlock(&p->lock);
        return p->action;
 }
@@ -255,17 +255,6 @@
        return -1;
 }
 
-int
-tcf_pedit_stats(struct sk_buff *skb, struct tc_action *a)
-{
-       struct tcf_pedit *p;
-       p = PRIV(a,pedit);
-       if (NULL != p)
-               return qdisc_copy_stats(skb, &p->stats, p->stats_lock);
-
-       return 1;
-}
-
 static
 struct tc_action_ops act_pedit_ops = {
        .kind           =       "pedit",
@@ -273,7 +262,6 @@
        .capab          =       TCA_CAP_NONE,
        .owner          =       THIS_MODULE,
        .act            =       tcf_pedit,
-       .get_stats      =       tcf_pedit_stats,
        .dump           =       tcf_pedit_dump,
        .cleanup        =       tcf_pedit_cleanup,
        .lookup         =       tcf_hash_search,

<Prev in Thread] Current Thread [Next in Thread>