DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	"Tan, Jianfeng" <jianfeng.tan@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	Panu Matilainen <pmatilai@redhat.com>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [RFC] kernel paramters like DPDK CLI options
Date: Wed, 01 Jun 2016 12:17:50 +0200	[thread overview]
Message-ID: <2257651.YBvHY4sFXa@xps13> (raw)
In-Reply-To: <20160601060454.GJ5641@yliu-dev.sh.intel.com>

Hi,

2016-06-01 14:04, Yuanhan Liu:
> Hi all,
> 
> I guess we (maybe just me :) have stated few times something like
> "hey, this kind of stuff is good to have, but you are trying to
> add an EAL CLI option for a specific subsystem/driver, which is
> wrong".

Yes

> One recent example that is still fresh in my mind is the one from
> Christian [0], that he made a proposal to introduce two new EAL
> options, --vhost-owner and --vhost-perm, to configure the vhost
> user socket file permission.
> 
>     [0]: http://dpdk.org/ml/archives/dev/2016-April/037948.html
> 
> Another example is the one I met while enabling virtio 1.0 support.
> QEMU has the ability to support both virtio 0.95 (legacy) and 1.0
> (modern) at the same time for one virtio device, therefore, we
> could either use legacy driver or modern driver to operate the
> device. However, the current logic is we try with modern driver
> first, and then legacy driver if it failed. In above case, we will
> never hit the legacy driver. But sometimes, it's nice to let it
> force back to the legacy driver, say, for debug or compare purpose.
> 
> Apparently, adding a new EAL option like "--force-legacy" looks
> wrong.
> 
> The generic yet elegant solution I just thought of while having
> lunch is to add a new EAL option, say, --extra-options, where we
> could specify driver/subsystem specific options. As you see, it's
> nothing big deal, it just looks like Linux kernel parameters.
> 
> Take above two cases as example, it could be:
> 
>     --extra-options "vhost-owner=kvm:kvm force-legacy"

I think it's better to have CLI options per device.
Currently we can pass devargs
	- to PCI device via --pci-whitelist
	- to virtual device via --vdev
I think we just need to refactor these options to have a generic
--device or keep the options in --vdev and add a new --pciopt
or something like that.

And more importantly, these devargs must be set via a new EAL API
to allow applications do these configurations without building/faking
some command line arguments.

To make it clear, applications use API and users use CLI (which call API).

> Note that those options could also be delimited by comma.
> 
> DPDK EAL then will provide some generic helper functions to get
> and parse those options, and let the specific driver/subsystem
> to invoke them to do the actual parse and do the proper action
> when some option is specified, say, virtio PMD driver will force
> back to legacy driver when "force-legacy" is given.
> 
> Comments? Makes sense to you guys, or something nice to have?

Thanks for starting the discussion.

  reply	other threads:[~2016-06-01 10:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01  6:04 Yuanhan Liu
2016-06-01 10:17 ` Thomas Monjalon [this message]
2016-06-01 11:40   ` Yuanhan Liu
2016-06-01 12:39     ` Thomas Monjalon
2016-06-01 13:19       ` Yuanhan Liu
2016-06-01 14:03         ` Thomas Monjalon
2016-06-01 15:02           ` Wiles, Keith
2016-06-01 15:19           ` Yuanhan Liu
2016-06-01 10:24 ` Yerden Zhumabekov

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=2257651.YBvHY4sFXa@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=pmatilai@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=yuanhan.liu@linux.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).