DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/cryptodev: ensure structs are updated in unison
@ 2022-09-01  9:39 Anoob Joseph
  2022-09-22 16:11 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Anoob Joseph @ 2022-09-01  9:39 UTC (permalink / raw)
  To: Akhil Goyal, Fan Zhang; +Cc: Jerin Jacob, Hemant Agrawal, Gagandeep Singh, dev

The structs are directly indexed for generating standard vectors. Add
asserts to make sure structs are not updated in isolation.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 78a9ee0b11..6306fb7281 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -873,6 +873,17 @@ pdcp_proto_testsuite_setup(void)
 		RTE_CRYPTO_AUTH_ZUC_EIA3
 	};

+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_auth_key));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_bearer));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_crypto_key));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_in));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_in_len));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_out));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_data_sn_size));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_hfn));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_hfn_threshold));
+	RTE_BUILD_BUG_ON(RTE_DIM(pdcp_test_params) != RTE_DIM(pdcp_test_packet_direction));
+
 	rte_cryptodev_info_get(dev_id, &dev_info);

 	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) ||
--
2.25.1


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

* RE: [PATCH] test/cryptodev: ensure structs are updated in unison
  2022-09-01  9:39 [PATCH] test/cryptodev: ensure structs are updated in unison Anoob Joseph
@ 2022-09-22 16:11 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2022-09-22 16:11 UTC (permalink / raw)
  To: Anoob Joseph, Fan Zhang
  Cc: Jerin Jacob Kollanukkaran, Hemant Agrawal, Gagandeep Singh, dev

> Subject: [PATCH] test/cryptodev: ensure structs are updated in unison
> 
> The structs are directly indexed for generating standard vectors. Add
> asserts to make sure structs are not updated in isolation.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2022-09-22 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01  9:39 [PATCH] test/cryptodev: ensure structs are updated in unison Anoob Joseph
2022-09-22 16:11 ` Akhil Goyal

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).