| e640362b | 21-Sep-2020 |
Lukasz Wojciechowski <[email protected]> |
raw/skeleton: allow closing already closed device
This patch return OK code (0) from skeleton_rawdev_close function if firmware is in SKELETON_FW_READY state. Formerly it returned -EINVAL error code
raw/skeleton: allow closing already closed device
This patch return OK code (0) from skeleton_rawdev_close function if firmware is in SKELETON_FW_READY state. Formerly it returned -EINVAL error code.
Returning an error here is troublesome as it disallows proper release of the rawdev. The rte_rawdev_pmd_release function from librte_rawdev library calls drivers' rawdev_close handler and continues execution only in case of errorless call. (see lib/librte_rawdev/rte_rawdev.c:540)
The SKELETON_FW_READY state is reached after creation, reset, unload or close of the device. The device should be ok to be released in such situations.
To reproduce issue fixed by this patch, call rawdev_autotest from dpdk-test app for few times. As the device is not properly released, the next calls will fail.
Fixes: 61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver") Cc: [email protected]
Signed-off-by: Lukasz Wojciechowski <[email protected]>
show more ...
|
| 13f8e4a2 | 10-Sep-2020 |
Bruce Richardson <[email protected]> |
rawdev: allow queue config query to return error
The driver APIs for returning the queue default config can fail if the parameters are invalid, or other reasons, so allow them to return error codes
rawdev: allow queue config query to return error
The driver APIs for returning the queue default config can fail if the parameters are invalid, or other reasons, so allow them to return error codes to the rawdev layer and from hence to the app.
Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Nipun Gupta <[email protected]>
show more ...
|
| f574ed81 | 10-Sep-2020 |
Bruce Richardson <[email protected]> |
rawdev: add private data size to queue config inputs
The queue setup and queue defaults query functions take a void * parameter as configuration data, preventing any compile-time checking of the par
rawdev: add private data size to queue config inputs
The queue setup and queue defaults query functions take a void * parameter as configuration data, preventing any compile-time checking of the parameters and limiting runtime checks. Adding in the length of the expected structure provides a measure of typechecking, and can also be used for ABI compatibility in future, since ABI changes involving structs almost always involve a change in size.
Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Nipun Gupta <[email protected]>
show more ...
|