DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
To: <dev@dpdk.org>
Cc: <jianjay.zhou@huawei.com>,
	Rajesh Mudimadugula <rmudimadugul@marvell.com>
Subject: [PATCH] crypto/virtio: return proper error in session fail
Date: Wed, 8 Jan 2025 17:44:27 +0530	[thread overview]
Message-ID: <20250108121427.3715-1-rmudimadugul@marvell.com> (raw)

Return relevant error code when crypto session configure
fails.

Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
---
 drivers/crypto/virtio/virtio_cryptodev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 98415af123..ebb53cd483 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1373,6 +1373,7 @@ virtio_crypto_sym_configure_session(
 		}
 		break;
 	default:
+		ret = -ENOTSUP;
 		VIRTIO_CRYPTO_SESSION_LOG_ERR(
 			"Unsupported operation chain order parameter");
 		goto error_out;
@@ -1380,7 +1381,7 @@ virtio_crypto_sym_configure_session(
 	return 0;
 
 error_out:
-	return -1;
+	return ret;
 }
 
 static void
-- 
2.34.1


                 reply	other threads:[~2025-01-08 12:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20250108121427.3715-1-rmudimadugul@marvell.com \
    --to=rmudimadugul@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jianjay.zhou@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).