Commit Graph

6 Commits

Author SHA1 Message Date
Shreyansh Jain
7ae53626e4 rawdev: add self test
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:56 +01:00
Shreyansh Jain
ada90a80f5 rawdev: add firmware management
Some generic operations for firmware management can loading, unloading,
starting, stopping and querying firmware of a device.

This patch adds support for such generic operations.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:49 +01:00
Shreyansh Jain
4d4fdc142b rawdev: add extended stats
Generic rawdev library cannot define a pre-defined set of stats
for devices which are yet to be defined.

This patch introduces the xstats support for rawdev so that any
implementation can create its own statistics.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:37 +01:00
Shreyansh Jain
eaf12cccca rawdev: add buffer stream IO
Introduce handlers for raw buffer enqueue and dequeue. A raw buffer
is essentially a void object which is transparently passed via the
library onto the driver.

Using a context field as argument, any arbitrary meta information
can be passed by application to the driver/implementation. This can
be any data on which driver needs to define the operation semantics.
For example, passing along a queue identifier can suggest the driver
the queue context to perform I/O on.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:27 +01:00
Shreyansh Jain
919be8321e rawdev: add attribute get and set
A rawdevice can have various attributes. This patch introduce support
for transparently setting attribute value or getting current attribute
state. This is done by allowing an opaque set of key and value to be
passed through rawdev library.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:18 +01:00
Shreyansh Jain
c88b3f2558 rawdev: introduce raw device library
Each device in DPDK has a type associated with it - ethernet, crypto,
event etc. This patch introduces 'rawdevice' which is a generic
type of device, not currently handled out-of-the-box by DPDK.

A device which can be scanned on an installed bus (pci, fslmc, ...)
or instantiated through devargs, can be interfaced using
standardized APIs just like other standardized devices.

This library introduces an API set which can be plugged on the
northbound side to the application layer, and on the southbound side
to the driver layer.

The APIs of rawdev library exposes some generic operations which can
enable configuration and I/O with the raw devices. Using opaque
data (pointer) as API arguments, library allows a high flexibility
for application and driver implementation.

This patch introduces basic device operations like start, stop, reset,
queue and info support.
Subsequent patches would introduce other operations like buffer
enqueue/dequeue and firmware support.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 15:35:01 +01:00