summaryrefslogtreecommitdiff
path: root/lib/rstp-state-machines.c
diff options
context:
space:
mode:
authorCiara Loftus <ciara.loftus@intel.com>2017-06-23 16:31:03 +0100
committerBen Pfaff <blp@ovn.org>2017-07-11 13:03:08 -0700
commit656238ee92c2f8fde2486af66d113b61ce63a95b (patch)
treed91c91697880063baf9732271a18f78c648d6ba3 /lib/rstp-state-machines.c
parent8a0d9d85b3efa2b107c4e93b7acddb5137fab18b (diff)
downloadopenvswitch-656238ee92c2f8fde2486af66d113b61ce63a95b.tar.gz
dpif-netdev: Fix insertion probability
emc_conditional_insert uses pmd->last_cycles and the packet's RSS hash to generate a random number used to determine whether or not an emc entry should be inserted. This works for single-packet bursts as last_cycles is updated for each burst. However, for bursts > 1 packet, where the packets in the batch generate the same RSS hash, pmd->last_cycles remains constant for the entire burst also, and thus cannot be used as a random number for each packet in the burst. This commit replaces the use of pmd->last_cycles with random_uint32() for this purpose and subsequently fixes the behavior of the emc_insert_inv_prob setting for high-throughput (large bursts) single-flow cases. Fixes: 4c30b24602c3 ("dpif-netdev: Conditional EMC insert") Reported-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Darrell Ball <dlu998@gmail.com> Tested-by: Kevin Traynor <ktraynor@redhat.com> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/rstp-state-machines.c')
0 files changed, 0 insertions, 0 deletions