DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
@ 2019-10-01 11:33 Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support Hemant Agrawal
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar

The IV was not set, which was causing HW based SEC on DPAA1
to fail.

Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
Please squash if possible.

 app/test/test_event_crypto_adapter.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 652e458f0..bf83a6357 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
 	struct rte_event ev;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op,
@@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
 	struct rte_mbuf *m;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
-- 
2.17.1


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

* [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
@ 2019-10-01 11:33 ` Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 3/6] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar

When HW is available but the mode mismatches, it is better
to skip the test case.

Fixes: cfe599b325e8 ("test/event_crypto: no service core when HW support available")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
please squash if possible.

 app/test/test_event_crypto_adapter.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index bf83a6357..d3d19b98e 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -302,6 +302,10 @@ test_sessionless_with_op_forward_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
 				"Failed to start event crypto adapter");
@@ -323,6 +327,10 @@ test_session_with_op_forward_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID
 				), "Failed to start event crypto adapter");
@@ -458,6 +466,10 @@ test_sessionless_with_op_new_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
+			return TEST_SKIPPED;
+	}
 
 	/* start the event crypto adapter */
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
@@ -480,6 +492,10 @@ test_session_with_op_new_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
 				"Failed to start event crypto adapter");
-- 
2.17.1


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

* [dpdk-dev] [PATCH 3/6] test/event_crypto: fix to avail the mempool entries
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support Hemant Agrawal
@ 2019-10-01 11:33 ` Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 4/6] test/event_crypto: support to release the atomic ctxt Hemant Agrawal
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar, stable

Added the missed code to avail the mempool entries before
pool free.

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
The file location has been changed, thus check-git-log is giving err on
this patch
 app/test/test_event_crypto_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index d3d19b98e..8d42462d8 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -905,6 +905,7 @@ crypto_teardown(void)
 		params.session_mpool = NULL;
 	}
 	if (params.session_priv_mpool != NULL) {
+		rte_mempool_avail_count(params.session_priv_mpool);
 		rte_mempool_free(params.session_priv_mpool);
 		params.session_priv_mpool = NULL;
 	}
-- 
2.17.1


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

