DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] crypto: fix element size for undefined crypto op
@ 2018-10-09 14:16 Junxiao Shi
  2018-10-10  5:10 ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Junxiao Shi @ 2018-10-09 14:16 UTC (permalink / raw)
  To: dev; +Cc: stable, akhil.goyal

The documentation of rte_crypto_op_pool_create indicates that
specifying RTE_CRYPTO_OP_TYPE_UNDEFINED would create a pool that
supports all operation types. This change makes the code
consistent with documentation.

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
oriented")

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 63ae23f00..608323fdd 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1477,6 +1477,9 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
 		elt_size += sizeof(struct rte_crypto_sym_op);
 	} else if (type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
 		elt_size += sizeof(struct rte_crypto_asym_op);
+	} else if (type == RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+		elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op),
+		                    sizeof(struct rte_crypto_asym_op));
 	} else {
 		CDEV_LOG_ERR("Invalid op_type\n");
 		return NULL;
-- 
2.15.0.windows.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] crypto: fix element size for undefined crypto op
  2018-10-09 14:16 [dpdk-dev] [PATCH v2] crypto: fix element size for undefined crypto op Junxiao Shi
@ 2018-10-10  5:10 ` Akhil Goyal
  2018-10-10  5:26   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Akhil Goyal @ 2018-10-10  5:10 UTC (permalink / raw)
  To: Junxiao Shi, dev; +Cc: stable



On 10/9/2018 7:46 PM, Junxiao Shi wrote:
> The documentation of rte_crypto_op_pool_create indicates that
> specifying RTE_CRYPTO_OP_TYPE_UNDEFINED would create a pool that
> supports all operation types. This change makes the code
> consistent with documentation.
>
> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> oriented")
>
> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2] crypto: fix element size for undefined crypto op
  2018-10-10  5:10 ` Akhil Goyal
@ 2018-10-10  5:26   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2018-10-10  5:26 UTC (permalink / raw)
  To: Junxiao Shi, dev; +Cc: stable



On 10/10/2018 10:40 AM, Akhil Goyal wrote:
>
>
> On 10/9/2018 7:46 PM, Junxiao Shi wrote:
>> The documentation of rte_crypto_op_pool_create indicates that
>> specifying RTE_CRYPTO_OP_TYPE_UNDEFINED would create a pool that
>> supports all operation types. This change makes the code
>> consistent with documentation.
>>
>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
>> oriented")
>>
>> Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
>> ---
>>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto
modified the patch title to
crypto: fix pool element size for undefined crypto op

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-10  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 14:16 [dpdk-dev] [PATCH v2] crypto: fix element size for undefined crypto op Junxiao Shi
2018-10-10  5:10 ` Akhil Goyal
2018-10-10  5:26   ` Akhil Goyal

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