From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate3.asicdesigners.com (unknown [67.207.115.98]) by dpdk.org (Postfix) with ESMTP id D4A258E79 for ; Mon, 5 Oct 2015 12:06:19 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id t95A6F9t016587; Mon, 5 Oct 2015 03:06:16 -0700 Date: Mon, 5 Oct 2015 15:36:21 +0530 From: Rahul Lakkireddy To: Aaron Conole Message-ID: <20151005100620.GA2487@scalar.blr.asicdesigners.com> References: <318fc8559675b1157e7f049a6a955a6a2059bac7.1443704150.git.rahul.lakkireddy@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Cc: "dev@dpdk.org" , Felix Marti , Kumar A S , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 1/6] cxgbe: Optimize forwarding performance for 40G X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:06:20 -0000 Hi Aaron, On Friday, October 10/02/15, 2015 at 14:48:28 -0700, Aaron Conole wrote: > Hi Rahul, > > Rahul Lakkireddy writes: > > > Update sge initialization with respect to free-list manager configuration > > and ingress arbiter. Also update refill logic to refill mbufs only after > > a certain threshold for rx. Optimize tx packet prefetch and free. > <> > > for (i = 0; i < sd->coalesce.idx; i++) { > > - rte_pktmbuf_free(sd->coalesce.mbuf[i]); > > + struct rte_mbuf *tmp = sd->coalesce.mbuf[i]; > > + > > + do { > > + struct rte_mbuf *next = tmp->next; > > + > > + rte_pktmbuf_free_seg(tmp); > > + tmp = next; > > + } while (tmp); > > sd->coalesce.mbuf[i] = NULL; > Pardon my ignorance here, but rte_pktmbuf_free does this work. I can't > actually see much difference between your rewrite of this block, and > the implementation of rte_pktmbuf_free() (apart from moving your branch > to the end of the function). Did your microbenchmarking really show this > as an improvement? > > Thanks for your time, > Aaron rte_pktmbuf_free calls rte_mbuf_sanity_check which does a lot of checks. This additional check seems redundant for single segment packets since rte_pktmbuf_free_seg also performs rte_mbuf_sanity_check. Several PMDs already prefer to use rte_pktmbuf_free_seg directly over rte_pktmbuf_free as it is faster. The forwarding perf. improvement with only this particular block is around 1 Mpps for 64B packets when using l3fwd with 8 queues. Thanks, Rahul