Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread David Miller
From: Thomas Graf <[EMAIL PROTECTED]> Date: Tue, 26 Sep 2006 13:59:10 +0200 > Prevents filters from being added if the first generated > handle already exists. > > Signed-off-by: Kim Nordlund <[EMAIL PROTECTED]> > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Applied, I'll push this to -stable

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread David Miller
From: "Nordlund Kim (Nokia-NET/Helsinki)" <[EMAIL PROTECTED]> Date: Wed, 27 Sep 2006 14:45:21 +0300 (EEST) > But for signed types it falls under this: > > 6.5 Expressions > 5 If an exceptional condition occurs during the evaluation of an > expression (that is, if the > result is n

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread Nordlund Kim (Nokia-NET/Helsinki)
On Wed, 27 Sep 2006, ext Thomas Graf wrote: > gcc >= 4.1 seems to produce this code with either -Os or -O2 > so the range of affected useres might in fact be bigger. I believe gcc >= 4.1 is just updating to match ISO/IEC 9899:1999: This piece of code crosses undefined behaviour as defined in

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2006-09-27 11:44 > Thomas Graf wrote: > > * Nordlund Kim (Nokia-NET/Helsinki) <[EMAIL PROTECTED]> 2006-09-27 11:50 > > > >>So I would suggest to apply this patch to be compatible with the > >>GCC version in RHEL5, and simply to make code clearer (to the > >>in

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread Patrick McHardy
Thomas Graf wrote: > * Nordlund Kim (Nokia-NET/Helsinki) <[EMAIL PROTECTED]> 2006-09-27 11:50 > >>So I would suggest to apply this patch to be compatible with the >>GCC version in RHEL5, and simply to make code clearer (to the >>intended idea). > > > Yes. I don't care much about this small chan

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread Thomas Graf
* Nordlund Kim (Nokia-NET/Helsinki) <[EMAIL PROTECTED]> 2006-09-27 11:50 > basic_change() won't work without this patch if we compile the > kernel with the GCC version in RHEL5... > > gcc version 4.1.1 20060817 (Red Hat 4.1.1-18) > > which optimizes the code like this (objdump -S inttest.c) ... >

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-27 Thread Nordlund Kim (Nokia-NET/Helsinki)
On Tue, 26 Sep 2006, ext Thomas Graf wrote: > You're right, 0x8000 - 1 is already positive. Ignore the patch. basic_change() won't work without this patch if we compile the kernel with the GCC version in RHEL5... gcc version 4.1.1 20060817 (Red Hat 4.1.1-18) which optimizes the code like t

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-26 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2006-09-26 15:32 > Thomas Graf wrote: > > Prevents filters from being added if the first generated > > handle already exists. > > > > Signed-off-by: Kim Nordlund <[EMAIL PROTECTED]> > > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> > > > > Index: net-2.6/net

Re: [PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-26 Thread Patrick McHardy
Thomas Graf wrote: > Prevents filters from being added if the first generated > handle already exists. > > Signed-off-by: Kim Nordlund <[EMAIL PROTECTED]> > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> > > Index: net-2.6/net/sched/cls_basic.c > ==

[PKT_SCHED] cls_basic: Use unsigned int when generating handle

2006-09-26 Thread Thomas Graf
Prevents filters from being added if the first generated handle already exists. Signed-off-by: Kim Nordlund <[EMAIL PROTECTED]> Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Index: net-2.6/net/sched/cls_basic.c === --- net-2.6.orig/