Skip to contentSkip to conversation

update tests with CN20K support

PATCH Applied Tejasree Kondoj 2 participants 5 messages Jun 23 – Jun 24

lore
Share & tools
lore
#0 lore raw

v2 cover update tests with CN20K support

Add CN20K sym/asym autotests and Rx-inject multi-segment unit test.

v2:
- Removed asym sessionless test patch
- Fixed test names ordering

Vidya Sagar Velumuri (3):
test/crypto: add asym autotest support for cn20k test/crypto: add autotest support for cn20k test/crypto: add unit test for Rx inject multi seg

 app/test/test_cryptodev.c      | 42 +++++++++++++++++++++++++++++++++-
 app/test/test_cryptodev.h      |  1 +
 app/test/test_cryptodev_asym.c |  7 ++++++
 3 files changed, 49 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/3 test/crypto: add asym autotest support for cn20k

From: Vidya Sagar Velumuri <[email protected]>

Add crypto asym autotest support for cn20k

---
 app/test/test_cryptodev_asym.c | 7 +++++++
 1 file changed, 7 insertions(+)
app/test/test_cryptodev_asym.c +7 -0
index 90af49e485..7b8afe5f92 100644
@@ -5500,6 +5500,12 @@ test_cryptodev_cn10k_asym(void)
 	return run_cryptodev_asym_testsuite(RTE_STR(CRYPTODEV_NAME_CN10K_PMD));
 }
 
+static int
+test_cryptodev_cn20k_asym(void)
+{
+	return run_cryptodev_asym_testsuite(RTE_STR(CRYPTODEV_NAME_CN20K_PMD));
+}
+
 static int
 test_cryptodev_virtio_asym(void)
 {
@@ -5517,5 +5523,6 @@ REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 REGISTER_DRIVER_TEST(cryptodev_octeontx_asym_autotest, test_cryptodev_octeontx_asym);
 REGISTER_DRIVER_TEST(cryptodev_cn9k_asym_autotest, test_cryptodev_cn9k_asym);
 REGISTER_DRIVER_TEST(cryptodev_cn10k_asym_autotest, test_cryptodev_cn10k_asym);
+REGISTER_DRIVER_TEST(cryptodev_cn20k_asym_autotest, test_cryptodev_cn20k_asym);
 REGISTER_DRIVER_TEST(cryptodev_virtio_asym_autotest, test_cryptodev_virtio_asym);
 REGISTER_DRIVER_TEST(cryptodev_virtio_user_asym_autotest, test_cryptodev_virtio_user_asym);
Signature · 1 line
2.34.1
#2 lore raw

PATCH v2 2/3 test/crypto: add autotest support for cn20k

In reply to Tejasree Kondoj

From: Vidya Sagar Velumuri <[email protected]>

Add crypto autotest support for cn20k

---
 app/test/test_cryptodev.c | 15 +++++++++++++++
 app/test/test_cryptodev.h |  1 +
 2 files changed, 16 insertions(+)
app/test/test_cryptodev.c +15 -0
index b908f10317..884629ec8c 100644
@@ -20863,6 +20863,18 @@ test_cryptodev_cn10k_raw_api(void)
 	return run_cryptodev_raw_testsuite(RTE_STR(CRYPTODEV_NAME_CN10K_PMD));
 }
 
