typedefint(*rawdev_info_get_t)(structrte_rawdev*dev,rte_rawdev_obj_tdev_info,size_tdev_private_size)
Definitions of all functions exported by a driver through the generic structure of type rawdev_ops
supplied in the rte_rawdev structure associated with a device. Get device information of a device.
Parametersdev Raw device pointer
dev_info Raw device information structure
dev_private_size The size of the structure pointed to by dev_info->dev_private
Returns
Returns 0 on success, negative error code on failure
Definition at line 172 of file rte_rawdev_pmd.h.
typedefint(*rawdev_configure_t)(conststructrte_rawdev*dev,rte_rawdev_obj_tconfig,size_tconfig_size)
Configure a device.
Parametersdev Raw device pointer
config Void object containing device specific configuration
config_size Size of the memory allocated for the configuration
Returns
Returns 0 on success
Definition at line 189 of file rte_rawdev_pmd.h.
typedefint(*rawdev_start_t)(structrte_rawdev*dev)
Start a configured device.
Parametersdev Raw device pointer
Returns
Returns 0 on success
Definition at line 202 of file rte_rawdev_pmd.h.
typedefvoid(*rawdev_stop_t)(structrte_rawdev*dev)
Stop a configured device.
Parametersdev Raw device pointer
Definition at line 210 of file rte_rawdev_pmd.h.
typedefint(*rawdev_close_t)(structrte_rawdev*dev)
Close a configured device.
Parametersdev Raw device pointer
Returns
• 0 on success
• (-EAGAIN) if can't close as device is busy
Definition at line 222 of file rte_rawdev_pmd.h.
typedefint(*rawdev_reset_t)(structrte_rawdev*dev)
Reset a configured device.
Parametersdev Raw device pointer
Returns
0 for success !0 for failure
Definition at line 233 of file rte_rawdev_pmd.h.
typedefint(*rawdev_queue_conf_get_t)(structrte_rawdev*dev,uint16_tqueue_id,rte_rawdev_obj_tqueue_conf,size_tqueue_conf_size)
Retrieve the current raw queue configuration.
Parametersdev Raw device pointer
queue_id Raw device queue index
queue_conf Raw device queue configuration structure
queue_conf_size Size of the memory allocated for the configuration
Returns
Returns 0 on success, negative errno on failure
Definition at line 250 of file rte_rawdev_pmd.h.
typedefint(*rawdev_queue_setup_t)(structrte_rawdev*dev,uint16_tqueue_id,rte_rawdev_obj_tqueue_conf,size_tqueue_conf_size)
Setup an raw queue.
Parametersdev Raw device pointer
queue_id Rawqueue index
queue_conf Rawqueue configuration structure
queue_conf_size Size of the memory allocated for the configuration
Returns
Returns 0 on success.
Definition at line 270 of file rte_rawdev_pmd.h.
typedefint(*rawdev_queue_release_t)(structrte_rawdev*dev,uint16_tqueue_id)
Release resources allocated by given raw queue.
Parametersdev Raw device pointer
queue_id Raw queue index
Definition at line 283 of file rte_rawdev_pmd.h.
typedefuint16_t(*rawdev_queue_count_t)(structrte_rawdev*dev)
Get the count of number of queues configured on this device.
Another way to fetch this information is to fetch the device configuration. But, that assumes that the
device configuration managed by the driver has that kind of information.
This function helps in getting queue count supported, independently. It can help in cases where iterator
needs to be implemented.
Parametersdev Raw device pointer
Returns
Number of queues; 0 is assumed to be a valid response.
Definition at line 301 of file rte_rawdev_pmd.h.
typedefint(*rawdev_enqueue_bufs_t)(structrte_rawdev*dev,structrte_rawdev_buf**buffers,unsignedintcount,rte_rawdev_obj_tcontext)
Enqueue an array of raw buffers to the device.
Buffer being used is opaque - it can be obtained from mempool or from any other source. Interpretation of
buffer is responsibility of driver.
Parametersdev Raw device pointer
buffers array of buffers
count number of buffers passed
context an opaque object representing context of the call; for example, an application can pass
information about the queues on which enqueue needs to be done. Or, the enqueue operation might be
passed reference to an object containing a callback (agreed upon between application and driver).
Returns
>=0 Count of buffers successfully enqueued (0: no buffers enqueued) <0 Error count in case of error
Definition at line 325 of file rte_rawdev_pmd.h.
typedefint(*rawdev_dequeue_bufs_t)(structrte_rawdev*dev,structrte_rawdev_buf**buffers,unsignedintcount,rte_rawdev_obj_tcontext)
Dequeue an array of raw buffers from the device.
Parametersdev Raw device pointer
buffers array of buffers
count Max buffers expected to be dequeued
context an opaque object representing context of the call. Based on this object, the application and
driver can coordinate for dequeue operation involving agreed upon semantics. For example, queue
information/id on which Dequeue needs to be performed.
Returns
>0, ~0: Count of buffers returned <0: Error Whether short dequeue is success or failure is decided
between app and driver.
Definition at line 350 of file rte_rawdev_pmd.h.
typedefint(*rawdev_dump_t)(structrte_rawdev*dev,FILE*f)
Dump internal information
Parametersdev Raw device pointer
f A pointer to a file for output
Returns
0 for success, !0 Error
Definition at line 366 of file rte_rawdev_pmd.h.
typedefint(*rawdev_get_attr_t)(structrte_rawdev*dev,constchar*attr_name,uint64_t*attr_value)
Get an attribute value from implementation. Attribute is an opaque handle agreed upon between application
and PMD.
Parametersdev Raw device pointer
attr_name Opaque object representing an attribute in implementation.
attr_value [out] Opaque response to the attribute value. In case of error, this remains untouched.
This is double pointer of void type.
Returns
0 for success !0 Error; attr_value remains untouched in case of error.
Definition at line 383 of file rte_rawdev_pmd.h.
typedefint(*rawdev_set_attr_t)(structrte_rawdev*dev,constchar*attr_name,constuint64_tattr_value)
Set an attribute value. Attribute is an opaque handle agreed upon between application and PMD.
Parametersdev Raw device pointer
attr_name Opaque object representing an attribute in implementation.
attr_value Value of the attribute represented by attr_name
Returns
0 for success !0 Error
Definition at line 401 of file rte_rawdev_pmd.h.
typedefint(*rawdev_xstats_get_t)(conststructrte_rawdev*dev,constunsignedintids[],uint64_tvalues[],unsignedintn)
Retrieve a set of statistics from device. Note: Being a raw device, the stats are specific to the device
being implemented thus represented as xstats.
Parametersdev Raw device pointer
ids The stat ids to retrieve
values The returned stat values
n The number of id values and entries in the values array
Returns
The number of stat values successfully filled into the values array
Definition at line 421 of file rte_rawdev_pmd.h.
typedefint(*rawdev_xstats_reset_t)(structrte_rawdev*dev,constuint32_tids[],uint32_tnb_ids)
Resets the statistic values in xstats for the device.
Definition at line 427 of file rte_rawdev_pmd.h.
typedefint(*rawdev_xstats_get_names_t)(conststructrte_rawdev*dev,structrte_rawdev_xstats_name*xstats_names,unsignedintsize)
Get names of extended stats of an raw device
Parametersdev Raw device pointer
xstats_names Array of name values to be filled in
size Number of values in the xstats_names array
Returns
When size >= the number of stats, return the number of stat values filled into the array. When size <
the number of available stats, return the number of stats values, and do not fill in any data into
xstats_names.
Definition at line 446 of file rte_rawdev_pmd.h.
typedefuint64_t(*rawdev_xstats_get_by_name_t)(conststructrte_rawdev*dev,constchar*name,unsignedint*id)
Get value of one stats and optionally return its id
Parametersdev Raw device pointer
name The name of the stat to retrieve
id Pointer to an unsigned int where we store the stat-id. This pointer may be null if the id is not
required.
Returns
The value of the stat, or (uint64_t)-1 if the stat is not found. If the stat is not found, the id
value will be returned as (unsigned)-1, if id pointer is non-NULL
Definition at line 465 of file rte_rawdev_pmd.h.
typedefint(*rawdev_firmware_status_get_t)(structrte_rawdev*dev,rte_rawdev_obj_tstatus_info)
Get firmware/device-stack status. Implementation to allocate buffer for returning information.
Parametersdev Raw device pointer
status_info void block containing device specific status information
Returns
0 for success, !0 for failure, with undefined value in status_info
Definition at line 481 of file rte_rawdev_pmd.h.
typedefint(*rawdev_firmware_version_get_t)(structrte_rawdev*dev,rte_rawdev_obj_tversion_info)
Get firmware version information
Parametersdev Raw device pointer
version_info void pointer to version information returned by device
Returns
0 for success, !0 for failure, with undefined value in version_info
Definition at line 495 of file rte_rawdev_pmd.h.
typedefint(*rawdev_firmware_load_t)(structrte_rawdev*dev,rte_rawdev_obj_tfirmware_buf)
Load firmware from a buffer (DMA'able)
Parametersdev Raw device pointer
firmware_buf Pointer to firmware image
Returns
>0, ~0: for successful load <0: for failure
Seealso
Application may use 'firmware_version_get` for ascertaining successful load
Definition at line 512 of file rte_rawdev_pmd.h.
typedefint(*rawdev_firmware_unload_t)(structrte_rawdev*dev)
Unload firmware
Parametersdev Raw device pointer
Returns
>0, ~0 for successful unloading <0 for failure in unloading
Note: Application can use the firmware_status_get or firmware_version_get to get result of unload.
Definition at line 527 of file rte_rawdev_pmd.h.
typedefint(*rawdev_selftest_t)(uint16_tdev_id)
Start rawdev selftest
Returns
Return 0 on success
Definition at line 535 of file rte_rawdev_pmd.h.