* [dpdk-dev] [PATCH 4/6] test/event_crypto: support to release the atomic ctxt
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 3/6] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
@ 2019-10-01 11:33 ` Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 5/6] test/event_crypto: use device cap instead of fixed values Hemant Agrawal
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar

The test cases uses ATOMIC queues. Once the packet is recived
it is required to release the ATOMIC ctxt, at least for the
HW based eventdevs. This patch makes empty dq call, which
in turn releases the atomic ctxt.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 8d42462d8..b9e3a439e 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -357,6 +357,12 @@ send_op_recv_ev(struct rte_crypto_op *op)
 		rte_pause();
 
 	recv_op = ev.event_ptr;
+
+	/* In case of Atomic/Ordered Queue, call dequeue one more time
+	 * to release, if there is any atomic context to be freed
+	 */
+	rte_event_dequeue_burst(evdev, TEST_APP_PORT_ID, &ev, NUM, 0);
+
 #if PKT_TRACE
 	struct rte_mbuf *m = recv_op->sym->m_src;
 	rte_pktmbuf_dump(stdout, m, rte_pktmbuf_pkt_len(m));
-- 
2.17.1


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

* [dpdk-dev] [PATCH 5/6] test/event_crypto: use device cap instead of fixed values
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
                   ` (2 preceding siblings ...)
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 4/6] test/event_crypto: support to release the atomic ctxt Hemant Agrawal
@ 2019-10-01 11:33 ` Hemant Agrawal
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 6/6] test/event_crypto: separate the NEW and FWD mode inits Hemant Agrawal
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar

Instead of hardcoded event device capabilities,
it is better to enquire and use the device supported caps.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index b9e3a439e..6b10909e3 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -703,12 +703,11 @@ test_crypto_adapter_free(void)
 static int
 test_crypto_adapter_create(void)
 {
-	struct rte_event_port_conf conf = {
-		.dequeue_depth = 8,
-		.enqueue_depth = 8,
-		.new_event_threshold = 1200,
-	};
 	int ret;
+	struct rte_event_port_conf conf;
+
+	ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf);
+	TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info");
 
 	/* Create adapter with default port creation callback */
 	ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
@@ -747,14 +746,12 @@ test_crypto_adapter_qp_add_del(void)
 static int
 configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode)
 {
-	struct rte_event_port_conf conf = {
-		.dequeue_depth = 8,
-		.enqueue_depth = 8,
-		.new_event_threshold = 1200,
-	};
-
 	uint32_t cap;
 	int ret;
+	struct rte_event_port_conf conf;
+
+	ret = rte_event_port_default_conf_get(TEST_CDEV_ID, 0, &conf);
+	TEST_ASSERT_SUCCESS(ret, "Failed to get port0 info");
 
 	/* Create adapter with default port creation callback */
 	ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
-- 
2.17.1


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

* [dpdk-dev] [PATCH 6/6] test/event_crypto: separate the NEW and FWD mode inits
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
                   ` (3 preceding siblings ...)
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 5/6] test/event_crypto: use device cap instead of fixed values Hemant Agrawal
@ 2019-10-01 11:33 ` Hemant Agrawal
  2019-10-03  3:24 ` [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:33 UTC (permalink / raw)
  To: dev; +Cc: jerinj, abhinandan.gujjar

The earlier patch was using a single method to init
the crypto adapter for FWD and NEW mode, which was also
causing the adapter mode to be set incorrectly for NEW mode.

This patch segregate the init for NEW and FWD modes.
In case of NEW mode the packets will be directly sent
to the cryptodev, so port linking is not required.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 78 ++++++++++++++++++++++------
 1 file changed, 63 insertions(+), 15 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 6b10909e3..e396358f2 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -789,26 +789,44 @@ test_crypto_adapter_stop(void)
 		rte_service_runstate_set(adapter_service_id, 0);
 		rte_service_lcore_stop(slcore_id);
 		rte_service_lcore_del(slcore_id);
-		rte_event_crypto_adapter_stop(TEST_ADAPTER_ID);
 	}
+	rte_event_crypto_adapter_stop(TEST_ADAPTER_ID);
 
 	if (rte_event_dev_service_id_get(evdev, &evdev_service_id) == 0) {
 		rte_service_runstate_set(evdev_service_id, 0);
 		rte_service_lcore_stop(slcore_id);
 		rte_service_lcore_del(slcore_id);
-		rte_event_dev_stop(evdev);
+	}
+	rte_event_dev_stop(evdev);
+}
+
+static void
+test_crypto_adapter_clear(void)
+{
+	uint8_t qid;
+	test_crypto_adapter_stop();
+
+	if (crypto_adapter_setup_done) {
+		qid = TEST_CRYPTO_EV_QUEUE_ID;
+		rte_event_port_unlink(evdev, params.crypto_event_port_id,
+					&qid, 1);
+		rte_event_crypto_adapter_queue_pair_del(TEST_ADAPTER_ID,
+						TEST_CDEV_ID, TEST_CDEV_QP_ID);
+		rte_event_crypto_adapter_free(TEST_ADAPTER_ID);
+		crypto_adapter_setup_done = 0;
 	}
 }
 
 static int
