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 <gakhil@marvell.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com> Acked-by: Anoob Joseph <anoobj@marvell.com>
This commit is contained in:
parent
a974f7cb6b
commit
4c43055c0f
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user