ofproto: Drop flows from datapath more quickly under heavy load.
authorBen Pfaff <blp@nicira.com>
Thu, 7 Oct 2010 23:44:32 +0000 (16:44 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 9 Oct 2010 00:18:37 +0000 (17:18 -0700)
commitfcba238dd229ce0edb953161d774f6a3b4161c13
treeb78fe6ab6720b52dfa75b43ad5ac5128cc1f22bf
parent3ad6619bf3f7e1fc879bb74285f0379ac473243f
ofproto: Drop flows from datapath more quickly under heavy load.

In normal operation it makes sense to keep track of all of the flows that
have been seen recently and to cache all of them in the kernel.  Under
unusual conditions, such as those caused by network scanning tools or by an
actual targeted DoS attack against the vswitch, the number of flows can
explode to extremely high numbers (hundreds of thousands or more).  In such
a situation the vswitch needs to guard against memory exhaustion by
expiring flows more quickly and more often.  This commit implements an
inexpensive technique for determining which flows should be dropped in such
a situation.
ofproto/ofproto.c