On Tue, Mar 06, 2018 at 11:23:28AM -0800, yipeng wang wrote:
> From: Yipeng Wang <yipeng1.w...@intel.com>
> 
> It is not memory efficient to store pointers in the distributor.
> In this commit, we store a 2 Byte index which is the index into
> flow_table. If the flow table is larger than 2^16, the rules
> store in the high index entry will not be cached in distributor.
> We assume rule count is usually not that large.
> 
> In cmap, we add two APIs to support find flow by index and find
> index by flow. Since flow table is a cuckoo hash, it is possible
> that keys are moved around and also table is rehashed.
> In such case, distributor will have misses and
> refresh by itself. However, this should not happen frequently and
> distributor as a cache should not cause functional error.
> 
> Comparing to commit 1, this commit reduce cache/memory requirement by half.
> DFC sweeping is also removed to simplify the code since DFC does not hold
> pointers to flow any more.
> 
> Signed-off-by: Yipeng Wang <yipeng1.w...@intel.com>

Thanks for working to making OVS better!

I'm taking a look at this patch, in particular, because it affects the
cmap common data structure.  I don't plan to review the whole series or
even the non-cmap parts of this one.

In cmap.c, it's not really obvious to me what cmap_find_index() or
cmap_find_index() does.  I suggest adding function-level comments
explaining the purpose, semantics, and return value of the functions.

In cmap.h, the style for the prototypes doesn't match the style used for
any of the other prototypes in the file, or the common OVS style.
Please do adjust them to match.

Thanks,

Ben.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to