[ovs-dev] Hashing: Add truly symmetric L3+L4 fields option for multipath and bundle hashing

Ben Pfaff blp at nicira.com
Thu Jul 2 15:51:56 UTC 2015


Hi Jeroen, thanks for the patch!  The patch was wordwrapped, which made
it troublesome to apply.  Please be careful about that in subsequent
postings.

More below.

On Sun, Jun 28, 2015 at 01:43:20PM -0500, Jeroen van Bemmel wrote:
> The symmetric_l4 function implements a hash over various fields
> including L2 fields such as ethernet source and destination MAC.
> Inspite of its name, there are situations in which this hash does not
> yield symmetric results ( e.g. when using VRRP, where the router
> receives packets on a virtual MAC but responds from its physical MAC )
> 
> This patch adds a new 'symmetric_l3l4' function which is mostly an
> intelligent copy&paste of existing code. It includes only L3 and L4
> fields, including UDP and SCTP ports
> 
> I updated the documentation references that I could find, and tried
> copying some of the symmetric_l3 test cases. However, 'make check'
> wasn't working for me even without these patches, so I left out those
> changes

Can you explain what you mean when you say that make check did not work
for you?  Most of the developers run it routinely, without trouble.

> Signed-off-by:Jeroen van Bemmel <jvb127 at gmail.com>

The space after the : is required.

> Suggested-by: Benn Pfaff <blp at nicira.com>

My name has only one 'n'.

In flow_hash_symmetric_l3l4(), this comment:
+    // Would be nice to use murmur hashing here...
makes me wonder why you did not use murmurhash.  Why not?

I see some coding style violations (see CodingStyle.md), e.g.:

        * Wrong indents.

        * Unexpected spaces inside expressions.

        * Lines much longer than 79 characters.

I suggest adding an item to NEWS to mention the new algorithm.

I think that it is probably time to start giving guidance to users on
their choice of algorithm.  ovs-ofctl(8) is probably the right place for
this.  I'd recommend including a few words on each algorithm and the
rationale for choosing it.

I have another question about the use of port numbers in UDP, but I want
to get Justin in on that so I'll send a second email.

I look forward to v2!

Thanks,

Ben.



More information about the dev mailing list