* [PATCH] cryptodev: clarify error codes returned
@ 2023-04-24 9:19 Anoob Joseph
2023-05-08 12:32 ` Power, Ciara
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anoob Joseph @ 2023-04-24 9:19 UTC (permalink / raw)
To: Akhil Goyal, Fan Zhang; +Cc: Jerin Jacob, dev
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@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 3a9ad13660..4e3a7db0fe 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1048,11 +1048,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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] cryptodev: clarify error codes returned
2023-04-24 9:19 [PATCH] cryptodev: clarify error codes returned Anoob Joseph
@ 2023-05-08 12:32 ` Power, Ciara
2023-05-16 10:43 ` Akhil Goyal
2023-06-11 10:05 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Power, Ciara @ 2023-05-08 12:32 UTC (permalink / raw)
To: Anoob Joseph, Akhil Goyal, Fan Zhang; +Cc: Jerin Jacob, dev
Hi Anoob,
> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Monday 24 April 2023 10:19
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dev@dpdk.org
> Subject: [PATCH] cryptodev: clarify error codes returned
>
> 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@marvell.com>
> ---
> lib/cryptodev/rte_cryptodev.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Acked-by: Ciara Power <ciara.power@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] cryptodev: clarify error codes returned
2023-04-24 9:19 [PATCH] cryptodev: clarify error codes returned Anoob Joseph
2023-05-08 12:32 ` Power, Ciara
@ 2023-05-16 10:43 ` Akhil Goyal
2023-05-24 10:59 ` Akhil Goyal
2023-06-11 10:05 ` Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Akhil Goyal @ 2023-05-16 10:43 UTC (permalink / raw)
To: Anoob Joseph, Fan Zhang; +Cc: Jerin Jacob Kollanukkaran, dev
> Subject: [PATCH] cryptodev: clarify error codes returned
>
> 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@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] cryptodev: clarify error codes returned
2023-05-16 10:43 ` Akhil Goyal
@ 2023-05-24 10:59 ` Akhil Goyal
0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2023-05-24 10:59 UTC (permalink / raw)
To: Akhil Goyal, Anoob Joseph, Fan Zhang
Cc: Jerin Jacob Kollanukkaran, dev, stable
> > Subject: [PATCH] cryptodev: clarify error codes returned
> >
> > 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@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>
Cc: stable@dpdk.org
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cryptodev: clarify error codes returned
2023-04-24 9:19 [PATCH] cryptodev: clarify error codes returned Anoob Joseph
2023-05-08 12:32 ` Power, Ciara
2023-05-16 10:43 ` Akhil Goyal
@ 2023-06-11 10:05 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2023-06-11 10:05 UTC (permalink / raw)
To: Anoob Joseph
Cc: Akhil Goyal, Fan Zhang, Jerin Jacob, dev, david.marchand, ciara.power
24/04/2023 11:19, Anoob Joseph:
> 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@marvell.com>
[...]
> * @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.
If you don't make bullets, all lines are rendered on the same line, without any separator:
"
Returns
On success return pointer to sym-session.
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.
"
In general, you must check the HTML rendering of the doc changes.
I am fixing while pulling.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-11 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-24 9:19 [PATCH] cryptodev: clarify error codes returned Anoob Joseph
2023-05-08 12:32 ` Power, Ciara
2023-05-16 10:43 ` Akhil Goyal
2023-05-24 10:59 ` Akhil Goyal
2023-06-11 10:05 ` Thomas Monjalon
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).