ofproto-dpif: xlate actions once with subfacets.
authorEthan Jackson <ethan@nicira.com>
Thu, 21 Mar 2013 18:17:00 +0000 (11:17 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 21 Mar 2013 20:18:38 +0000 (13:18 -0700)
commit5c0243a9db5cdb2a2751caa834534687730c6141
tree754c28fc75607c2e07a8fcb882a8fde2f151f971
parent1b035ef20084e14b90537fb3873af99f45d40e34
ofproto-dpif: xlate actions once with subfacets.

Before this patch, when ofproto-dpif decided that a particular flow
miss needed a facet, it would do action translation multiple times.
Once in subfacet_make_actions(), and once per packet in
subfacet_update_stats().  In the common case (once per miss), this
would double the amount of work required in xlate_actions().

The call to facet_push_stats() in subfacet_update_stats() is
unnecessary.  If the packets are simply accounted to the facet,
they will eventually be pushed to the relevant rules in
update_stats() or when the facet is removed.   Removing the
unnecessary step gives us a 20% improvement of the netperf TCP_CRR
benchmark with the complex flow tables installed by our controller.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c
tests/ofproto-dpif.at