diff options
| author | Patrick McHardy <kaber@trash.net> | 2004-12-07 05:05:37 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-12-07 05:05:37 -0800 |
| commit | 81563af343960e5f516070006316216fbcdc76d3 (patch) | |
| tree | b16c9ae6f4c2b17a18598d0d8d5f7a270fd6fa78 /include | |
| parent | 7149bf75cc34dbcdbffd559688f7b97ab9685826 (diff) | |
[PKT_SCHED]: Fix hard freeze with QoS in 2.6.10-rc3
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/act_api.h | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index ea9c442c1a55..749637e1694d 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -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 @@ struct tcf_police 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 { |
