DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chilikin, Andrey" <andrey.chilikin@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Subject: [dpdk-dev] [RFC] ethdev: add ioctl-like API to control device specific features
Date: Thu, 3 Aug 2017 12:21:35 +0000	[thread overview]
Message-ID: <AAC06825A3B29643AF5372F5E0DDF0538DBC372E@IRSMSX106.ger.corp.intel.com> (raw)

To control some device-specific features public device-specific functions
rte_pmd_*.h are used.

But this solution requires applications to distinguish devices at runtime
and, depending on the device type, call corresponding device-specific
functions even if functions' parameters are the same.

IOCTL-like API can be added to ethdev instead of public device-specific
functions to address the following:

* allow more usable support of features across a range of NIC from
  one vendor, but not others
* allow features to be implemented by multiple NIC drivers without
  relying on a critical mass to get the functionality in ethdev
* there are a large number of possible device specific functions, and
  creating individual APIs for each one is not a good solution
* IOCTLs are a proven method for solving this problem in other areas,
  i.e. OS kernels.

Control requests for this API will be globally defined at ethdev level, so
an application will use single API call to control different devices from
one/multiple vendors.

API call may look like as a classic ioctl with an extra parameter for
argument length for better sanity checks:

int
rte_eth_dev_ioctl(uint16_t port, uint64_t ctl, void *argp,
        unsigned arg_length);

Regards,
Andrey

             reply	other threads:[~2017-08-03 12:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 12:21 Chilikin, Andrey [this message]
2017-08-03 13:21 ` Bruce Richardson
2017-08-03 16:15   ` Stephen Hemminger
2017-08-03 19:53     ` Thomas Monjalon
2017-08-04  9:59       ` Chilikin, Andrey
2017-08-04 10:08         ` Thomas Monjalon
2017-08-04 11:58       ` Ferruh Yigit
2017-08-04 12:56         ` Bruce Richardson
2017-08-08  8:32           ` Ferruh Yigit
2017-08-08 15:27             ` Stephen Hemminger
2017-08-08 17:23         ` Wiles, Keith
2017-08-08 17:28         ` Wiles, Keith
2017-08-08 18:02           ` Stephen Hemminger
2017-08-08 18:21             ` Wiles, Keith

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=AAC06825A3B29643AF5372F5E0DDF0538DBC372E@IRSMSX106.ger.corp.intel.com \
    --to=andrey.chilikin@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.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).