DPDK patches and discussions
 help / color / mirror / Atom feed
From: Volodymyr Fialko <vfialko@marvell.com>
To: <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>
Cc: <anoobj@marvell.com>, Volodymyr Fialko <vfialko@marvell.com>
Subject: [PATCH v2 1/3] app/testeventdev: setup crypto adapter before sessions
Date: Fri, 4 Nov 2022 13:25:54 +0100	[thread overview]
Message-ID: <20221104122556.751286-2-vfialko@marvell.com> (raw)
In-Reply-To: <20221104122556.751286-1-vfialko@marvell.com>

Setup crypto adapter and add queue pairs before assigning them in
session metadata. Session metadata may use queue pair configuration
parameters, so queue pair should be added before meta assignment.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
---
 app/test-eventdev/test_perf_common.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 342480ffc7..6aae18fddb 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -998,6 +998,10 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 				RTE_CACHE_LINE_SIZE, opt->socket_id);
 			p->t = t;
 
+			ret = perf_event_crypto_adapter_setup(t, p);
+			if (ret)
+				return ret;
+
 			m_data.request_info.cdev_id = p->ca.cdev_id;
 			m_data.request_info.queue_pair_id = p->ca.cdev_qp_id;
 			m_data.response_info.sched_type = RTE_SCHED_TYPE_ATOMIC;
@@ -1013,12 +1017,14 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 					if (sess == NULL)
 						return -ENOMEM;
 
-					rte_cryptodev_session_event_mdata_set(
+					ret = rte_cryptodev_session_event_mdata_set(
 						cdev_id,
 						sess,
 						RTE_CRYPTO_OP_TYPE_SYMMETRIC,
 						RTE_CRYPTO_OP_WITH_SESSION,
 						&m_data, sizeof(m_data));
+					if (ret)
+						return ret;
 					p->ca.crypto_sess[flow_id] = sess;
 				} else {
 					void *sess;
@@ -1026,12 +1032,14 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 					sess = cryptodev_asym_sess_create(p, t);
 					if (sess == NULL)
 						return -ENOMEM;
-					rte_cryptodev_session_event_mdata_set(
+					ret = rte_cryptodev_session_event_mdata_set(
 						cdev_id,
 						sess,
 						RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
 						RTE_CRYPTO_OP_WITH_SESSION,
 						&m_data, sizeof(m_data));
+					if (ret)
+						return ret;
 					p->ca.crypto_sess[flow_id] = sess;
 				}
 			}
@@ -1046,10 +1054,6 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 				return ret;
 			}
 
-			ret = perf_event_crypto_adapter_setup(t, p);
-			if (ret)
-				return ret;
-
 			qp_id++;
 			prod++;
 		}
-- 
2.25.1


  reply	other threads:[~2022-11-04 12:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 17:53 [PATCH 0/2] app/testseventdev: crypto producer fixes Volodymyr Fialko
2022-11-03 17:53 ` [PATCH 1/2] app/testeventdev: setup crypto adapter before sessions Volodymyr Fialko
2022-11-03 17:53 ` [PATCH 2/2] app/testeventdev: resolve issues with crypto producer Volodymyr Fialko
2022-11-04  8:44   ` Jerin Jacob
2022-11-04  4:29 ` [PATCH 0/2] app/testseventdev: crypto producer fixes Anoob Joseph
2022-11-04 12:25 ` [PATCH v2 0/3] " Volodymyr Fialko
2022-11-04 12:25   ` Volodymyr Fialko [this message]
2022-11-04 12:25   ` [PATCH v2 2/3] app/testeventdev: fix asymmetric last stage handling Volodymyr Fialko
2022-11-04 12:25   ` [PATCH v2 3/3] app/testeventdev: fix timestamp with crypto producer Volodymyr Fialko
2022-11-07 11:01   ` [PATCH v2 0/3] app/testseventdev: crypto producer fixes Anoob Joseph
2022-11-07 18:14     ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221104122556.751286-2-vfialko@marvell.com \
    --to=vfialko@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).