ofproto-dpif-xlate: Limit memory and time that translation can consume.
authorBen Pfaff <blp@nicira.com>
Fri, 4 Oct 2013 15:47:16 +0000 (08:47 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 4 Oct 2013 15:47:16 +0000 (08:47 -0700)
commit98b07853dfd6046938c41937d60ce693437c1f25
tree7a4d67174af71e2b3235e601b4bf514284f0861d
parent0585f7a88c7773737095e0eb2cf0f1222c0fed2e
ofproto-dpif-xlate: Limit memory and time that translation can consume.

The resubmit depth has been limited to MAX_RESUBMIT_RECURSION, currently
64, for a long time.  But the flow "actions=resubmit:1, resubmit:2,
output:1" generates about 2**MAX_RESUBMIT_RECURSION output actions,
exhausting memory.  This commit fixes the problem.

Such a flow also requires 2**MAX_RESUBMIT_RECURSION time for translation.
This commit fixes that problem too.

Bug #19277.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ofproto/ofproto-dpif-xlate.c
tests/ofproto-dpif.at
tests/ofproto-macros.at