From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D98083F4C; Tue, 2 Oct 2018 11:58:13 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id A28743091327; Tue, 2 Oct 2018 11:58:05 +0000 (UTC) To: Jens Freimann , dev@dpdk.org 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 References: <20181002074419.24164-1-jfreimann@redhat.com> From: Kevin Traynor Organization: Red Hat Message-ID: <6ec37a68-ccb9-374f-7451-c0201724b75d@redhat.com> Date: Tue, 2 Oct 2018 12:58:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181002074419.24164-1-jfreimann@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 02 Oct 2018 11:58:13 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v8] app/testpmd: add noisy neighbour forwarding mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2018 11:58:14 -0000 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"); > + }