ofproto-dpif: Make bonding balance test more robust

It is my observation that when sending 91 packets to a mode=balance
bond interface with three underlying ports in some cases not all ports
receive at least 7 packets. This causes the test to fail.

It may be that failure indicates that the bonding code
needs improvement. But it seems to me that its more likely to
be a valid behaviour.

I have found that by sending 256 packets instead of 91 the test passes
more reliably: I am yet to see it fail.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andy Zhou <azhou@nicira.com>
ofproto: Fix potential leak during flow mods.

This code created a cls_rule without destroying it.  Found by
inspection.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofproto: Fix is_flow_deletion_pending() false positive.

If one tries to install a rule that's identical to another rule in
another OpenFlow table which is being deleted, it's possible that
is_flow_deletion_pending() might confuse them and block the
installation.  This is such an edge case I doubt it has ever actually
happened.

Found by inspection.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>