netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com, hadi@cyberus.ca
Subject: [PATCH 8/8] cls_*: use tcf_police_dump_stats to dump via new gnet_stats API
Date: Wed, 3 Nov 2004 23:03:11 +0100	[thread overview]
Message-ID: <20041103220311.GI12289@postel.suug.ch> (raw)
In-Reply-To: <20041103215816.GA12289@postel.suug.ch>

Signed-off-by: Thomas Graf <tgraf@suug.ch>

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;

  parent reply	other threads:[~2004-11-03 22:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 21:58 [PATCHSET 0/8] PKT_SCHED: Use gnet_stats for actions and policer Thomas Graf
2004-11-03 21:59 ` [PATCH 1/8] tcf_action: copy generic stats via TCA_ACT_STATS Thomas Graf
2004-11-03 21:59 ` [PATCH 2/8] gact: use gnet_stats for action stats Thomas Graf
2004-11-03 22:00 ` [PATCH 3/8] ipt: " Thomas Graf
2004-11-03 22:01 ` [PATCH 4/8] mirred: " Thomas Graf
2004-11-03 22:01 ` [PATCH 5/8] pedit: " Thomas Graf
2004-11-03 22:02 ` [PATCH 6/8] police: use gnet_stats for action policer stats Thomas Graf
2004-11-03 22:02 ` [PATCH 7/8] police: use gnet_stats for old " Thomas Graf
2004-11-03 22:03 ` Thomas Graf [this message]
2004-11-03 22:18 ` [PATCHSET 0/8] PKT_SCHED: Use gnet_stats for actions and policer David S. Miller
2004-11-04  0:43   ` Thomas Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041103220311.GI12289@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).