summaryrefslogtreecommitdiff
path: root/colors.h
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-15 13:14:26 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-15 13:14:26 +0200
commit721fb0de29e78a1cfd5d759758c69830333d7699 (patch)
tree05d9435f51ef9746b91e514a7dfd73615422167e /colors.h
parent98ed56c545ab58aa747c408ffa7d5a2ff9678618 (diff)
trafgen: fix -n1 bug for packet scheduling
In the current situation, it can happen when we set -n1, that no packet at all will be scheduled. This is due to the case that nearbyint() will for e.g. 2 cpus round to 0 each, and since in __correct_global_delta() we only correct a total delta when a particular CPU is allowed to tx packets (means already has a num > 0), then we correct the delta on the first such CPU. Switch to using round(), so that on 0.5 it will be round to the next higher int, and fix the check to >= 0 in __correct_global_delta() so that a CPU could also get a 0 share of packets. I did a couple of tests with different -n params and cpu(..) configs and this seems to fix that. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'colors.h')
0 files changed, 0 insertions, 0 deletions
5a98a4a4f77ef47'>logplain -rw-r--r--emu10k1_synth_local.h1535logplain -rw-r--r--emu10k1x.c48876logplain -rw-r--r--emufx.c101572logplain -rw-r--r--emumixer.c68824logplain -rw-r--r--emumpu401.c11428logplain -rw-r--r--emupcm.c58692logplain -rw-r--r--emuproc.c21057logplain -rw-r--r--io.c16190logplain -rw-r--r--irq.c6754logplain -rw-r--r--memory.c16163logplain -rw-r--r--p16v.c29109logplain -rw-r--r--p16v.h14922logplain