[ovs-discuss] flow hash calculation in open vswitch.

mandar284 at aim.com mandar284 at aim.com
Wed Apr 14 06:38:00 UTC 2010


 

 We are trying to control FTP traffic and for that we need support of port range.
We have updated? struct odp_flow_key and struct ofp_match to support port range ( for eg: 'tp_src'? as lower port limit and 'tp_src1' as upper port limit).
The memcmp of flow key is been replaced by individual struct member compare with an extra? port range bound check.
Still we are few steps short, can you suggest where else is the changes are needed ?

Thanks,
--Mandar




-----Original Message-----
From: Ben Pfaff <blp at nicira.com>
To: mandar284 at aim.com
Cc: discuss at openvswitch.org
Sent: 14-Apr-2010 00:39:29 +0000
Subject: Re: [ovs-discuss] flow hash calculation in open vswitch.

 
 
 
On Wed, Apr 14, 2010 at 12:26:59AM -0400, mandar284 at aim.com wrote: 
> Does all the members of struct odp_flow_key? are used in hash calculation ? 
 
Yes. 
 
> Can you please elaborate the parameters used in hash calculations? 
 
The code that calculates the hash is in datapath/flow.c: 
 
static u32 flow_hash(const struct dp_table *table, 
                     const struct odp_flow_key *key) 
{ 
        return jhash2((u32*)key, sizeof *key / sizeof(u32), table->hash_seed); 
} 
 
The only "parameter" here is table->hash_seed, which is randomly 
generated when the flow table is created. 
 
 

  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20100414/a5170f9e/attachment-0001.html>


More information about the discuss mailing list