ofproto-dpif: Implement "flow setup governor" to speed up many short flows.
authorBen Pfaff <blp@nicira.com>
Thu, 19 Apr 2012 00:11:10 +0000 (17:11 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 19 Apr 2012 03:37:58 +0000 (20:37 -0700)
commit9d6ac44e2b584b34bc7e14f2daa7bb0bdfab16ab
tree80516c2c4d143e94bbabeca013e3c67354dd2d73
parent5fe20d5da471aa2d966834bdeb87b3a63c24340e
ofproto-dpif: Implement "flow setup governor" to speed up many short flows.

The cost of creating and initializing facets and subfacets and installing,
tracking, and uninstalling kernel flows is significant.  When most flows
have only one or a few packets, this overhead is higher than the cost of
handling each packet individually.  This commit introduces heuristics that
cheaply count (approximately) the number of packets seen in a flow and
skips most of this expensive bookkeeping until the packet count exceeds a
threshold (currently 5 packets).

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/automake.mk
ofproto/ofproto-dpif-governor.c [new file with mode: 0644]
ofproto/ofproto-dpif-governor.h [new file with mode: 0644]
ofproto/ofproto-dpif.c