]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: pass sub-event type in event
authorAnoob Joseph <anoobj@marvell.com>
Fri, 10 Jun 2022 09:24:30 +0000 (14:54 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 21 Jun 2022 18:04:49 +0000 (20:04 +0200)
Response info may have valid sub_event_type. Pass this to the event
generated by CPT.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Shijith Thotton <sthotton@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/crypto/cnxk/cn10k_cryptodev_ops.c
drivers/crypto/cnxk/cn9k_cryptodev_ops.c

index c2046d8d390352bc0f9a9a79b1c7c06a24c9aa0f..869fde01761e67fbcc50dff32d80b582f1c69913 100644 (file)
@@ -285,9 +285,10 @@ cn10k_cpt_crypto_adapter_ev_mdata_set(struct rte_cryptodev *dev __rte_unused,
 
        /* Prepare w2 */
        rsp_info = &ec_mdata->response_info;
-       w2 = CNXK_CPT_INST_W2(
-               (RTE_EVENT_TYPE_CRYPTODEV << 28) | rsp_info->flow_id,
-               rsp_info->sched_type, rsp_info->queue_id, 0);
+       w2 = CNXK_CPT_INST_W2((RTE_EVENT_TYPE_CRYPTODEV << 28) |
+                                     (rsp_info->sub_event_type << 20) |
+                                     rsp_info->flow_id,
+                             rsp_info->sched_type, rsp_info->queue_id, 0);
 
        /* Set meta according to session type */
        if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
index 9f697c79c36bd911cac76625669de35842ec2f35..eccaf398dfd35e729f3652fb2843d656c0eaed07 100644 (file)
@@ -337,9 +337,10 @@ cn9k_cpt_crypto_adapter_ev_mdata_set(struct rte_cryptodev *dev __rte_unused,
 
        /* Prepare w2 */
        rsp_info = &ec_mdata->response_info;
-       w2 = CNXK_CPT_INST_W2(
-               (RTE_EVENT_TYPE_CRYPTODEV << 28) | rsp_info->flow_id,
-               rsp_info->sched_type, rsp_info->queue_id, 0);
+       w2 = CNXK_CPT_INST_W2((RTE_EVENT_TYPE_CRYPTODEV << 28) |
+                                     (rsp_info->sub_event_type << 20) |
+                                     rsp_info->flow_id,
+                             rsp_info->sched_type, rsp_info->queue_id, 0);
 
        /* Set meta according to session type */
        if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {