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 440225A4F for ; Tue, 22 Mar 2016 22:38:18 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 22 Mar 2016 14:38:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,379,1455004800"; d="scan'208";a="929701283" Received: from fooyekan-mobl2.ger.corp.intel.com ([10.252.25.15]) by fmsmga001.fm.intel.com with SMTP; 22 Mar 2016 14:38:15 -0700 Received: by (sSMTP sendmail emulation); Tue, 22 Mar 2016 21:38:15 +0025 Date: Tue, 22 Mar 2016 21:38:15 +0000 From: Bruce Richardson To: Harish Patil Cc: "dev@dpdk.org" Message-ID: <20160322213814.GA3920@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] Question on examples/multi_process app 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: Tue, 22 Mar 2016 21:38:18 -0000 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 initialize > 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 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.” > > 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: > > 1) Rejecting the Promisc config? OR > 2) Cache the config and apply when dev_start() is called at later point? > > Thanks, > Harish > Good question. I think most/all of the Intel adapters, - for which the app was originally written, way back in the day when there were only 2 PMDs in DPDK :) - will handle the promiscuous mode call either before or after the dev start. Assuming that's the case, and if it makes life easier for other driver writers, we should indeed standardize on one supported way of doing things - the way specified in the documentation being that one way, I would guess. 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()? /Bruce