+static int
+test_cryptodev_cn20k(void)
+{
+	return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_CN20K_PMD));
+}
+
+static int
+test_cryptodev_cn20k_raw_api(void)
+{
+	return run_cryptodev_raw_testsuite(RTE_STR(CRYPTODEV_NAME_CN20K_PMD));
+}
+
 static int
 test_cryptodev_dpaa2_sec_raw_api(void)
 {
@@ -20883,6 +20895,8 @@ test_cryptodev_zsda(void)
 
 REGISTER_DRIVER_TEST(cryptodev_cn10k_raw_api_autotest,
 		test_cryptodev_cn10k_raw_api);
+REGISTER_DRIVER_TEST(cryptodev_cn20k_raw_api_autotest,
+		test_cryptodev_cn20k_raw_api);
 REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_raw_api_autotest,
@@ -20915,4 +20929,5 @@ REGISTER_DRIVER_TEST(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_DRIVER_TEST(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
 REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
 REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn20k_autotest, test_cryptodev_cn20k);
 REGISTER_DRIVER_TEST(cryptodev_zsda_autotest, test_cryptodev_zsda);
app/test/test_cryptodev.h +1 -0
index 49aa45ec17..d125dea958 100644
@@ -74,6 +74,7 @@
 #define CRYPTODEV_NAME_BCMFS_PMD	crypto_bcmfs
 #define CRYPTODEV_NAME_CN9K_PMD		crypto_cn9k
 #define CRYPTODEV_NAME_CN10K_PMD	crypto_cn10k
+#define CRYPTODEV_NAME_CN20K_PMD	crypto_cn20k
 #define CRYPTODEV_NAME_MLX5_PMD		crypto_mlx5
 #define CRYPTODEV_NAME_UADK_PMD		crypto_uadk
 #define CRYPTODEV_NAME_ZSDA_SYM_PMD	crypto_zsda
Signature · 1 line
2.34.1
#3 lore raw

PATCH v2 3/3 test/crypto: add unit test for Rx inject multi seg

In reply to Tejasree Kondoj

From: Vidya Sagar Velumuri <[email protected]>

Add unit test to verify the multi segment support in RX Inject

---
 app/test/test_cryptodev.c | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
app/test/test_cryptodev.c +26 -1
index 884629ec8c..fd02107baf 100644
@@ -1564,7 +1564,8 @@ ut_setup_security_rx_inject(void)
 	struct rte_eth_conf port_conf = {
 		.rxmode = {
 			.offloads = RTE_ETH_RX_OFFLOAD_CHECKSUM |
-				    RTE_ETH_RX_OFFLOAD_SECURITY,
+				    RTE_ETH_RX_OFFLOAD_SECURITY |
+					RTE_ETH_RX_OFFLOAD_SCATTER,
 		},
 		.txmode = {
 			.offloads = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE,
@@ -10781,6 +10782,25 @@ test_ipsec_proto_known_vec_inb_rx_inject(const void *test_data)
 	return test_ipsec_proto_process(&td_inb, NULL, 1, false, &flags);
 }
 
+static int
+test_ipsec_proto_known_vec_inb_rx_inject_multi_seg(const void *test_data)
+{
+	const struct ipsec_test_data *td = test_data;
+	struct ipsec_test_flags flags;
+	struct ipsec_test_data td_inb;
+
+	memset(&flags, 0, sizeof(flags));
+	flags.rx_inject = true;
+	flags.nb_segs_in_mbuf = 4;
+
+	if (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS)
+		test_ipsec_td_in_from_out(td, &td_inb);
+	else
+		memcpy(&td_inb, td, sizeof(td_inb));
+
+	return test_ipsec_proto_process(&td_inb, NULL, 1, false, &flags);
+}
+
 static int
 test_ipsec_proto_all(const struct ipsec_test_flags *flags)
 {
@@ -18389,6 +18409,11 @@ static struct unit_test_suite ipsec_proto_testsuite  = {
 			"Inbound known vector (ESP tunnel mode IPv4 AES-GCM 128) Rx inject",
 			ut_setup_security_rx_inject, ut_teardown_rx_inject,
 			test_ipsec_proto_known_vec_inb_rx_inject, &pkt_aes_128_gcm),
+		TEST_CASE_NAMED_WITH_DATA(
+			"Inbound known vector (ESP tunnel mode IPv4 AES-GCM 128) Rx inject multi seg",
+			ut_setup_security_rx_inject, ut_teardown_rx_inject,
+			test_ipsec_proto_known_vec_inb_rx_inject_multi_seg, &pkt_aes_128_gcm),
+
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
Signature · 1 line
2.34.1
Applied
#4 lore raw
In reply to Tejasree Kondoj
Quoted 21 lines

-----Original Message-----
From: Tejasree Kondoj <[email protected]>
Sent: Tuesday, June 23, 2026 9:57 AM
To: Akhil Goyal <[email protected]>; Fan Zhang <[email protected]>
Cc: Vidya Sagar Velumuri <[email protected]>; Anoob Joseph <[email protected]>; [email protected]
Subject: [PATCH v2 0/3] update tests with CN20K support

Add CN20K sym/asym autotests and Rx-inject multi-segment unit test.

v2:
- Removed asym sessionless test patch
- Fixed test names ordering

Vidya Sagar Velumuri (3):
test/crypto: add asym autotest support for cn20k test/crypto: add autotest support for cn20k test/crypto: add unit test for Rx inject multi seg

Quoted 4 lines
 app/test/test_cryptodev.c      | 42 +++++++++++++++++++++++++++++++++-
 app/test/test_cryptodev.h      |  1 +
 app/test/test_cryptodev_asym.c |  7 ++++++
 3 files changed, 49 insertions(+), 1 deletion(-)

Series Acked-by: Akhil Goyal <[email protected]>

Applied to dpdk-next-crypto