-test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode)
+test_crypto_adapter_conf(void)
 {
 	uint32_t evdev_service_id;
 	uint8_t qid;
 	int ret;
 
 	if (!crypto_adapter_setup_done) {
-		ret = configure_event_crypto_adapter(mode);
+		ret = configure_event_crypto_adapter(
+			RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD);
 		if (!ret) {
 			qid = TEST_CRYPTO_EV_QUEUE_ID;
 			ret = rte_event_port_link(evdev,
@@ -845,24 +863,54 @@ test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode)
 }
 
 static int
-test_crypto_adapter_conf_op_forward_mode(void)
+test_crypto_adapter_conf_new(void)
 {
-	enum rte_event_crypto_adapter_mode mode;
+	uint32_t evdev_service_id;
+	int ret;
 
-	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
-	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
-				"Failed to config crypto adapter");
+	if (!crypto_adapter_setup_done) {
+		ret = configure_event_crypto_adapter(
+			RTE_EVENT_CRYPTO_ADAPTER_OP_NEW);
+		TEST_ASSERT_SUCCESS(ret, "Failed to config crypto adapter");
+		crypto_adapter_setup_done = 1;
+	}
+
+	/* retrieve service ids */
+	if (rte_event_dev_service_id_get(evdev, &evdev_service_id) == 0) {
+		/* add a service core and start it */
+		TEST_ASSERT_SUCCESS(rte_service_lcore_add(slcore_id),
+					"Failed to add service core");
+		TEST_ASSERT_SUCCESS(rte_service_lcore_start(slcore_id),
+					"Failed to start service core");
+
+		/* map services to it */
+		TEST_ASSERT_SUCCESS(rte_service_map_lcore_set(evdev_service_id,
+				slcore_id, 1), "Failed to map evdev service");
+
+		/* set services to running */
+		TEST_ASSERT_SUCCESS(rte_service_runstate_set(evdev_service_id,
+					1), "Failed to start evdev service");
+	}
+
+	/* start the eventdev */
+	TEST_ASSERT_SUCCESS(rte_event_dev_start(evdev),
+				"Failed to start event device");
 
 	return TEST_SUCCESS;
 }
 
 static int
-test_crypto_adapter_conf_op_new_mode(void)
+test_crypto_adapter_conf_op_forward_mode(void)
 {
-	enum rte_event_crypto_adapter_mode mode;
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(),
+				"Failed to config crypto adapter");
+	return TEST_SUCCESS;
+}
 
-	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
-	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+static int
+test_crypto_adapter_conf_op_new_mode(void)
+{
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf_new(),
 				"Failed to config crypto adapter");
 
 	return TEST_SUCCESS;
