* Kernel patch for cls_u32.c
@ 2001-10-10 12:06 Thierry Coutelier
2001-10-11 0:40 ` David S. Miller
2001-10-11 18:53 ` David Weinehall
0 siblings, 2 replies; 3+ messages in thread
From: Thierry Coutelier @ 2001-10-10 12:06 UTC (permalink / raw)
To: lartc, linux-kernel; +Cc: Kuznet
To solve a problem while listing filters you may add this patch.
It works for all kernel versions from 2.4.6 to 2.4.11
It wold be cool to have it in the next kernel release.
---
diff -ur 2.4.6/linux/net/sched/cls_u32.c linux/net/sched/cls_u32.c
--- 2.4.6/linux/net/sched/cls_u32.c Thu Feb 1 23:06:10 2001
+++ linux/net/sched/cls_u32.c Wed Jul 11 23:55:23 2001
@@ -613,7 +613,8 @@
for (ht = tp_c->hlist; ht; ht = ht->next) {
if (arg->count >= arg->skip) {
- if (arg->fn(tp, (unsigned long)ht, arg) < 0) {
+ if (ht == tp->root &&
+ arg->fn(tp, (unsigned long)ht, arg) < 0) {
arg->stop = 1;
return;
}
@@ -625,7 +626,8 @@
arg->count++;
continue;
}
- if (arg->fn(tp, (unsigned long)n, arg) < 0) {
+ if (ht == tp->root &&
+ arg->fn(tp, (unsigned long)n, arg) < 0) {
arg->stop = 1;
return;
}
---
Thierry.Coutelier@linux.lu
http://www.linux.lu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel patch for cls_u32.c
2001-10-10 12:06 Kernel patch for cls_u32.c Thierry Coutelier
@ 2001-10-11 0:40 ` David S. Miller
2001-10-11 18:53 ` David Weinehall
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2001-10-11 0:40 UTC (permalink / raw)
To: Thierry.Coutelier; +Cc: lartc, linux-kernel, Kuznet
From: Thierry Coutelier <Thierry.Coutelier@linux.lu>
Date: Wed, 10 Oct 2001 14:06:03 +0200
To solve a problem while listing filters you may add this patch.
It works for all kernel versions from 2.4.6 to 2.4.11
It wold be cool to have it in the next kernel release.
What is the "problem"? Why should it only call the walker function
on entries which equal tp->root? This change doesn't make any sense
to me.
You need to describe the problem and how your changes solve
that problem.
Franks a lot,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel patch for cls_u32.c
2001-10-10 12:06 Kernel patch for cls_u32.c Thierry Coutelier
2001-10-11 0:40 ` David S. Miller
@ 2001-10-11 18:53 ` David Weinehall
1 sibling, 0 replies; 3+ messages in thread
From: David Weinehall @ 2001-10-11 18:53 UTC (permalink / raw)
To: Thierry Coutelier; +Cc: lartc, linux-kernel, Kuznet
On Wed, Oct 10, 2001 at 02:06:03PM +0200, Thierry Coutelier wrote:
> To solve a problem while listing filters you may add this patch.
> It works for all kernel versions from 2.4.6 to 2.4.11
> It wold be cool to have it in the next kernel release.
>
> ---
> diff -ur 2.4.6/linux/net/sched/cls_u32.c linux/net/sched/cls_u32.c
> --- 2.4.6/linux/net/sched/cls_u32.c Thu Feb 1 23:06:10 2001
> +++ linux/net/sched/cls_u32.c Wed Jul 11 23:55:23 2001
> @@ -613,7 +613,8 @@
>
> for (ht = tp_c->hlist; ht; ht = ht->next) {
> if (arg->count >= arg->skip) {
> - if (arg->fn(tp, (unsigned long)ht, arg) < 0) {
> + if (ht == tp->root &&
> + arg->fn(tp, (unsigned long)ht, arg) < 0) {
> arg->stop = 1;
> return;
> }
> @@ -625,7 +626,8 @@
> arg->count++;
> continue;
> }
> - if (arg->fn(tp, (unsigned long)n, arg) < 0) {
> + if (ht == tp->root &&
> + arg->fn(tp, (unsigned long)n, arg) < 0) {
> arg->stop = 1;
> return;
> }
Yeuch! The author of this code REALLY needs to read
Documentation/CodingStyle
Indentation by 1 (!) single space is by far the ugliest thing I've seen
so far.
/David Weinehall
_ _
// David Weinehall <tao@acc.umu.se> /> Northern lights wander \\
// Project MCA Linux hacker // Dance across the winter sky //
\> http://www.acc.umu.se/~tao/ </ Full colour fire </
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-10-11 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-10 12:06 Kernel patch for cls_u32.c Thierry Coutelier
2001-10-11 0:40 ` David S. Miller
2001-10-11 18:53 ` David Weinehall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox