patch 'test/event_crypto: fix event crypto metadata write' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:25 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton at marvell.com>
Date: Mon, 27 Sep 2021 20:59:13 +0530
Subject: [PATCH] test/event_crypto: fix event crypto metadata write

[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]

Using memcpy to update event crypto metadata fields (request/response)
will result in one overwriting the other. To avoid this, fields of each
structure should be updated one by one.

Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")

Signed-off-by: Shijith Thotton <sthotton at marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
---
 app/test/test_event_crypto_adapter.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index b30e0f8f3e..fe016fec7b 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
 			/* Fill in private user data information */
-			rte_memcpy(&m_data.response_info, &response_info,
-				sizeof(response_info));
-			rte_memcpy(&m_data.request_info, &request_info,
-				sizeof(request_info));
+			m_data.request_info.cdev_id = request_info.cdev_id;
+			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));
 		}
@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
 		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
-		rte_memcpy(&m_data.response_info, &response_info,
-			   sizeof(response_info));
-		rte_memcpy(&m_data.request_info, &request_info,
-			   sizeof(request_info));
+		m_data.request_info.cdev_id = request_info.cdev_id;
+		m_data.request_info.queue_pair_id = request_info.queue_pair_id;
+		m_data.response_info.event = response_info.event;
 		rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
 	}
 
@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
 			/* Fill in private user data information */
-			rte_memcpy(&m_data.response_info, &response_info,
-				   sizeof(m_data));
+			m_data.response_info.event = response_info.event;
 			rte_cryptodev_sym_session_set_user_data(sess,
 						&m_data, sizeof(m_data));
 		}
@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)
 		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
-		rte_memcpy(&m_data.response_info, &response_info,
-			   sizeof(m_data));
+		m_data.response_info.event = response_info.event;
 		rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
 	}
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:09.540842639 +0100
+++ 0061-test-event_crypto-fix-event-crypto-metadata-write.patch	2021-11-30 16:50:05.726873060 +0100
@@ -1 +1 @@
-From 67c8baecaee2ef312330102544b1f1e892a95502 Mon Sep 17 00:00:00 2001
+From 03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 3ad20921e2..0c7ebe6981 100644
+index b30e0f8f3e..fe016fec7b 100644
@@ -23 +24 @@
-@@ -212,10 +212,10 @@ test_op_forward_mode(uint8_t session_less)
+@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
@@ -38 +39 @@
-@@ -231,10 +231,9 @@ test_op_forward_mode(uint8_t session_less)
+@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
@@ -52 +53 @@
-@@ -405,8 +404,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
@@ -62 +63 @@
-@@ -425,8 +423,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)


More information about the stable mailing list