diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-04-30 13:08:12 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-04-30 13:11:03 +0200 |
commit | 190dc7879a1a8813f2332ee7b39b743a49ac2771 (patch) | |
tree | 57f6bb3fde75588a35bb2c0c0fb5b282ec35fd7c | |
parent | 0ce9ef48153cf719c56894593bfb634cd4046647 (diff) |
trafgen: Don't expose -k/--kernel-pull anymore and warn if it still used
The -k/--kernel-pull option got useless with commit c139e80 ("trafgen:
remove timer-based trigger model"). Instead of entirely removing it and
thus possibly breaking people's scripts, still accept it as an option,
but warn the user about it. We might want to remove the option in a
future release.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | trafgen.8 | 5 | ||||
-rw-r--r-- | trafgen.c | 6 | ||||
-rw-r--r-- | trafgen.zsh | 1 |
3 files changed, 3 insertions, 9 deletions
@@ -136,11 +136,6 @@ gaps. Manually define the TX_RING resp. TX_RING size in ''<num>KiB/MiB/GiB''. On default the size is being determined based on the network connectivity rate. .PP -.SS -k <uint>, --kernel-pull <uint> -Manually define the interval in micro-seconds where the kernel should be triggered -to batch process the ring buffer frames. By default, it is every 10us, but it can -manually be prolonged, for instance.. -.PP .SS -E <uint>, --seed <uint> Manually set the seed for pseudo random number generator (PRNG) in trafgen. By default, a random seed from /dev/urandom is used to feed glibc's PRNG. If that @@ -56,7 +56,7 @@ struct ctx { bool rand, rfraw, jumbo_support, verbose, smoke_test, enforce, qdisc_path; - unsigned long kpull, num, reserve_size; + unsigned long num, reserve_size; unsigned int cpus; uid_t uid; gid_t gid; char *device, *device_trans, *rhost; @@ -156,7 +156,6 @@ static void __noreturn help(void) " -P|--cpus <uint> Specify number of forks(<= CPUs) (def: #CPUs)\n" " -t|--gap <time> Set approx. interpacket gap (s/ms/us/ns, def: us)\n" " -S|--ring-size <size> Manually set mmap size (KiB/MiB/GiB)\n" - " -k|--kernel-pull <uint> Kernel batch interval in us (def: 10us)\n" " -E|--seed <uint> Manually set srand(3) seed\n" " -u|--user <userid> Drop privileges and change to userid\n" " -g|--group <groupid> Drop privileges and change to groupid\n" @@ -946,7 +945,8 @@ int main(int argc, char **argv) ctx.enforce = true; break; case 'k': - ctx.kpull = strtoul(optarg, NULL, 0); + printf("Option -k/--kernel-pull is no longer used and " + "will be removed in a future release!\n"); break; case 'E': seed = strtoul(optarg, NULL, 0); diff --git a/trafgen.zsh b/trafgen.zsh index 6ebcda1..d20540d 100644 --- a/trafgen.zsh +++ b/trafgen.zsh @@ -44,7 +44,6 @@ _arguments -s -S \ "(-P --cpus)"{-P,--cpus}"[Specify number of forks(<= CPUs) (def: #CPUs)]:cpunum:_cpu" \ "(-t --gap)"{-t,--gap}"[Set approx. interpacket gap (s/ms/us/ns, def: us)]:gap:" "(-S --ring-size)"{-S,--ring-size}"[Manually set mmap size (KiB/MiB/GiB)]:ringsize:" \ - "(-k --kernel-pull)"{-k,--kernel-pull}"[Kernel pull from user interval in us (def: 10us)]:kernelpull:_gnu_generic" \ "(-E --seed)"{-E,--seed}"[Manually set srand(3) seed]" \ "(-u --user)"{-u,--user}"[Drop privileges and change to userid]:user:_user_info" \ "(-g --group)"{-g,--group}"[Drop privileges and change to groupid]:group:_group_info" \ |