From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: Question on examples/multi_process app Date: Tue, 22 Mar 2016 21:38:15 +0000 Message-ID: <20160322213814.GA3920@bricha3-MOBL3> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Harish Patil Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 440225A4F for ; Tue, 22 Mar 2016 22:38:18 +0100 (CET) Content-Disposition: inline In-Reply-To: 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 Tue, Mar 22, 2016 at 08:03:42PM +0000, Harish Patil wrote: > Hi, > I have a question regarding symmetric_mp and mp_server applications und= er > examples/multi_process. In those apps, rte_eth_promiscuous_enable() is > called before rte_eth_dev_start(). Is this the correct way to initializ= e > the port/device? As per the description in > http://dpdk.org/doc/api/rte__ethdev_8h.html: >=20 > "The functions exported by the application Ethernet API to setup a devi= ce > designated by its port identifier must be invoked in the following orde= r: >=20 > * rte_eth_dev_configure() > * rte_eth_tx_queue_setup() > * rte_eth_rx_queue_setup() > * rte_eth_dev_start() >=20 > Then, the network application can invoke, in any order, the functions > exported by the Ethernet API to get the MAC address of a given device, = to > get the speed and the status of a device physical link, to > receive/transmit [burst of] packets, and so on.=E2=80=9D >=20 > So should I consider this as an application issue or whether the PMD is > expected to handle it? If PMD is to handle it, then should the PMD be: >=20 > 1) Rejecting the Promisc config? OR > 2) Cache the config and apply when dev_start() is called at later point= ? >=20 > Thanks, > Harish >=20 Good question. I think most/all of the Intel adapters, - for which the ap= p was originally written, way back in the day when there were only 2 PMDs in DP= DK :) - will handle the promiscuous mode call either before or after the dev st= art. Assuming that's the case, and if it makes life easier for other driver wr= iters, we should indeed standardize on one supported way of doing things - the w= ay specified in the documentation being that one way, I would guess. So, e1000, ixgbe maintainers - do you see any issues with forcing the pro= miscuous mode set API to be called after the call to dev_start()? /Bruce