From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Traynor Subject: Re: [PATCH v8] app/testpmd: add noisy neighbour forwarding mode Date: Tue, 2 Oct 2018 12:58:04 +0100 Message-ID: <6ec37a68-ccb9-374f-7451-c0201724b75d@redhat.com> References: <20181002074419.24164-1-jfreimann@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: ailan@redhat.com, jan.scheurich@ericsson.com, bruce.richardson@intel.com, thomas@monjalon.net, maxime.coquelin@redhat.com, konstantin.ananyev@intel.com, ferruh.yigit@intel.com, bernard.iremonger@intel.com To: Jens Freimann , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 33F9F2BE3 for ; Tue, 2 Oct 2018 13:58:14 +0200 (CEST) In-Reply-To: <20181002074419.24164-1-jfreimann@redhat.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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). > 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"); > + }