Acked-by: Abhinandan Gujjar <abhinandan.guj...@intel.com>

> -----Original Message-----
> From: Akhil Goyal <gak...@marvell.com>
> Sent: Thursday, April 21, 2022 8:07 PM
> To: dev@dpdk.org
> Cc: ano...@marvell.com; jer...@marvell.com; Gujjar, Abhinandan S
> <abhinandan.guj...@intel.com>; Jayatheerthan, Jay
> <jay.jayatheert...@intel.com>; Vangati, Narender
> <narender.vang...@intel.com>; vfia...@marvell.com; Akhil Goyal
> <gak...@marvell.com>
> Subject: [PATCH v3 4/7] test/event: use new API to set event crypto metadata
> 
> Used the new API rte_cryptodev_set_session_event_mdata to set event crypto
> metadata from the applications (app/test and
> app/test-eventdev) instead of using session userdata.
> 
> Signed-off-by: Akhil Goyal <gak...@marvell.com>
> ---
>  app/test-eventdev/test_perf_common.c |  8 ++++++--
> app/test/test_event_crypto_adapter.c | 12 ++++++++----
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test-eventdev/test_perf_common.c b/app/test-
> eventdev/test_perf_common.c
> index 9d1f4a4567..0378607cda 100644
> --- a/app/test-eventdev/test_perf_common.c
> +++ b/app/test-eventdev/test_perf_common.c
> @@ -835,8 +835,12 @@ perf_event_dev_port_setup(struct evt_test *test,
> struct evt_options *opt,
>                                       return -ENOMEM;
> 
>                               m_data.response_info.flow_id = flow_id;
> -                             rte_cryptodev_sym_session_set_user_data(
> -                                     crypto_sess, &m_data,
> sizeof(m_data));
> +
>       rte_cryptodev_session_event_mdata_set(cdev_id,
> +                                             crypto_sess,
> +
>       RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> +
>       RTE_CRYPTO_OP_WITH_SESSION,
> +                                             &m_data, sizeof(m_data));
> +
>                               p->ca.crypto_sess[flow_id] = crypto_sess;
>                       }
> 
> diff --git a/app/test/test_event_crypto_adapter.c
> b/app/test/test_event_crypto_adapter.c
> index 688520db4e..9904206735 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -227,8 +227,10 @@ test_op_forward_mode(uint8_t session_less)
>                       m_data.request_info.queue_pair_id =
>                               request_info.queue_pair_id;
>                       m_data.response_info.event = response_info.event;
> -                     rte_cryptodev_sym_session_set_user_data(sess,
> -                                             &m_data, sizeof(m_data));
> +
>       rte_cryptodev_session_event_mdata_set(TEST_CDEV_ID,
> +                                     sess,
> RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> +                                     RTE_CRYPTO_OP_WITH_SESSION,
> +                                     &m_data, sizeof(m_data));
>               }
> 
>               rte_crypto_op_attach_sym_session(op, sess); @@ -416,8
> +418,10 @@ test_op_new_mode(uint8_t session_less)
>               if (cap &
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
>                       /* Fill in private user data information */
>                       m_data.response_info.event = response_info.event;
> -                     rte_cryptodev_sym_session_set_user_data(sess,
> -                                             &m_data, sizeof(m_data));
> +
>       rte_cryptodev_session_event_mdata_set(TEST_CDEV_ID,
> +                                     sess,
> RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> +                                     RTE_CRYPTO_OP_WITH_SESSION,
> +                                     &m_data, sizeof(m_data));
>               }
>               ret = rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
>                               &cipher_xform, params.session_priv_mpool);
> --
> 2.25.1

Reply via email to