patch 'cryptodev: clarify error codes for symmetric session' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:53 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=48b48d2ba834378533ec9cc10a30447d9150117d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 48b48d2ba834378533ec9cc10a30447d9150117d Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj at marvell.com>
Date: Mon, 24 Apr 2023 14:49:20 +0530
Subject: [PATCH] cryptodev: clarify error codes for symmetric session
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 ]

When symmetric sessions are created, it may fail due to non-critical
errors. When PMD doesn't support the specific combination that
application requested, it can return -ENOTSUP which can be handled so in
application. The API is already setting rte_errno according to the
reason of the failure. Clarifying this in the spec to list down possible
error codes.

Fixes: bdce2564dbf7 ("cryptodev: rework session framework")

Signed-off-by: Anoob Joseph <anoobj at marvell.com>
Acked-by: Ciara Power <ciara.power at intel.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 lib/cryptodev/rte_cryptodev.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index c678a88d7c..4c210b876c 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -977,11 +977,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
  * @param   dev_id   ID of device that we want the session to be used on
  * @param   xforms   Symmetric crypto transform operations to apply on flow
  *                   processed with this session
- * @param   mp       Mempool where the private data is allocated.
+ * @param   mp       Mempool to allocate symmetric session objects from
  *
  * @return
  *  - On success return pointer to sym-session.
- *  - On failure returns NULL.
+ *  - On failure returns NULL and rte_errno is set to the error code:
+ *    - EINVAL on invalid arguments.
+ *    - ENOMEM on memory error for session allocation.
+ *    - ENOTSUP if device doesn't support session configuration.
  */
 void *
 rte_cryptodev_sym_session_create(uint8_t dev_id,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.518922600 +0800
+++ 0075-cryptodev-clarify-error-codes-for-symmetric-session.patch	2023-06-25 14:31:58.445773900 +0800
@@ -1 +1 @@
-From 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 Mon Sep 17 00:00:00 2001
+From 48b48d2ba834378533ec9cc10a30447d9150117d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3a3bd78566184a04a28853da1cd8f4e94c2f9bc0 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 3a9ad13660..f262ad88bf 100644
+index c678a88d7c..4c210b876c 100644
@@ -27 +29 @@
-@@ -1048,11 +1048,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -977,11 +977,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,


More information about the stable mailing list