Some global variables can be eliminated, since they are not part of
public interface, it is free to remove them.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Rawdev queue count API prototype was declared, but the definition was
missing from the library. This patch implements the function.
This API is used to query the device about the count of queues it has
been configured with.
Fixes: c88b3f2558 ("rawdev: introduce raw device library")
Cc: stable@dpdk.org
Suggested-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
A constructor is usually declared with RTE_INIT* macros.
As it is a static function, no need to declare before its definition.
The macro is used directly in the function definition.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Add librte_rawdev to the meson build of DPDK.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
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>
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>
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>
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>
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>