From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, hemant.agrawal@nxp.com, fiona.trahe@intel.com,
rosen.xu@intel.com, Shreyansh Jain <shreyansh.jain@nxp.com>
Subject: [dpdk-dev] [PATCH v4 10/10] doc: add rawdev library page and support Doxygen
Date: Wed, 31 Jan 2018 14:43:18 +0530 [thread overview]
Message-ID: <20180131091318.7894-11-shreyansh.jain@nxp.com> (raw)
In-Reply-To: <20180131091318.7894-1-shreyansh.jain@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
MAINTAINERS | 1 +
doc/api/doxy-api-index.md | 1 +
doc/api/doxy-api.conf | 1 +
doc/guides/prog_guide/index.rst | 1 +
doc/guides/prog_guide/rawdev_lib.rst | 107 +++++++++++++++++++++++++++++++++
doc/guides/rel_notes/release_18_02.rst | 12 ++++
6 files changed, 123 insertions(+)
create mode 100644 doc/guides/prog_guide/rawdev_lib.rst
diff --git a/MAINTAINERS b/MAINTAINERS
index 42ddfbd8c..7ab7728f4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -321,6 +321,7 @@ M: Hemant Agrawal <hemant.agrawal@nxp.com>
F: lib/librte_rawdev/*
F: drivers/rawdev/skeleton/*
F: test/test/test_rawdev.c
+F: doc/guides/prog_guide/rawdev_lib.rst
Bus Drivers
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 59281a109..4259b517a 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -43,6 +43,7 @@ The public API headers are grouped by topics:
[rte_tm] (@ref rte_tm.h),
[rte_mtr] (@ref rte_mtr.h),
[bbdev] (@ref rte_bbdev.h),
+ [rawdev] (@ref rte_rawdev.h),
[cryptodev] (@ref rte_cryptodev.h),
[security] (@ref rte_security.h),
[eventdev] (@ref rte_eventdev.h),
diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index d4a72abc6..cda52fdfb 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -71,6 +71,7 @@ INPUT = doc/api/doxy-api-index.md \
lib/librte_pipeline \
lib/librte_port \
lib/librte_power \
+ lib/librte_rawdev \
lib/librte_reorder \
lib/librte_ring \
lib/librte_sched \
diff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst
index af5f65a33..beead3105 100644
--- a/doc/guides/prog_guide/index.rst
+++ b/doc/guides/prog_guide/index.rst
@@ -75,6 +75,7 @@ Programmer's Guide
vhost_lib
metrics_lib
port_hotplug_framework
+ rawdev_lib
source_org
dev_kit_build_system
dev_kit_root_make_help
diff --git a/doc/guides/prog_guide/rawdev_lib.rst b/doc/guides/prog_guide/rawdev_lib.rst
new file mode 100644
index 000000000..54bffc585
--- /dev/null
+++ b/doc/guides/prog_guide/rawdev_lib.rst
@@ -0,0 +1,107 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 NXP
+
+Rawdevice Library
+=================
+
+Introduction
+------------
+
+In terms of device flavor (type) support, DPDK currently has ethernet
+(lib_ether), cryptodev (libcryptodev), eventdev (libeventdev) and vdev
+(virtual device) support.
+
+For a new type of device, for example an accelerator, there are not many
+options except:
+1. create another lib/librte_MySpecialDev, driver/MySpecialDrv and use it
+through Bus/PMD model.
+2. Or, create a vdev and implement necessary custom APIs which are directly
+exposed from driver layer. However this may still require changes in bus code
+in DPDK.
+
+The DPDK Rawdev library is an abstraction that provides the DPDK framework a
+way to manage such devices in a generic manner without expecting changes to
+library or EAL for each device type. This library provides a generic set of
+operations and APIs for framework and Applications to use, respectively, for
+interfacing with such type of devices.
+
+Design
+------
+
+Key factors guiding design of the Rawdevice library:
+
+1. Following are some generic operations which can be treated as applicable
+ to a large subset of device types. None of the operations are mandatory to
+ be implemented by a driver. Application should also be design for proper
+ handling for unsupported APIs.
+
+ * Device Start/Stop - In some cases, 'reset' might also be required which
+ has different semantics than a start-stop-start cycle.
+ * Configuration - Device, Queue or any other sub-system configuration
+ * I/O - Sending a series of buffers which can enclose any arbitrary data
+ * Statistics - Fetch arbitrary device statistics
+ * Firmware Management - Firmware load/unload/status
+
+2. Application API should be able to pass along arbitrary state information
+ to/fro device driver. This can be achieved by maintaining context
+ information through opaque data or pointers.
+
+Figure below outlines the layout of the rawdevice library and device vis-a-vis
+other well known device types like eth and crypto:
+
+.. code-block:: console
+
+ +-----------------------------------------------------------+
+ | Application(s) |
+ +------------------------------.----------------------------+
+ |
+ |
+ +------------------------------'----------------------------+
+ | DPDK Framework (APIs) |
+ +--------------|----|-----------------|---------------------+
+ / \ \
+ (crypto ops) (eth ops) (rawdev ops) +----+
+ / \ \ |DrvA|
+ +-----'---+ +----`----+ +---'-----+ +----+
+ | crypto | | ethdev | | raw |
+ +--/------+ +---/-----+ +----/----+ +----+
+ /\ __/\ / ..........|DrvB|
+ / \ / \ / ../ \ +----+
+ +====+ +====+ +====+ +====+ +==/=+ ```Bus Probe
+ |DevA| |DevB| |DevC| |DevD| |DevF|
+ +====+ +====+ +====+ +====+ +====+
+ | | | | |
+ ``|``````|````````|``````|`````````````````|````````Bus Scan
+ (PCI) | (PCI) (PCI) (PCI)
+ (BusA)
+
+ * It is assumed above that DrvB is a PCI type driver which registers itself
+ with PCI Bus
+ * Thereafter, when the PCI scan is done, during probe DrvB would match the
+ rawdev DevF ID and take control of device
+ * Applications can then continue using the device through rawdev API
+ interfaces
+
+
+Device Identification
+~~~~~~~~~~~~~~~~~~~~~
+
+Physical rawdev devices are discovered during the Bus scan executed at DPDK
+initialization, based on their identification and probing with corresponding
+driver. Thus, a generic device needs to have an identifier and a driver
+capable of identifying it through this identifier.
+
+Virtual devices can be created by two mechanisms, either using the EAL command
+line options or from within the application using an EAL API directly.
+
+From the command line using the --vdev EAL option
+
+.. code-block:: console
+
+ --vdev 'rawdev_dev1'
+
+Our using the rte_vdev_init API within the application code.
+
+.. code-block:: c
+
+ rte_vdev_init("rawdev_dev1", NULL)
diff --git a/doc/guides/rel_notes/release_18_02.rst b/doc/guides/rel_notes/release_18_02.rst
index 84e0ad068..ce5ccaf9d 100644
--- a/doc/guides/rel_notes/release_18_02.rst
+++ b/doc/guides/rel_notes/release_18_02.rst
@@ -192,6 +192,17 @@ New Features
is unaffected by these changes, and can continue to be used for this
and subsequent releases until such time as it's deprecation is announced.
+* **Added Rawdev, a generic device support library.**
+
+ Rawdev library provides support for integrating any generic device type with
+ DPDK framework. Generic devices are those which do not have a pre-defined
+ type within DPDK, for example, ethernet, crypto, event etc.
+ A set of northbound APIs have been defined which encompass a generic set of
+ operations by allowing applications to interact with device using opaque
+ structures/buffers. Also, southbound APIs provide APIs for integrating device
+ either as as part of a physical bus (PCI, FSLMC etc) or through ``vdev``.
+
+ See the :doc:`../prog_guide/rawdev_lib` programmer's guide for more details.
API Changes
-----------
@@ -308,6 +319,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_pmd_vhost.so.2
librte_port.so.3
librte_power.so.1
+ librte_rawdev.so.1
librte_reorder.so.1
librte_ring.so.1
librte_sched.so.1
--
2.14.1
next prev parent reply other threads:[~2018-01-31 8:59 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 12:57 [dpdk-dev] [PATCH v1 0/5] Introduce generic 'rawdevice' support Shreyansh Jain
2018-01-02 12:57 ` [dpdk-dev] [PATCH v1 1/5] rawdev: introduce raw device library support Shreyansh Jain
2018-01-06 13:40 ` Trahe, Fiona
2018-01-08 14:09 ` Shreyansh Jain
2018-01-08 14:51 ` Trahe, Fiona
2018-01-12 15:00 ` Shreyansh Jain
2018-01-12 19:35 ` Trahe, Fiona
2018-01-14 22:42 ` Thomas Monjalon
2018-01-14 22:50 ` Thomas Monjalon
2018-01-02 12:57 ` [dpdk-dev] [PATCH v1 2/5] config: enable compilation of rawdev library Shreyansh Jain
2018-01-14 22:50 ` Thomas Monjalon
2018-01-02 12:57 ` [dpdk-dev] [PATCH v1 3/5] drivers/raw: introduce skeleton rawdev driver Shreyansh Jain
2018-01-14 22:54 ` Thomas Monjalon
2018-01-16 10:21 ` Shreyansh Jain
2018-01-16 10:34 ` Thomas Monjalon
2018-01-02 12:57 ` [dpdk-dev] [PATCH v1 4/5] config: enable compilation of rawdev skeleton driver Shreyansh Jain
2018-01-14 22:55 ` Thomas Monjalon
2018-01-02 12:57 ` [dpdk-dev] [PATCH v1 5/5] test: support for rawdev testcases Shreyansh Jain
2018-01-14 22:58 ` Thomas Monjalon
2018-01-16 10:07 ` Shreyansh Jain
2018-01-16 10:32 ` Thomas Monjalon
2018-01-14 23:00 ` [dpdk-dev] [PATCH v1 0/5] Introduce generic 'rawdevice' support Thomas Monjalon
2018-01-15 5:30 ` Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 00/10] " Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 01/10] rawdev: introduce raw device library support Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 02/10] rawdev: add attribute get and set support Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 03/10] rawdev: add buffer stream IO support Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 04/10] rawdev: support for extended stats Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 05/10] rawdev: support for firmware management Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 06/10] rawdev: add self test support Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 07/10] drivers/raw: introduce skeleton rawdev driver Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 08/10] drivers/raw: support for rawdev testcases Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 09/10] test: enable rawdev skeleton test Shreyansh Jain
2018-01-23 13:59 ` [dpdk-dev] [PATCH v2 10/10] maintainers: claim ownership of rawdev Shreyansh Jain
2018-01-25 22:21 ` [dpdk-dev] [PATCH v2 00/10] Introduce generic 'rawdevice' support Thomas Monjalon
2018-01-29 23:49 ` Thomas Monjalon
2018-01-30 6:31 ` Shreyansh Jain
2018-01-30 14:56 ` [dpdk-dev] [PATCH v3 00/11] " Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 01/11] rawdev: introduce raw device library support Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 02/11] rawdev: add attribute get and set support Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 03/11] rawdev: add buffer stream IO support Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 04/11] rawdev: support for extended stats Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 05/11] rawdev: support for firmware management Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 06/11] rawdev: add self test support Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 07/11] drivers/raw: introduce skeleton rawdev driver Shreyansh Jain
2018-01-30 16:48 ` Thomas Monjalon
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 08/11] drivers/raw: support for rawdev testcases Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 09/11] test: enable rawdev skeleton test Shreyansh Jain
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 10/11] maintainers: claim ownership of rawdev Shreyansh Jain
2018-01-30 16:50 ` Thomas Monjalon
2018-01-30 14:57 ` [dpdk-dev] [PATCH v3 11/11] doc: add rawdev library page Shreyansh Jain
2018-01-30 16:55 ` [dpdk-dev] [PATCH v3 00/11] Introduce generic 'rawdevice' support Thomas Monjalon
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 00/10] " Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 01/10] rawdev: introduce raw device library support Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 02/10] rawdev: add attribute get and set support Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 03/10] rawdev: add buffer stream IO support Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 04/10] rawdev: support for extended stats Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 05/10] rawdev: support for firmware management Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 06/10] rawdev: add self test support Shreyansh Jain
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 07/10] drivers/raw: introduce skeleton rawdev driver Shreyansh Jain
2018-01-31 13:20 ` Thomas Monjalon
2018-01-31 13:31 ` Thomas Monjalon
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 08/10] drivers/raw: support for rawdev testcases Shreyansh Jain
2018-01-31 14:01 ` Thomas Monjalon
2018-01-31 9:13 ` [dpdk-dev] [PATCH v4 09/10] test: enable rawdev skeleton test Shreyansh Jain
2018-01-31 9:13 ` Shreyansh Jain [this message]
2018-01-31 14:45 ` [dpdk-dev] [PATCH v4 00/10] Introduce generic 'rawdevice' support Thomas Monjalon
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=20180131091318.7894-11-shreyansh.jain@nxp.com \
--to=shreyansh.jain@nxp.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=rosen.xu@intel.com \
--cc=thomas@monjalon.net \
/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).