Thread (49 messages) flat view 49 messages, 4 authors, 2021-09-28

Re: [dpdk-dev] [PATCH v3 1/5] test/crypto: add lookaside IPsec tests

From: Anoob Joseph <hidden>
Date: 2021-09-03 09:46:55

Hi Ciara,

Thanks for the review. Please see inline.

Thanks,
Anoob
-----Original Message-----
From: Power, Ciara <redacted>
Sent: Friday, September 3, 2021 3:09 PM
To: Anoob Joseph <redacted>; Akhil Goyal
[off-list ref]; Doherty, Declan [off-list ref];
Zhang, Roy Fan [off-list ref]; Ananyev, Konstantin
[off-list ref]
Cc: Jerin Jacob Kollanukkaran <redacted>; Archana Muniganti
[off-list ref]; Tejasree Kondoj [off-list ref];
Hemant Agrawal [off-list ref]; Nicolau, Radu
[off-list ref]; Gagandeep Singh [off-list ref];
dev@dpdk.org
Subject: [EXT] RE: [PATCH v3 1/5] test/crypto: add lookaside IPsec tests

External Email

----------------------------------------------------------------------
Hi Anoob,

Left some comments/questions inline.

Thanks,
Ciara
quoted
-----Original Message-----
From: Anoob Joseph <redacted>
Sent: Friday 3 September 2021 05:47
To: Akhil Goyal <redacted>; Doherty, Declan
[off-list ref]; Zhang, Roy Fan [off-list ref];
Ananyev, Konstantin [off-list ref]
Cc: Anoob Joseph <redacted>; Jerin Jacob
[off-list ref]; Archana Muniganti [off-list ref];
Tejasree Kondoj [off-list ref]; Hemant Agrawal
[off-list ref]; Nicolau, Radu [off-list ref];
Power, Ciara [off-list ref]; Gagandeep Singh
[off-list ref]; dev@dpdk.org
Subject: [PATCH v3 1/5] test/crypto: add lookaside IPsec tests

Added test case for lookaside IPsec. Inbound known vector tests are
added.
quoted
Cipher list: AES-GCM 128, 192 & 256

Signed-off-by: Anoob Joseph <redacted>
Signed-off-by: Tejasree Kondoj <redacted>
---
<snip>
quoted
#ifdef RTE_LIB_SECURITY
static int
+ipsec_proto_testsuite_setup(void)
+{
+	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	struct crypto_unittest_params *ut_params = &unittest_params;
+	struct rte_cryptodev_info dev_info;
+
+	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+
+	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SECURITY)) {
+		RTE_LOG(INFO, USER1, "Feature flag requirements for IPsec
Proto "
+				"testsuite not met\n");
+		return TEST_SKIPPED;
+	}
+
+	/* Reconfigure to enable security */
+
	dev_configure_and_start(RTE_CRYPTODEV_FF_SYMMETRIC_CRYPT
O |
quoted
+
	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO);
quoted
+
Just a question on this - each testcase uses ut_setup_security which in turn
calls dev_configure_and_start, Is the configuration resulting from this call
just being redone when the first testcase runs?
[Anoob] The tests prior to this test suite can have SECURITY disabled (which is the case currently). And in that case, rte_security_capabalities_get() would be returning a NULL (since the device won't be having SECURITY feature enabled). I was addressing this aspect by reconfiguring with SECURITY enabled. 
quoted
+	/* Set action type */
+	ut_params->type =
RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
+
+	if (security_proto_supported(
+
	RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
quoted
+			RTE_SECURITY_PROTOCOL_IPSEC) < 0) {
+		RTE_LOG(INFO, USER1, "Capability requirements for IPsec
Proto
quoted
"
+				"test not met\n");
+		return TEST_SKIPPED;
If the test is skipped here, the device is not stopped, which I believe would
cause problems for the next testsuite setup configuring the device.
[Anoob] Missed this. Thanks for pointing out. 
quoted
+	}
+
+	/* Stop the device */
+	rte_cryptodev_stop(ts_params->valid_devs[0]);
+
+	return 0;
+}
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help