netdev
[Top] [All Lists]

[PATCH 8/8] cls_*: use tcf_police_dump_stats to dump via new gnet_stats

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [PATCH 8/8] cls_*: use tcf_police_dump_stats to dump via new gnet_stats API
From: Thomas Graf <tgraf@xxxxxxx>
Date: Wed, 3 Nov 2004 23:03:11 +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/cls_fw.c 
linux-2.6.10-rc1-bk11/net/sched/cls_fw.c
--- linux-2.6.10-rc1-bk11.orig/net/sched/cls_fw.c       2004-11-02 
11:43:27.000000000 +0100
+++ linux-2.6.10-rc1-bk11/net/sched/cls_fw.c    2004-11-02 13:53:52.000000000 
+0100
@@ -395,11 +395,9 @@
        }
 #else /* CONFIG_NET_CLS_ACT */
 #ifdef CONFIG_NET_CLS_POLICE
-       if (f->police) {
-               if (qdisc_copy_stats(skb, &f->police->stats,
-                       f->police->stats_lock))
+       if (f->police)
+               if (tcf_police_dump_stats(skb, f->police) < 0)
                        goto rtattr_failure;
-       }
 #endif /* CONFIG_NET_CLS_POLICE */
 #endif /* CONFIG_NET_CLS_ACT */
        return skb->len;
diff -Nru linux-2.6.10-rc1-bk11.orig/net/sched/cls_route.c 
linux-2.6.10-rc1-bk11/net/sched/cls_route.c
--- linux-2.6.10-rc1-bk11.orig/net/sched/cls_route.c    2004-11-02 
11:43:27.000000000 +0100
+++ linux-2.6.10-rc1-bk11/net/sched/cls_route.c 2004-11-02 13:53:52.000000000 
+0100
@@ -566,11 +566,9 @@
 
        rta->rta_len = skb->tail - b;
 #ifdef CONFIG_NET_CLS_POLICE
-       if (f->police) {
-               if (qdisc_copy_stats(skb, &f->police->stats,
-                                    f->police->stats_lock))
+       if (f->police)
+               if (tcf_police_dump_stats(skb, f->police) < 0)
                        goto rtattr_failure;
-       }
 #endif
        return skb->len;
 
diff -Nru linux-2.6.10-rc1-bk11.orig/net/sched/cls_rsvp.h 
linux-2.6.10-rc1-bk11/net/sched/cls_rsvp.h
--- linux-2.6.10-rc1-bk11.orig/net/sched/cls_rsvp.h     2004-11-02 
11:43:27.000000000 +0100
+++ linux-2.6.10-rc1-bk11/net/sched/cls_rsvp.h  2004-11-02 13:53:52.000000000 
+0100
@@ -631,11 +631,9 @@
 
        rta->rta_len = skb->tail - b;
 #ifdef CONFIG_NET_CLS_POLICE
-       if (f->police) {
-               if (qdisc_copy_stats(skb, &f->police->stats,
-                                    f->police->stats_lock))
+       if (f->police)
+               if (tcf_police_dump_stats(skb, f->police) < 0)
                        goto rtattr_failure;
-       }
 #endif
        return skb->len;
 
diff -Nru linux-2.6.10-rc1-bk11.orig/net/sched/cls_u32.c 
linux-2.6.10-rc1-bk11/net/sched/cls_u32.c
--- linux-2.6.10-rc1-bk11.orig/net/sched/cls_u32.c      2004-11-02 
11:43:27.000000000 +0100
+++ linux-2.6.10-rc1-bk11/net/sched/cls_u32.c   2004-11-02 13:53:52.000000000 
+0100
@@ -775,11 +775,9 @@
        }
 #else
 #ifdef CONFIG_NET_CLS_POLICE
-       if (TC_U32_KEY(n->handle) && n->police) {
-               if (qdisc_copy_stats(skb, &n->police->stats,
-                                    n->police->stats_lock))
+       if (TC_U32_KEY(n->handle) && n->police)
+               if (tcf_police_dump_stats(skb, n->police) < 0)
                        goto rtattr_failure;
-       }
 #endif
 #endif
        return skb->len;

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