@@ -957,7 +1005,7 @@ static struct unit_test_suite functional_testsuite = {
 				test_session_with_op_forward_mode),
 
 		TEST_CASE_ST(test_crypto_adapter_conf_op_forward_mode,
-				test_crypto_adapter_stop,
+				test_crypto_adapter_clear,
 				test_sessionless_with_op_forward_mode),
 
 		TEST_CASE_ST(test_crypto_adapter_conf_op_new_mode,
@@ -965,7 +1013,7 @@ static struct unit_test_suite functional_testsuite = {
 				test_session_with_op_new_mode),
 
 		TEST_CASE_ST(test_crypto_adapter_conf_op_new_mode,
-				test_crypto_adapter_stop,
+				test_crypto_adapter_clear,
 				test_sessionless_with_op_new_mode),
 
 		TEST_CASES_END() /**< NULL terminate unit test array */
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
                   ` (4 preceding siblings ...)
  2019-10-01 11:33 ` [dpdk-dev] [PATCH 6/6] test/event_crypto: separate the NEW and FWD mode inits Hemant Agrawal
@ 2019-10-03  3:24 ` Jerin Jacob
  2019-10-03  4:52   ` Gujjar, Abhinandan S
  2019-10-04  9:35 ` Gujjar, Abhinandan S
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
  7 siblings, 1 reply; 19+ messages in thread
From: Jerin Jacob @ 2019-10-03  3:24 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk-dev, Jerin Jacob, Gujjar, Abhinandan S

On Tue, Oct 1, 2019 at 5:06 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> The IV was not set, which was causing HW based SEC on DPAA1
> to fail.
>
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Abhinandan,

Could you please review the crypto adapter fixes, I would like to pull
this for RC1 if possible.


> ---
> Please squash if possible.
>
>  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
> index 652e458f0..bf83a6357 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
>         struct rte_event ev;
>         uint32_t cap;
>         int ret;
> +       uint8_t cipher_key[17];
>
>         memset(&m_data, 0, sizeof(m_data));
>
> @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
>         cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>         cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
>
> +       cipher_xform.cipher.key.data = cipher_key;
> +       cipher_xform.cipher.key.length = 16;
> +       cipher_xform.cipher.iv.offset = IV_OFFSET;
> +       cipher_xform.cipher.iv.length = 16;
> +
>         op = rte_crypto_op_alloc(params.op_mpool,
>                         RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>         TEST_ASSERT_NOT_NULL(op,
> @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
>         struct rte_mbuf *m;
>         uint32_t cap;
>         int ret;
> +       uint8_t cipher_key[17];
>
>         memset(&m_data, 0, sizeof(m_data));
>
> @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
>         cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>         cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
>
> +       cipher_xform.cipher.key.data = cipher_key;
> +       cipher_xform.cipher.key.length = 16;
> +       cipher_xform.cipher.iv.offset = IV_OFFSET;
> +       cipher_xform.cipher.iv.length = 16;
> +
>         op = rte_crypto_op_alloc(params.op_mpool,
>                         RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>         TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> --
> 2.17.1
>

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

* Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
  2019-10-03  3:24 ` [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
@ 2019-10-03  4:52   ` Gujjar, Abhinandan S
  0 siblings, 0 replies; 19+ messages in thread
From: Gujjar, Abhinandan S @ 2019-10-03  4:52 UTC (permalink / raw)
  To: Jerin Jacob, Hemant Agrawal; +Cc: dpdk-dev, Jerin Jacob

Sure Jerin.

Regards
Abhinandan

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Thursday, October 3, 2019 8:54 AM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>
> Cc: dpdk-dev <dev@dpdk.org>; Jerin Jacob <jerinj@marvell.com>; Gujjar,
> Abhinandan S <abhinandan.gujjar@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for
> AES algo
> 
> On Tue, Oct 1, 2019 at 5:06 PM Hemant Agrawal <hemant.agrawal@nxp.com>
> wrote:
> >
> > The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> 
> Abhinandan,
> 
> Could you please review the crypto adapter fixes, I would like to pull this for RC1
> if possible.
> 
> 
> > ---
> > Please squash if possible.
> >
> >  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/app/test/test_event_crypto_adapter.c
> > b/app/test/test_event_crypto_adapter.c
> > index 652e458f0..bf83a6357 100644
> > --- a/app/test/test_event_crypto_adapter.c
> > +++ b/app/test/test_event_crypto_adapter.c
> > @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
> >         struct rte_event ev;
> >         uint32_t cap;
> >         int ret;
> > +       uint8_t cipher_key[17];
> >
> >         memset(&m_data, 0, sizeof(m_data));
> >
> > @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
> >         cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
> >         cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> >
> > +       cipher_xform.cipher.key.data = cipher_key;
> > +       cipher_xform.cipher.key.length = 16;
> > +       cipher_xform.cipher.iv.offset = IV_OFFSET;
> > +       cipher_xform.cipher.iv.length = 16;
> > +
> >         op = rte_crypto_op_alloc(params.op_mpool,
> >                         RTE_CRYPTO_OP_TYPE_SYMMETRIC);
> >         TEST_ASSERT_NOT_NULL(op,
> > @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
> >         struct rte_mbuf *m;
> >         uint32_t cap;
> >         int ret;
> > +       uint8_t cipher_key[17];
> >
> >         memset(&m_data, 0, sizeof(m_data));
> >
> > @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
> >         cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
> >         cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> >
> > +       cipher_xform.cipher.key.data = cipher_key;
> > +       cipher_xform.cipher.key.length = 16;
> > +       cipher_xform.cipher.iv.offset = IV_OFFSET;
> > +       cipher_xform.cipher.iv.length = 16;
> > +
> >         op = rte_crypto_op_alloc(params.op_mpool,
> >                         RTE_CRYPTO_OP_TYPE_SYMMETRIC);
> >         TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> > --
> > 2.17.1
> >

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

* Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
                   ` (5 preceding siblings ...)
  2019-10-03  3:24 ` [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
@ 2019-10-04  9:35 ` Gujjar, Abhinandan S
  2019-10-16  8:01   ` Jerin Jacob
  2019-10-18  5:28   ` Hemant Agrawal
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
  7 siblings, 2 replies; 19+ messages in thread
From: Gujjar, Abhinandan S @ 2019-10-04  9:35 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: jerinj

Hi Hemanth,

I tried to test the series of patches on test with SW adapter.
Looks like, test hangs after 3rd case!
Not sure, if I am missing any params to be passed to the app or anything else has to be done.

+ ------------------------------------------------------- +
 + TestCase [ 0] : test_crypto_adapter_create succeeded
 + TestCase [ 1] : test_crypto_adapter_qp_add_del succeeded
 +------------------------------------------------------+
 + Crypto adapter stats for instance 0:
 + Event port poll count          0
 + Event dequeue count            0
 + Cryptodev enqueue count        0
 + Cryptodev enqueue failed count 0
 + Cryptodev dequeue count        0
 + Event enqueue count            0
 + Event enqueue retry count      0
 + Event enqueue fail count       0
 +------------------------------------------------------+
 + TestCase [ 2] : test_crypto_adapter_stats succeeded


> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Tuesday, October 1, 2019 5:04 PM
> To: dev@dpdk.org
> Cc: jerinj@marvell.com; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Subject: [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
> 
> The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> 
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Please squash if possible.
> 
>  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/app/test/test_event_crypto_adapter.c
> b/app/test/test_event_crypto_adapter.c
> index 652e458f0..bf83a6357 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
>  	struct rte_event ev;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op,
> @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
>  	struct rte_mbuf *m;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
  2019-10-04  9:35 ` Gujjar, Abhinandan S
@ 2019-10-16  8:01   ` Jerin Jacob
  2019-10-18  5:28   ` Hemant Agrawal
  1 sibling, 0 replies; 19+ messages in thread
From: Jerin Jacob @ 2019-10-16  8:01 UTC (permalink / raw)
  To: Gujjar, Abhinandan S; +Cc: Hemant Agrawal, dev, jerinj

On Fri, Oct 4, 2019 at 3:05 PM Gujjar, Abhinandan S
<abhinandan.gujjar@intel.com> wrote:
>
> Hi Hemanth,
>
> I tried to test the series of patches on test with SW adapter.
> Looks like, test hangs after 3rd case!
> Not sure, if I am missing any params to be passed to the app or anything else has to be done.

Waiting for your reply to review further and apply to the
next-eventdev tree(after getting the ack from Abhinandan)

>
> + ------------------------------------------------------- +
>  + TestCase [ 0] : test_crypto_adapter_create succeeded
>  + TestCase [ 1] : test_crypto_adapter_qp_add_del succeeded
>  +------------------------------------------------------+
>  + Crypto adapter stats for instance 0:
>  + Event port poll count          0
>  + Event dequeue count            0
>  + Cryptodev enqueue count        0
>  + Cryptodev enqueue failed count 0
>  + Cryptodev dequeue count        0
>  + Event enqueue count            0
>  + Event enqueue retry count      0
>  + Event enqueue fail count       0
>  +------------------------------------------------------+
>  + TestCase [ 2] : test_crypto_adapter_stats succeeded
>

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

* Re: [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
  2019-10-04  9:35 ` Gujjar, Abhinandan S
  2019-10-16  8:01   ` Jerin Jacob
@ 2019-10-18  5:28   ` Hemant Agrawal
  1 sibling, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-10-18  5:28 UTC (permalink / raw)
  To: Gujjar, Abhinandan S, dev; +Cc: jerinj

Hi Abhinandan,
	

> -----Original Message-----
> From: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Sent: Friday, October 4, 2019 3:06 PM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>; dev@dpdk.org
> Cc: jerinj@marvell.com
> Subject: RE: [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo
> Importance: High
> 
> Hi Hemanth,
> 
> I tried to test the series of patches on test with SW adapter.
> Looks like, test hangs after 3rd case!
> Not sure, if I am missing any params to be passed to the app or anything else
> has to be done.

[Hemant] OK, let me split this series into 2. 
I will send the restructuring patch separately post rework. Most likely that patch is causing hang on x86.

> 
> + ------------------------------------------------------- +
>  + TestCase [ 0] : test_crypto_adapter_create succeeded  + TestCase [ 1] :
> test_crypto_adapter_qp_add_del succeeded  +-----------------------------------
> -------------------+
>  + Crypto adapter stats for instance 0:
>  + Event port poll count          0
>  + Event dequeue count            0
>  + Cryptodev enqueue count        0
>  + Cryptodev enqueue failed count 0
>  + Cryptodev dequeue count        0
>  + Event enqueue count            0
>  + Event enqueue retry count      0
>  + Event enqueue fail count       0
>  +------------------------------------------------------+
>  + TestCase [ 2] : test_crypto_adapter_stats succeeded
> 
> 
> > -----Original Message-----
> > From: Hemant Agrawal <hemant.agrawal@nxp.com>
> > Sent: Tuesday, October 1, 2019 5:04 PM
> > To: dev@dpdk.org
> > Cc: jerinj@marvell.com; Gujjar, Abhinandan S
> > <abhinandan.gujjar@intel.com>
> > Subject: [PATCH 1/6] test/event_crypto: fix missing IV value for AES
> > algo
> >
> > The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> > Please squash if possible.
> >
> >  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/app/test/test_event_crypto_adapter.c
> > b/app/test/test_event_crypto_adapter.c
> > index 652e458f0..bf83a6357 100644
> > --- a/app/test/test_event_crypto_adapter.c
> > +++ b/app/test/test_event_crypto_adapter.c
> > @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
> >  	struct rte_event ev;
> >  	uint32_t cap;
> >  	int ret;
> > +	uint8_t cipher_key[17];
> >
> >  	memset(&m_data, 0, sizeof(m_data));
> >
> > @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
> >  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
> >  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> >
> > +	cipher_xform.cipher.key.data = cipher_key;
> > +	cipher_xform.cipher.key.length = 16;
> > +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> > +	cipher_xform.cipher.iv.length = 16;
> > +
> >  	op = rte_crypto_op_alloc(params.op_mpool,
> >  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
> >  	TEST_ASSERT_NOT_NULL(op,
> > @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
> >  	struct rte_mbuf *m;
> >  	uint32_t cap;
> >  	int ret;
> > +	uint8_t cipher_key[17];
> >
> >  	memset(&m_data, 0, sizeof(m_data));
> >
> > @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
> >  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
> >  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> >
> > +	cipher_xform.cipher.key.data = cipher_key;
> > +	cipher_xform.cipher.key.length = 16;
> > +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> > +	cipher_xform.cipher.iv.length = 16;
> > +
> >  	op = rte_crypto_op_alloc(params.op_mpool,
> >  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
> >  	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> > --
> > 2.17.1


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

* [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
                   ` (6 preceding siblings ...)
  2019-10-04  9:35 ` Gujjar, Abhinandan S
@ 2019-11-07  9:01 ` " Hemant Agrawal
  2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 2/3] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
                     ` (4 more replies)
  7 siblings, 5 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-11-07  9:01 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, abhinandan.gujjar

The IV was not set, which was causing HW based SEC on DPAA1
to fail.

Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
Sending only the fixes. dropped the functional changes

 app/test/test_event_crypto_adapter.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 652e458f0..bf83a6357 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
 	struct rte_event ev;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op,
@@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
 	struct rte_mbuf *m;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 2/3] test/event_crypto: fix to avail the mempool entries
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
@ 2019-11-07  9:01   ` Hemant Agrawal
  2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 3/3] test/event_crypto: fix check for HW support Hemant Agrawal
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-11-07  9:01 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, abhinandan.gujjar

Added the missed code to avail the mempool entries before
pool free.

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index bf83a6357..6b47a5c01 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -889,6 +889,7 @@ crypto_teardown(void)
 		params.session_mpool = NULL;
 	}
 	if (params.session_priv_mpool != NULL) {
+		rte_mempool_avail_count(params.session_priv_mpool);
 		rte_mempool_free(params.session_priv_mpool);
 		params.session_priv_mpool = NULL;
 	}
-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 3/3] test/event_crypto: fix check for HW support
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
  2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 2/3] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
@ 2019-11-07  9:01   ` Hemant Agrawal
  2019-11-18 15:59   ` [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Hemant Agrawal @ 2019-11-07  9:01 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, abhinandan.gujjar

When HW is available but the mode mismatches, it is better
to skip the test case.

Fixes: cfe599b325e8 ("test/event_crypto: no service core when HW support available")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 6b47a5c01..8d42462d8 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -302,6 +302,10 @@ test_sessionless_with_op_forward_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
 				"Failed to start event crypto adapter");
@@ -323,6 +327,10 @@ test_session_with_op_forward_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID
 				), "Failed to start event crypto adapter");
@@ -458,6 +466,10 @@ test_sessionless_with_op_new_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
+			return TEST_SKIPPED;
+	}
 
 	/* start the event crypto adapter */
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
@@ -480,6 +492,10 @@ test_session_with_op_new_mode(void)
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	    !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
 		map_adapter_service_core();
+	else {
+		if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
+			return TEST_SKIPPED;
+	}
 
 	TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
 				"Failed to start event crypto adapter");
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
  2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 2/3] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
  2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 3/3] test/event_crypto: fix check for HW support Hemant Agrawal
@ 2019-11-18 15:59   ` Jerin Jacob
  2019-11-18 16:02     ` Gujjar, Abhinandan S
  2019-11-19 10:36   ` Gujjar, Abhinandan S
  2019-11-20 13:39   ` Jerin Jacob
  4 siblings, 1 reply; 19+ messages in thread
From: Jerin Jacob @ 2019-11-18 15:59 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk-dev, Gujjar, Abhinandan S

On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> The IV was not set, which was causing HW based SEC on DPAA1
> to fail.
>
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes


Hi Abhinandan,

Can I merge this patch series?

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

* Re: [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-11-18 15:59   ` [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
@ 2019-11-18 16:02     ` Gujjar, Abhinandan S
  0 siblings, 0 replies; 19+ messages in thread
From: Gujjar, Abhinandan S @ 2019-11-18 16:02 UTC (permalink / raw)
  To: Jerin Jacob, Hemant Agrawal; +Cc: dpdk-dev

Hi Jerin,

Last week, I was on vacation. So, could not review it.
I will try to finish this by tomorrow.

Regards
Abhinandan 

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Monday, November 18, 2019 9:30 PM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>
> Cc: dpdk-dev <dev@dpdk.org>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Subject: Re: [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
> 
> On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com>
> wrote:
> >
> > The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> > Sending only the fixes. dropped the functional changes
> 
> 
> Hi Abhinandan,
> 
> Can I merge this patch series?

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

* Re: [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
                     ` (2 preceding siblings ...)
  2019-11-18 15:59   ` [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
@ 2019-11-19 10:36   ` Gujjar, Abhinandan S
  2019-11-20 13:39   ` Jerin Jacob
  4 siblings, 0 replies; 19+ messages in thread
From: Gujjar, Abhinandan S @ 2019-11-19 10:36 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: jerinjacobk

For series:
Acked-by: abhinandan.gujjar@intel.com

I noticed that these patches have issue with "Intel-compilation".
Hope, it will be taken care before merging. 

> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Thursday, November 7, 2019 2:31 PM
> To: dev@dpdk.org
> Cc: jerinjacobk@gmail.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Subject: [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
> 
> The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> 
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes
> 
>  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/app/test/test_event_crypto_adapter.c
> b/app/test/test_event_crypto_adapter.c
> index 652e458f0..bf83a6357 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
>  	struct rte_event ev;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op,
> @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
>  	struct rte_mbuf *m;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> --
> 2.17.1


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

* Re: [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
                     ` (3 preceding siblings ...)
  2019-11-19 10:36   ` Gujjar, Abhinandan S
@ 2019-11-20 13:39   ` Jerin Jacob
  2019-11-26  5:55     ` Jerin Jacob
  4 siblings, 1 reply; 19+ messages in thread
From: Jerin Jacob @ 2019-11-20 13:39 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk-dev, Gujjar, Abhinandan S

On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> The IV was not set, which was causing HW based SEC on DPAA1
> to fail.
>
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes


Could you fix the following check-git-log.sh errors and send the v3. I
can pull the v3 for rc3.

Wrong 'Fixes' reference:
        Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
        Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
        Fixes: cfe599b325e8 ("test/event_crypto: no service core when
HW support available")

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

* Re: [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
  2019-11-20 13:39   ` Jerin Jacob
@ 2019-11-26  5:55     ` Jerin Jacob
  0 siblings, 0 replies; 19+ messages in thread
From: Jerin Jacob @ 2019-11-26  5:55 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk-dev, Gujjar, Abhinandan S

On Wed, Nov 20, 2019 at 10:39 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> >
> > The IV was not set, which was causing HW based SEC on DPAA1
> > to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> > Sending only the fixes. dropped the functional changes
>
>
> Could you fix the following check-git-log.sh errors and send the v3. I
> can pull the v3 for rc3.
>
> Wrong 'Fixes' reference:
>         Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>         Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
>         Fixes: cfe599b325e8 ("test/event_crypto: no service core when
> HW support available")

Fixed the wrong references.

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

Series applied to dpdk-next-eventdev/master. Thanks.

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

end of thread, back to index

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 11:33 [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Hemant Agrawal
2019-10-01 11:33 ` [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support Hemant Agrawal
2019-10-01 11:33 ` [dpdk-dev] [PATCH 3/6] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
2019-10-01 11:33 ` [dpdk-dev] [PATCH 4/6] test/event_crypto: support to release the atomic ctxt Hemant Agrawal
2019-10-01 11:33 ` [dpdk-dev] [PATCH 5/6] test/event_crypto: use device cap instead of fixed values Hemant Agrawal
2019-10-01 11:33 ` [dpdk-dev] [PATCH 6/6] test/event_crypto: separate the NEW and FWD mode inits Hemant Agrawal
2019-10-03  3:24 ` [dpdk-dev] [PATCH 1/6] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
2019-10-03  4:52   ` Gujjar, Abhinandan S
2019-10-04  9:35 ` Gujjar, Abhinandan S
2019-10-16  8:01   ` Jerin Jacob
2019-10-18  5:28   ` Hemant Agrawal
2019-11-07  9:01 ` [dpdk-dev] [PATCH v2 1/3] " Hemant Agrawal
2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 2/3] test/event_crypto: fix to avail the mempool entries Hemant Agrawal
2019-11-07  9:01   ` [dpdk-dev] [PATCH v2 3/3] test/event_crypto: fix check for HW support Hemant Agrawal
2019-11-18 15:59   ` [dpdk-dev] [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo Jerin Jacob
2019-11-18 16:02     ` Gujjar, Abhinandan S
2019-11-19 10:36   ` Gujjar, Abhinandan S
2019-11-20 13:39   ` Jerin Jacob
2019-11-26  5:55     ` Jerin Jacob

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox