netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: action stats double dip
@ 2005-03-25 16:25 jamal
  2005-03-25 16:41 ` jamal
  0 siblings, 1 reply; 11+ messages in thread
From: jamal @ 2005-03-25 16:25 UTC (permalink / raw)
  To: David S. Miller; +Cc: Thomas Graf, netdev

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]


Dave,

Following patch fixes a scenario where we have forward compatibility
but action stats being double dipped. 

cheers,
jamal


[-- Attachment #2: p_st2 --]
[-- Type: text/plain, Size: 1654 bytes --]

--- a/net/sched/cls_u32.c	2005/03/25 15:11:01	1.1
+++ b/net/sched/cls_u32.c	2005/03/25 15:44:01
@@ -783,7 +783,7 @@
 	}
 
 	rta->rta_len = skb->tail - b;
-	if (TC_U32_KEY(n->handle))
+	if (TC_U32_KEY(n->handle) && n->exts.action && n->exts.action->type == TCA_OLD_COMPAT)
 		if (tcf_exts_dump_stats(skb, &n->exts, &u32_ext_map) < 0)
 			goto rtattr_failure;
 	return skb->len;
--- a/net/sched/cls_tcindex.c	2005/03/25 16:04:46	1.1
+++ b/net/sched/cls_tcindex.c	2005/03/25 16:05:20
@@ -496,8 +496,9 @@
 			goto rtattr_failure;
 		rta->rta_len = skb->tail-b;
 
-		if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
-			goto rtattr_failure;
+		if (n->exts.action && n->exts.action->type == TCA_OLD_COMPAT)
+			if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
+				goto rtattr_failure;
 	}
 	
 	return skb->len;
--- a/net/sched/cls_fw.c	2005/03/25 15:48:27	1.1
+++ b/net/sched/cls_fw.c	2005/03/25 16:02:22
@@ -338,8 +338,9 @@
 
 	rta->rta_len = skb->tail - b;
 
-	if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
-		goto rtattr_failure;
+	if (n->exts.action && n->exts.action->type == TCA_OLD_COMPAT)
+		if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
+			goto rtattr_failure;
 
 	return skb->len;
 
--- a/net/sched/cls_route.c	2005/03/25 16:03:11	1.1
+++ b/net/sched/cls_route.c	2005/03/25 16:04:34
@@ -599,8 +599,9 @@
 
 	rta->rta_len = skb->tail - b;
 
-	if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
-		goto rtattr_failure;
+	if (n->exts.action && n->exts.action->type == TCA_OLD_COMPAT)
+		if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
+			goto rtattr_failure;
 
 	return skb->len;
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-03-25 23:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-25 16:25 PATCH: action stats double dip jamal
2005-03-25 16:41 ` jamal
2005-03-25 17:37   ` David S. Miller
2005-03-25 20:06   ` Thomas Graf
2005-03-25 20:25     ` jamal
2005-03-25 20:41       ` Thomas Graf
2005-03-25 21:39         ` jamal
2005-03-25 21:58           ` Thomas Graf
2005-03-25 23:06             ` jamal
2005-03-25 23:24               ` Thomas Graf
2005-03-25 23:59                 ` Thomas Graf

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).