ofproto: Optimise OpenFlow flow expiry
Optimise OpenFlow flow expiry by placing expirable flows on a list.
This optimises scanning of flows for expiry in two ways:
* Flows that will never expire are not traversed.
This addresses a case seen in the field. With 1,000,000 flows that
are not expirable, this dramatically reduces CPU utilization to
approximately zero.
* Empirically list traversal appears faster than the code it replaces.
With 1,000,000 expirable flows present an otherwise idle system I
observed CPU utilisation of around 20% with the existing code but
around 10% with this new code.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>