ofproto-dpif: Avoid searching all subfacets when creating first in a facet.
authorBen Pfaff <blp@nicira.com>
Mon, 13 Aug 2012 16:30:26 +0000 (09:30 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Aug 2012 15:09:40 +0000 (08:09 -0700)
commit3b145dd7c001eb22f520b5ffd4179aaec59ebffe
treedbe28151415ba325082704b743e459bf6c452ddc
parent25f78c28faf4f3e059a006c8423b701fe9e9e77c
ofproto-dpif: Avoid searching all subfacets when creating first in a facet.

When we create the first subfacet within a facet, we know that there
cannot be an existing subfacet with the same key, so we can skip the search
through the ofproto's table of subfacets.

This is a small optimization, but it should not affect the flow setup rate
in most benchmarks, because in the stressful situations that benchmarks
create, OVS does not set up flows.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c