From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F3C83378E for ; Thu, 16 Feb 2017 10:13:34 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2017 01:13:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,168,1484035200"; d="scan'208";a="1108696859" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.61]) by fmsmga001.fm.intel.com with SMTP; 16 Feb 2017 01:13:31 -0800 Received: by (sSMTP sendmail emulation); Thu, 16 Feb 2017 09:13:31 +0000 Date: Thu, 16 Feb 2017 09:13:30 +0000 From: Bruce Richardson To: Ferruh Yigit Cc: Thomas Monjalon , Bernard Iremonger , "Ananyev, Konstantin" , Declan Doherty , DPDK Message-ID: <20170216091330.GC92400@bricha3-MOBL3.ger.corp.intel.com> References: <1464280727-25752-2-git-send-email-bernard.iremonger@intel.com> <5839452.IzJ3v2K0cK@xps13> <8CEF83825BEC744B83065625E567D7C21A03A6D7@IRSMSX108.ger.corp.intel.com> <1632739.trvk2NaClS@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.7.2 (2016-11-26) Subject: Re: [dpdk-dev] [PATCH v3 3/4] bonding: take queue spinlock in rx/tx burst functions 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: Thu, 16 Feb 2017 09:13:35 -0000 On Wed, Feb 15, 2017 at 06:01:45PM +0000, Ferruh Yigit wrote: > On 6/16/2016 7:38 PM, thomas.monjalon at 6wind.com (Thomas Monjalon) wrote: > > 2016-06-16 16:41, Iremonger, Bernard: > >> Hi Thomas, > >> > >>> 2016-06-16 15:32, Bruce Richardson: > >>>> On Mon, Jun 13, 2016 at 01:28:08PM +0100, Iremonger, Bernard wrote: > >>>>>> Why does this particular PMD need spinlocks when doing RX and TX, > >>>>>> while other device types do not? How is adding/removing devices > >>>>>> from a bonded device different to other control operations that > >>>>>> can be done on physical PMDs? Is this not similar to say bringing > >>>>>> down or hotplugging out a physical port just before an RX or TX > >>> operation takes place? > >>>>>> For all other PMDs we rely on the app to synchronise control and > >>>>>> data plane operation - why not here? > >>>>>> > >>>>>> /Bruce > >>>>> > >>>>> This issue arose during VM live migration testing. > >>>>> For VM live migration it is necessary (while traffic is running) to be able to > >>> remove a bonded slave device, stop it, close it and detach it. > >>>>> It a slave device is removed from a bonded device while traffic is running > >>> a segmentation fault may occur in the rx/tx burst function. The spinlock has > >>> been added to prevent this occurring. > >>>>> > >>>>> The bonding device already uses a spinlock to synchronise between the > >>> add and remove functionality and the slave_link_status_change_monitor > >>> code. > >>>>> > >>>>> Previously testpmd did not allow, stop, close or detach of PMD while > >>>>> traffic was running. Testpmd has been modified with the following > >>>>> patchset > >>>>> > >>>>> http://dpdk.org/dev/patchwork/patch/13472/ > >>>>> > >>>>> It now allows stop, close and detach of a PMD provided in it is not > >>> forwarding and is not a slave of bonded PMD. > >>>>> > >>>> I will admit to not being fully convinced, but if nobody else has any > >>>> serious objections, and since this patch has been reviewed and acked, > >>>> I'm ok to merge it in. I'll do so shortly. > >>> > >>> Please hold on. > >>> Seeing locks introduced in the Rx/Tx path is an alert. > >>> We clearly need a design document to explain where locks can be used and > >>> what are the responsibility of the control plane. > >>> If everybody agrees in this document that DPDK can have some locks in the > >>> fast path, then OK to merge it. > >>> > >>> So I would say NACK for 16.07 and maybe postpone to 16.11. > >> > >> Looking at the documentation for the bonding PMD. > >> > >> http://dpdk.org/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.html > >> > >> In section 10.2 it states the following: > >> > >> Bonded devices support the dynamical addition and removal of slave devices using the rte_eth_bond_slave_add / rte_eth_bond_slave_remove APIs. > >> > >> If a slave device is added or removed while traffic is running, there is the possibility of a segmentation fault in the rx/tx burst functions. This is most likely to occur in the round robin bonding mode. > >> > >> This patch set fixes what appears to be a bug in the bonding PMD. > > > > It can be fixed by removing this statement in the doc. > > > > One of the design principle of DPDK is to avoid locks. > > > >> Performance measurements have been made with this patch set applied and without the patches applied using 64 byte packets. > >> > >> With the patches applied the following drop in performance was observed: > >> > >> % drop for fwd+io: 0.16% > >> % drop for fwd+mac: 0.39% > >> > >> This patch set has been reviewed and ack'ed, so I think it should be applied in 16.07 > > > > I understand your point of view and I gave mine. > > Now we need more opinions from others. > > > > Hi, > > These patches are sitting in the patchwork for a long time. Discussion > never concluded and patches kept deferred each release. > > I think we should give a decision about them: > > 1- We can merge them in this release, they are fixing a valid problem, > and patches are already acked. > > 2- We can reject them, if not having them for more than six months not > caused a problem, perhaps they are not really that required. And if > somebody needs them in the future, we can resurrect them from patchwork. > > I vote for option 2, any comments? > +1 on option 2. There are obviously not badly needed if nobody is asking for them for over six months. /Bruce