numam-dpdk/drivers/raw/skeleton
Lukasz Wojciechowski e640362b34 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: 61c592a8d0 ("raw/skeleton: introduce skeleton rawdev driver")
Cc: stable@dpdk.org

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
2020-10-06 23:30:36 +02:00
..
meson.build drivers/raw: remove rawdev from directory names 2019-07-30 15:20:41 +02:00
rte_rawdev_skeleton_version.map version: 20.11-rc0 2020-08-12 11:32:16 +02:00
skeleton_rawdev_test.c raw/skeleton: reset test statistics 2020-10-06 23:29:54 +02:00
skeleton_rawdev.c raw/skeleton: allow closing already closed device 2020-10-06 23:30:36 +02:00
skeleton_rawdev.h drivers/raw: remove rawdev from directory names 2019-07-30 15:20:41 +02:00