]> git.proxmox.com Git - mirror_ovs.git/commit - ofproto/bond.c
bond: Unify hash functions in hash action and entry lookup.
authorIlya Maximets <i.maximets@samsung.com>
Tue, 25 Jul 2017 10:46:38 +0000 (13:46 +0300)
committerAndy Zhou <azhou@ovn.org>
Tue, 25 Jul 2017 18:32:43 +0000 (11:32 -0700)
commit42781e77035daad70365e87bb4cda1346efd4ba7
tree1751b0bb3f01ef7a5910a9bfe7063e156342effa
parentecbca23d6f9bd1f25ef4203f13e35f91376d2b53
bond: Unify hash functions in hash action and entry lookup.

'lookup_bond_entry' currently uses 'flow_hash_symmetric_l4' while
OVS_ACTION_ATTR_HASH uses 'flow_hash_5tuple'. This may lead to
inconsistency in slave choosing for the new flows.  In general,
there is no point to unify hash functions, because it's not
required for correct work, but it's logically wrong to use
different hash functions there.

Unfortunately we're not able to use RSS hash here, because we have
no packet at this point, but we may reduce inconsistency by using
'flow_hash_5tuple' instead of 'flow_hash_symmetric_l4' because
symmetric quality is not needed.

'flow_hash_symmetric_l4' was used previously just because there
was no other implemented hash function at the moment and L2
fields was additionally involved in hash calculation. Now we
have 5tuple hash and L2 not used anymore, so, we may replace the
old function.

'flow_hash_5tuple' is preferable solution because it in 2 - 8 times
(depending on the flow) faster than symmetric function.
So, this change will also speed up handling of the new flows and
statistics accounting.

Additionally function 'bond_hash_tcp()' was removed for the reasons
of code simplification and possible additional speed up.

Co-authored-by: Andy Zhou <azhou@ovn.org>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
ofproto/bond.c