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>
Fri, 22 Mar 2013 21:44:34 +0000 (14:44 -0700)
commit8a02b5ee895add9b5ec4407ad5e525654a41a3dc
treeb8e9c0947504b3c93d83fee056b9119a1ecf35e9
parent99c8d7931003c800db581d3fe734186d011ea896
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