All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: hadi@cyberus.ca
Cc: Andrew Morton <akpm@osdl.org>, Thomas Cataldo <tomc@compaqnet.fr>,
	linux-kernel@vger.kernel.org, netdev@oss.sgi.com, tgraf@suug.ch,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: Hard freeze with 2.6.10-rc3 and QoS, worked fine with 2.6.9
Date: Tue, 07 Dec 2004 17:59:52 +0100	[thread overview]
Message-ID: <41B5E188.5050800@trash.net> (raw)
In-Reply-To: <1102422544.1088.98.camel@jzny.localdomain>

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

jamal wrote:

>Can you do a: 
>tc -V
>
>This seems to point to probably be a backward compat issue which was
>overlooked in the stats.
>
That's also what I thought at first. But the problem is in
tcf_action_copy_stats, it assumes a->priv has the same layout as
struct tcf_act_hdr, which is not true for struct tcf_police. This
patch rearranges struct tcf_police to match tcf_act_hdr.

Signed-off-by: Patrick McHardy <kaber@trash.net>


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1479 bytes --]

===== include/net/act_api.h 1.4 vs edited =====
--- 1.4/include/net/act_api.h	2004-11-06 01:33:12 +01:00
+++ edited/include/net/act_api.h	2004-12-07 17:53:37 +01:00
@@ -8,15 +8,23 @@
 #include <net/sch_generic.h>
 #include <net/pkt_sched.h>
 
+#define tca_gen(name) \
+struct tcf_##name *next; \
+	u32 index; \
+	int refcnt; \
+	int bindcnt; \
+	u32 capab; \
+	int action; \
+	struct tcf_t tm; \
+	struct gnet_stats_basic bstats; \
+	struct gnet_stats_queue qstats; \
+	struct gnet_stats_rate_est rate_est; \
+	spinlock_t *stats_lock; \
+	spinlock_t lock
+
 struct tcf_police
 {
-	struct tcf_police *next;
-	int		refcnt;
-#ifdef CONFIG_NET_CLS_ACT
-	int		bindcnt;
-#endif
-	u32		index;
-	int		action;
+	tca_gen(police);
 	int		result;
 	u32		ewma_rate;
 	u32		burst;
@@ -24,33 +32,14 @@
 	u32		toks;
 	u32		ptoks;
 	psched_time_t	t_c;
-	spinlock_t	lock;
 	struct qdisc_rate_table *R_tab;
 	struct qdisc_rate_table *P_tab;
-
-	struct gnet_stats_basic bstats;
-	struct gnet_stats_queue qstats;
-	struct gnet_stats_rate_est rate_est;
-	spinlock_t	*stats_lock;
 };
 
 #ifdef CONFIG_NET_CLS_ACT
 
 #define ACT_P_CREATED 1
 #define ACT_P_DELETED 1
-#define tca_gen(name) \
-struct tcf_##name *next; \
-	u32 index; \
-	int refcnt; \
-	int bindcnt; \
-	u32 capab; \
-	int action; \
-	struct tcf_t tm; \
-	struct gnet_stats_basic bstats; \
-	struct gnet_stats_queue qstats; \
-	struct gnet_stats_rate_est rate_est; \
-	spinlock_t *stats_lock; \
-	spinlock_t lock
 
 struct tcf_act_hdr
 {

  reply	other threads:[~2004-12-07 17:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-07  0:47 Hard freeze with 2.6.10-rc3 and QoS, worked fine with 2.6.9 Thomas Cataldo
2004-12-07  6:35 ` Patrick McHardy
2004-12-07  6:44 ` Andrew Morton
2004-12-07 12:29   ` jamal
2004-12-07 16:59     ` Patrick McHardy [this message]
2004-12-07 17:07       ` Thomas Graf
2004-12-07 17:23         ` Patrick McHardy
2004-12-08  4:27           ` jamal
2004-12-08  4:41             ` Jamal Hadi Salim
2004-12-08  5:17               ` Patrick McHardy
2004-12-08 12:31                 ` jamal
2004-12-08 14:32                   ` Thomas Graf
2004-12-08 14:59                     ` Thomas Graf
2004-12-08 15:06                       ` jamal
2004-12-08 15:05                     ` jamal
2004-12-08 17:30                       ` Thomas Graf
2004-12-08  5:30           ` David S. Miller
2004-12-08 12:04             ` jamal
2004-12-08 16:57               ` Patrick McHardy
2004-12-08 19:30                 ` Stephen Hemminger
2004-12-08 19:49                   ` jamal
2004-12-08 19:44                 ` jamal

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=41B5E188.5050800@trash.net \
    --to=kaber@trash.net \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=tgraf@suug.ch \
    --cc=tomc@compaqnet.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.