On 10/02/2018 08:44 AM, Jens Freimann wrote: > This adds a new forwarding mode to testpmd to simulate > more realistic behavior of a guest machine engaged in receiving > and sending packets performing Virtual Network Function (VNF). >
<snip> As there's going to be a v9 anyway, you can also fix the below error messages to be '>= 0' > + if (!strcmp(lgopts[opt_idx].name, > + "noisy-lkup-memory")) { > + n = atoi(optarg); > + if (n >= 0) > + noisy_lkup_mem_sz = n; > + else > + rte_exit(EXIT_FAILURE, > + "noisy-lkup-memory must be > > 0\n"); > + } > + if (!strcmp(lgopts[opt_idx].name, > + "noisy-lkup-num-writes")) { > + n = atoi(optarg); > + if (n >= 0) > + noisy_lkup_num_writes = n; > + else > + rte_exit(EXIT_FAILURE, > + "noisy-lkup-num-writes must be > > 0\n"); > + } > + if (!strcmp(lgopts[opt_idx].name, > + "noisy-lkup-num-reads")) { > + n = atoi(optarg); > + if (n >= 0) > + noisy_lkup_num_reads = n; > + else > + rte_exit(EXIT_FAILURE, > + "noisy-lkup-num-reads must be > > 0\n"); > + } > + if (!strcmp(lgopts[opt_idx].name, > + "noisy-lkup-num-reads-writes")) { > + n = atoi(optarg); > + if (n >= 0) > + noisy_lkup_num_reads_writes = n; > + else > + rte_exit(EXIT_FAILURE, > + "noisy-lkup-num-reads-writes > must be > 0\n"); > + }