On Mon, Sep 12, 2016 at 01:52:39PM -0700, Jarno Rajahalme wrote: > Use ofproto_flow_mod with a reference to an existing or new rule > instead of ofputil_flow_mod for learn action execution from xlate > cache > > Typically we would find that when a learn xlate cache entry is > created, a preceding upcall has already created the learned flow. In > this case the xlate cache entry takes a reference to that flow and > keeps refreshing it without needing to perform any flow table lookups. > Otherwise the creation of the xlate cache entry creates the new rule, > which is then subsequently added to the classifier. In both cases > this is both faster and shrinks the memory cost of each learn cache > entry from ~3.5kb to about 0.3kb. > > If the learned rule does not yet exist, it is created and attached to > the ofproto_flow_mod, from which it is then added. If the referred > rule happens to expire, or is modified in any way and is thus removed > from the classifier tables, we create a new rule using the old rule as > a template, so that we can avoid storing the ofputil_flow_mod in all > cases. > > Signed-off-by: Jarno Rajahalme <ja...@ovn.org> > --- > v3: Fixed error handling, simplified reference keeping.
Thanks for implementing this! Acked-by: Ben Pfaff <b...@ovn.org> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev