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:52:18 +0000 (11:52 -0700)
commitf3dbabf1342a15e86c9806fae850ce446438b284
treef954b4ef2ce18343a30d35ee1c3d5ef68271a8aa
parent0dfae8613ef3e5dc9bae8fa2a671510d5752b3b1
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