patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Lukasz Wojciechowski <>
To: Nipun Gupta <>,
	Hemant Agrawal <>,
	Shreyansh Jain <>
Subject: [dpdk-stable] [PATCH v1 2/2] raw/skeleton: allow closing already closed rawdev
Date: Mon, 21 Sep 2020 23:44:20 +0200
Message-ID: <> (raw)
In-Reply-To: <>

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")


Signed-off-by: Lukasz Wojciechowski <>
 drivers/raw/skeleton/skeleton_rawdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index f8b47a391..aa3beaad1 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -190,9 +190,11 @@ static int skeleton_rawdev_close(struct rte_rawdev *dev)
+		SKELETON_PMD_DEBUG("Device already in stopped state");
+		break;
-		SKELETON_PMD_DEBUG("Device already in stopped state");
+		SKELETON_PMD_DEBUG("Device in impossible state");
 		ret = -EINVAL;

  parent reply	other threads:[~2020-09-21 21:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2020-09-21 21:44 ` [dpdk-stable] [PATCH v1 1/2] raw/skeleton: reset rawdev test statistics Lukasz Wojciechowski
     [not found]   ` <>
2020-09-21 21:44     ` Lukasz Wojciechowski [this message]
2020-09-22  4:15   ` Hemant Agrawal
2020-10-06 21:31   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone