[ovs-dev] [PATCH 01/10] lib/flow: Simplify miniflow accessors, add ipv6 support.
Ethan Jackson
ethan at nicira.com
Fri Apr 25 00:15:30 UTC 2014
In the commit message s/suppoort/support/
Out of curiosity why replace the miniflow_get inline functions with macros?
> + /* Separate loops for better optimization. */
Why do we need separate loops? You think it somehow improves the
branch predictor or something? Does this actually help? It smells
like premature optimization.
> + hash = mhash_add(hash, saddr[0]);
> + hash = mhash_add(hash, saddr[1]);
> + hash = mhash_add(hash, saddr[2]);
> + hash = mhash_add(hash, saddr[3]);
> + hash = mhash_add(hash, daddr[0]);
> + hash = mhash_add(hash, daddr[1]);
> + hash = mhash_add(hash, daddr[2]);
> + hash = mhash_add(hash, daddr[3]);
Maybe use a loop?
Acked-by: Ethan Jackson <ethan at nicira.com>
More information about the dev
mailing list