From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: Question on examples/multi_process app Date: Wed, 23 Mar 2016 11:45:01 +0000 Message-ID: <20160323114501.GA3628@bricha3-MOBL3> References: <20160322213814.GA3920@bricha3-MOBL3> <2601191342CEEE43887BDE71AB97725836B20265@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Harish Patil , "dev@dpdk.org" To: "Ananyev, Konstantin" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2AF77E07 for ; Wed, 23 Mar 2016 12:45:05 +0100 (CET) Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB97725836B20265@irsmsx105.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Mar 23, 2016 at 11:09:17AM +0000, Ananyev, Konstantin wrote: > Hi everyone, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Tuesday, March 22, 2016 9:38 PM > > To: Harish Patil > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] Question on examples/multi_process app > >=20 > > On Tue, Mar 22, 2016 at 08:03:42PM +0000, Harish Patil wrote: > > > Hi, > > > I have a question regarding symmetric_mp and mp_server applications= under > > > examples/multi_process. In those apps, rte_eth_promiscuous_enable()= is > > > called before rte_eth_dev_start(). Is this the correct way to initi= alize > > > the port/device? As per the description in > > > http://dpdk.org/doc/api/rte__ethdev_8h.html: > > > > > > "The functions exported by the application Ethernet API to setup a = device > > > designated by its port identifier must be invoked in the following = order: > > > > > > * rte_eth_dev_configure() > > > * rte_eth_tx_queue_setup() > > > * rte_eth_rx_queue_setup() > > > * rte_eth_dev_start() > > > > > > Then, the network application can invoke, in any order, the functio= ns > > > exported by the Ethernet API to get the MAC address of a given devi= ce, to > > > get the speed and the status of a device physical link, to > > > receive/transmit [burst of] packets, and so on.=E2=80=9D > > > > > > So should I consider this as an application issue or whether the PM= D is > > > expected to handle it? If PMD is to handle it, then should the PMD = be: > > > > > > 1) Rejecting the Promisc config? OR > > > 2) Cache the config and apply when dev_start() is called at later p= oint? >=20 > Yes as I remember 2) is done. > dev_start() invokes rte_eth_dev_config_restore(), which restores=20 > promisc mode, mac addresses, etc. >=20 > > > > > > Thanks, > > > Harish > > > > > Good question. I think most/all of the Intel adapters, - for which th= e app was > > originally written, way back in the day when there were only 2 PMDs i= n DPDK :) > > - will handle the promiscuous mode call either before or after the de= v start. > > Assuming that's the case, and if it makes life easier for other drive= r writers, > > we should indeed standardize on one supported way of doing things - t= he way > > specified in the documentation being that one way, I would guess. > >=20 > > So, e1000, ixgbe maintainers - do you see any issues with forcing the= promiscuous > > mode set API to be called after the call to dev_start()? >=20 > Not sure, why do we need to enforce that restriction? > Is there any problem with current way? It complicates things for driver writers is all, and conflicts slightly w= ith=20 what is stated in the docs. /Bruce