netflow: Back-out optimization that could lead to infinite loop
authorJustin Pettit <jpettit@nicira.com>
Tue, 12 Oct 2010 18:24:04 +0000 (11:24 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 12 Oct 2010 18:33:16 +0000 (11:33 -0700)
commitc06955bc63bf504fc6fa87fd9780993bc45cad09
tree1f12a506ed8f9c3420122e06cb1554f27b42be9c
parentf1670a487adf5d5352eaf32f15bcf2958cdb1771
netflow: Back-out optimization that could lead to infinite loop

Commit 924282 (netflow: Do 64-bit division less often.) attempted to
remove the 64-bit division used to break flow records with large byte
counts into multiple NetFlow records.  The calculation to determine the
number of records was incorrect and should have shifted "byte_delta" by
31 instead of 32.  This commit reverts the change (while keeping commit
f22a24 (netflow: Avoid (theoretically) looping 2**32 times.) ), since
the logic is more straight-forward than the optimized version.

Bug #3813
ofproto/netflow.c