Subject: Re: [PATCH] improvement on net/sched/cls_fw.c's hash function

From: Wang Jian <[email-masked]>
Date: Tue, 05 Apr 2005 20:39:41 +0800

Hi Thomas Graf,

On Tue, 5 Apr 2005 14:16:05 +0200, Thomas Graf <[email-masked]> wrote:

> 
> What I'm worried about is that we lose the zero collisions behaviour
> for the most popular use case.

If a web interface is used to generate netfilter/tc rules that use
nfmark, then the above assumption is false. nfmark will be used
incrementally and wrapped back to 0 somewhere like process id. So zero
collision is not likely.

When linux's QoS control capability is widely used, such web interface
sooner or later comes into being.
 
> New idea: we make this configureable and allow 3 types of hash functions:
>  1) default as-is, perfect for marks 0..255
>  2) all bits taken into account (your patch)
>  3) bitmask + shift provided by the user just like
>     dsmark.
> 
> Thoughts?

Your suggestion is very considerable. But that needs some more work. And,
isn't that some bloated?

-- 
  lark