From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 38DED8E97 for ; Mon, 5 Oct 2015 13:46:44 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 05 Oct 2015 04:46:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,638,1437462000"; d="scan'208";a="574340257" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by FMSMGA003.fm.intel.com with ESMTP; 05 Oct 2015 04:46:41 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 5 Oct 2015 12:46:41 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.252]) by irsmsx155.ger.corp.intel.com ([169.254.14.173]) with mapi id 14.03.0248.002; Mon, 5 Oct 2015 12:46:40 +0100 From: "Ananyev, Konstantin" To: Rahul Lakkireddy , Aaron Conole Thread-Topic: [dpdk-dev] [PATCH 1/6] cxgbe: Optimize forwarding performance for 40G Thread-Index: AQHQ/1WGdPnh59kwZk2x66JtkTt7TZ5cxifQ Date: Mon, 5 Oct 2015 11:46:40 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836AA36CF@irsmsx105.ger.corp.intel.com> References: <318fc8559675b1157e7f049a6a955a6a2059bac7.1443704150.git.rahul.lakkireddy@chelsio.com> <20151005100620.GA2487@scalar.blr.asicdesigners.com> In-Reply-To: <20151005100620.GA2487@scalar.blr.asicdesigners.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" , Felix Marti , Nirranjan Kirubaharan , Kumar A S 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 11:46:44 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rahul Lakkireddy > Sent: Monday, October 05, 2015 11:06 AM > To: Aaron Conole > Cc: dev@dpdk.org; Felix Marti; Kumar A S; Nirranjan Kirubaharan > Subject: Re: [dpdk-dev] [PATCH 1/6] cxgbe: Optimize forwarding performanc= e for 40G >=20 > Hi Aaron, >=20 > 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 configura= tion > > > and ingress arbiter. Also update refill logic to refill mbufs only af= ter > > > a certain threshold for rx. Optimize tx packet prefetch and free. > > <> > > > for (i =3D 0; i < sd->coalesce.idx; i++) { > > > - rte_pktmbuf_free(sd->coalesce.mbuf[i]); > > > + struct rte_mbuf *tmp =3D sd->coalesce.mbuf[i]; > > > + > > > + do { > > > + struct rte_mbuf *next =3D tmp->next; > > > + > > > + rte_pktmbuf_free_seg(tmp); > > > + tmp =3D next; > > > + } while (tmp); > > > sd->coalesce.mbuf[i] =3D 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 thi= s > > as an improvement? > > > > Thanks for your time, > > Aaron >=20 > rte_pktmbuf_free calls rte_mbuf_sanity_check which does a lot of > checks.=20 Only when RTE_LIBRTE_MBUF_DEBUG is enabled in your config. By default it is switched off.=20 > This additional check seems redundant for single segment > packets since rte_pktmbuf_free_seg also performs rte_mbuf_sanity_check. >=20 > Several PMDs already prefer to use rte_pktmbuf_free_seg directly over > rte_pktmbuf_free as it is faster. Other PMDs use rte_pktmbuf_free_seg() as each TD has an associated=20 with it segment. So as HW is done with the TD, SW frees associated segment. In your case I don't see any point in re-implementing rte_pktmbuf_free() ma= nually, and I don't think it would be any faster. Konstantin =20 >=20 > The forwarding perf. improvement with only this particular block is > around 1 Mpps for 64B packets when using l3fwd with 8 queues. >=20 > Thanks, > Rahul