From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2E705A04B6; Mon, 12 Oct 2020 20:13:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2A2F1D946; Mon, 12 Oct 2020 20:13:37 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4C9CB1D943 for ; Mon, 12 Oct 2020 20:13:34 +0200 (CEST) IronPort-SDR: 2cSEIM1w27/fVMdnummcHmD+Ll9JmAa03fnjrDxxQrW+HNKmdQVVYSL3bRHIAARB0ag7fEo9Ry Rfi8uf8rWp3A== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="163144029" X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="163144029" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 11:13:33 -0700 IronPort-SDR: gyFRjtiaAZl3yH8bwTZqy6wYn5tTwMk5jDv9zCiVqjjHawNkqCcBi6u+BRGItrdUukZ2SQLdRJ XxBjEitsvbOw== X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="520775880" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.244.119]) ([10.213.244.119]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 11:13:31 -0700 To: Igor Russkikh , dev@dpdk.org Cc: Rasesh Mody , Devendra Singh Rawat , Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Stephen Hemminger References: <20200925090757.1338-1-irusskikh@marvell.com> From: Ferruh Yigit Message-ID: Date: Mon, 12 Oct 2020 19:13:27 +0100 MIME-Version: 1.0 In-Reply-To: <20200925090757.1338-1-irusskikh@marvell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [RFC PATCH v2] app/testpmd: tx pkt clones parameter in flowgen 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/25/2020 10:07 AM, Igor Russkikh wrote: > When testing high performance numbers, it is often that CPU performance > limits the max values device can reach (both in pps and in gbps) > > Here instead of recreating each packet separately, we use clones counter > to resend the same mbuf to the line multiple times. > Do you have any numbers on how much performance improvement gained? > PMDs handle that transparently due to reference counting inside of mbuf. > > Verified on Marvell qede and atlantic PMDs. > > v2: increment ref counter for each mbuf pointer copy > > Signed-off-by: Igor Russkikh <...> > @@ -1151,6 +1153,16 @@ launch_args_parse(int argc, char** argv) > else > nb_pkt_per_burst = (uint16_t) n; > } > + if (!strcmp(lgopts[opt_idx].name, "clones")) { > + n = atoi(optarg); > + if ((n >= 0) && > + (n <= nb_pkt_per_burst)) > + nb_pkt_clones = (uint16_t) n; > + else > + rte_exit(EXIT_FAILURE, > + "clones must be >= 0 and <= %d (burst)\n", > + nb_pkt_per_burst); Do you need to enforce the "n <= nb_pkt_per_burst", burst value can be changed later and trying to keep 'clones' values in sync with it is additional work. In the flowgen logic, with each burst a new packet is created anyway. So instead of enforcing the 'clones' number range, in documentation you can say the clone number can't exceed the burst number whatever it is set. > + } > if (!strcmp(lgopts[opt_idx].name, "mbcache")) { > n = atoi(optarg); > if ((n >= 0) && > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index fe6450cc0..18b4b63d1 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -228,6 +228,7 @@ uint32_t tx_pkt_times_intra; > /**< Timings for send scheduling in TXONLY mode, time between packets. */ > > uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */ > +uint16_t nb_pkt_clones; /**< Number of tx packet clones to send. */ > uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */ > Both the parameter name, 'clones', and the variable name 'nb_pkt_clones' are too generic, and may mislead users. Please remember that testpms usage is very wide. You are updating very specifically the flowgen forwarding engine, can you please prefix the 'flowgen', like: 'flowgen-clones' & 'nb_pkt_flowgen_clones'. Also explicitly mention in the description that this is for flowgen clones. <...>