ofproto: Avoid extra O(N) work in common case on flow addition.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Aug 2013 00:38:40 +0000 (17:38 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 16 Aug 2013 01:00:14 +0000 (18:00 -0700)
commitc09f755dff4a7c0f78d59d1388461be3ec7e6895
tree1b0ab23578530c4cdf310e1d8ed4f51ce1f619e4
parent448a4b2fc74b9d3884f3702c4b8801eb0d443f10
ofproto: Avoid extra O(N) work in common case on flow addition.

The OpenFlow OFPFF_CHECK_OVERLAP flag requires us to check whether the flow
being inserted overlaps with any existing flows.  That isn't efficiently
implemented and typically requires us to compare the new flow against most
or all of the existing flows.  We don't have to do that work if
OFPFF_CHECK_OVERLAP is not requested, but commit 0b4f207828c (classifier:
Make use of the classifier thread safe.) inadvertently made us do it
anyway.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto.c