DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: Harish Patil <harish.patil@qlogic.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Question on examples/multi_process app
Date: Wed, 23 Mar 2016 11:45:01 +0000	[thread overview]
Message-ID: <20160323114501.GA3628@bricha3-MOBL3> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB97725836B20265@irsmsx105.ger.corp.intel.com>

On Wed, Mar 23, 2016 at 11:09:17AM +0000, Ananyev, Konstantin wrote:
> Hi everyone,
> 
> > -----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
> > 
> > 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?
> 
> Yes as I remember 2) is done.
> dev_start() invokes rte_eth_dev_config_restore(), which restores 
> promisc mode, mac addresses, etc.
> 
> > >
> > > 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()?
> 
> 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 with 
what is stated in the docs.

/Bruce

  reply	other threads:[~2016-03-23 11:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 20:03 Harish Patil
2016-03-22 21:38 ` Bruce Richardson
2016-03-23 11:09   ` Ananyev, Konstantin
2016-03-23 11:45     ` Bruce Richardson [this message]
2016-03-23 11:48       ` Ananyev, Konstantin
2016-03-24  6:52         ` Harish Patil
2016-03-24 11:18           ` Ananyev, Konstantin
2016-03-24 18:36             ` Harish Patil
2016-03-25 14:18               ` Ananyev, Konstantin
2016-03-29 22:58                 ` Harish Patil
2016-03-30 18:53                   ` Harish Patil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160323114501.GA3628@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harish.patil@qlogic.com \
    --cc=konstantin.ananyev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).