diff mbox series

[2/2] test/crypto: do not check for IMB_VERSION_NUM

Message ID 1586859760-207446-2-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Superseded, archived
Headers show
Series [1/2] test/crypto: add capability check | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

De Lara Guarch, Pablo April 14, 2020, 10:22 a.m. UTC
Now that capabilities are checked to see if an algorithm
is supported by a device, there is no need to check
for a specific version of a library used in a PMD.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev_hash_test_vectors.h | 25 -------------------------
 1 file changed, 25 deletions(-)

Comments

Thomas Monjalon April 14, 2020, 10:34 a.m. UTC | #1
14/04/2020 12:22, Pablo de Lara:
> Now that capabilities are checked to see if an algorithm
> is supported by a device, there is no need to check
> for a specific version of a library used in a PMD.

Yes, and even no need to check the PMD at all.
All *_TEST_TARGET_PMD_* constants should be removed.
De Lara Guarch, Pablo April 14, 2020, 5:22 p.m. UTC | #2
Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, April 14, 2020 11:34 AM
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com; Zhang,
> Roy Fan <roy.fan.zhang@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: Re: [PATCH 2/2] test/crypto: do not check for IMB_VERSION_NUM
> 
> 14/04/2020 12:22, Pablo de Lara:
> > Now that capabilities are checked to see if an algorithm is supported
> > by a device, there is no need to check for a specific version of a
> > library used in a PMD.
> 
> Yes, and even no need to check the PMD at all.
> All *_TEST_TARGET_PMD_* constants should be removed.
> 

I am currently working on this. However, I would like to split this effort
into multiple patchsets. A first one addressing the problem of needing to check for
specific information from PMDs (such as IMB_VERSION_NUM), which should not
have any effect on the number of test cases ran for each PMD, and another one which
addresses your comment, and that will enable test cases for all PMDs.
This last patchset will require testing from all PMD maintainers and it is a less urgent
problem to resolve, so we can decide if we want to merge it in this release or wait
for more time in 20.08.

Thanks,
Pablo
Thomas Monjalon April 14, 2020, 5:48 p.m. UTC | #3
14/04/2020 19:22, De Lara Guarch, Pablo:
> Hi Thomas,
> 
> From: Thomas Monjalon <thomas@monjalon.net>
> > 14/04/2020 12:22, Pablo de Lara:
> > > Now that capabilities are checked to see if an algorithm is supported
> > > by a device, there is no need to check for a specific version of a
> > > library used in a PMD.
> > 
> > Yes, and even no need to check the PMD at all.
> > All *_TEST_TARGET_PMD_* constants should be removed.
> > 
> 
> I am currently working on this. However, I would like to split this effort
> into multiple patchsets. A first one addressing the problem of needing to check for
> specific information from PMDs (such as IMB_VERSION_NUM), which should not
> have any effect on the number of test cases ran for each PMD, and another one which
> addresses your comment, and that will enable test cases for all PMDs.
> This last patchset will require testing from all PMD maintainers and it is a less urgent
> problem to resolve, so we can decide if we want to merge it in this release or wait
> for more time in 20.08.

Thanks for your efforts Pablo.
If the basic is working, I am for removing *_TEST_TARGET_PMD_* in 20.05,
and allow PMD maintainers to validate the tests during -rc phases.
Dybkowski, AdamX April 15, 2020, 10:28 a.m. UTC | #4
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Pablo de Lara
> Sent: Tuesday, 14 April, 2020 12:23
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>; thomas@monjalon.net
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] test/crypto: do not check for
> IMB_VERSION_NUM
> 
> Now that capabilities are checked to see if an algorithm is supported by a
> device, there is no need to check for a specific version of a library used in a
> PMD.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Thomas Monjalon April 22, 2020, 9:16 a.m. UTC | #5
14/04/2020 19:48, Thomas Monjalon:
> 14/04/2020 19:22, De Lara Guarch, Pablo:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 14/04/2020 12:22, Pablo de Lara:
> > > > Now that capabilities are checked to see if an algorithm is supported
> > > > by a device, there is no need to check for a specific version of a
> > > > library used in a PMD.
> > > 
> > > Yes, and even no need to check the PMD at all.
> > > All *_TEST_TARGET_PMD_* constants should be removed.
> > > 
> > 
> > I am currently working on this. However, I would like to split this effort
> > into multiple patchsets. A first one addressing the problem of needing to check for
> > specific information from PMDs (such as IMB_VERSION_NUM), which should not
> > have any effect on the number of test cases ran for each PMD, and another one which
> > addresses your comment, and that will enable test cases for all PMDs.
> > This last patchset will require testing from all PMD maintainers and it is a less urgent
> > problem to resolve, so we can decide if we want to merge it in this release or wait
> > for more time in 20.08.
> 
> Thanks for your efforts Pablo.
> If the basic is working, I am for removing *_TEST_TARGET_PMD_* in 20.05,
> and allow PMD maintainers to validate the tests during -rc phases.

Some patches using capabilities are merged in the crypto test.

What else is remaining? I see rte_cryptodev_driver_id_get() is still used.
I think rte_cryptodev_driver_id_get() should be deprecated.
Akhil Goyal April 22, 2020, 9:43 a.m. UTC | #6
Hi Thomas,
> 14/04/2020 19:48, Thomas Monjalon:
> > 14/04/2020 19:22, De Lara Guarch, Pablo:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > 14/04/2020 12:22, Pablo de Lara:
> > > > > Now that capabilities are checked to see if an algorithm is supported
> > > > > by a device, there is no need to check for a specific version of a
> > > > > library used in a PMD.
> > > >
> > > > Yes, and even no need to check the PMD at all.
> > > > All *_TEST_TARGET_PMD_* constants should be removed.
> > > >
> > >
> > > I am currently working on this. However, I would like to split this effort
> > > into multiple patchsets. A first one addressing the problem of needing to
> check for
> > > specific information from PMDs (such as IMB_VERSION_NUM), which should
> not
> > > have any effect on the number of test cases ran for each PMD, and another
> one which
> > > addresses your comment, and that will enable test cases for all PMDs.
> > > This last patchset will require testing from all PMD maintainers and it is a less
> urgent
> > > problem to resolve, so we can decide if we want to merge it in this release or
> wait
> > > for more time in 20.08.
> >
> > Thanks for your efforts Pablo.
> > If the basic is working, I am for removing *_TEST_TARGET_PMD_* in 20.05,
> > and allow PMD maintainers to validate the tests during -rc phases.
> 
> Some patches using capabilities are merged in the crypto test.
> 
> What else is remaining? I see rte_cryptodev_driver_id_get() is still used.
> I think rte_cryptodev_driver_id_get() should be deprecated.
> 
All of the cleanup cannot be done in one go. There are quite a few things which need to be cleaned
1. many test cases are checking the PMD type for specific PMDs. That need to be removed.
     Currently it is done only for the block cipher cases.
2. many PMDs are maintaining their separate test suites. Which should be moved to a single one
3. there are some PDCP specific cases which need to be moved to security test.

For #1, we need to remove all calls to rte_cryptodev_driver_id_get and every PMD should check
If it has properly defined capabilities or not.

I plan  to do #2 and #3 for NXP platforms in a couple of week. May be before RC2.
I have asked all the PMD maintainers to move to a single testsuite otherwise their PMD changes will not
Be picked.

Regards,
Akhil
Thomas Monjalon April 22, 2020, 10:56 a.m. UTC | #7
22/04/2020 11:43, Akhil Goyal:
> Hi Thomas,
> > 14/04/2020 19:48, Thomas Monjalon:
> > > 14/04/2020 19:22, De Lara Guarch, Pablo:
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > 14/04/2020 12:22, Pablo de Lara:
> > > > > > Now that capabilities are checked to see if an algorithm is supported
> > > > > > by a device, there is no need to check for a specific version of a
> > > > > > library used in a PMD.
> > > > >
> > > > > Yes, and even no need to check the PMD at all.
> > > > > All *_TEST_TARGET_PMD_* constants should be removed.
> > > > >
> > > >
> > > > I am currently working on this. However, I would like to split this effort
> > > > into multiple patchsets. A first one addressing the problem of needing to
> > check for
> > > > specific information from PMDs (such as IMB_VERSION_NUM), which should
> > not
> > > > have any effect on the number of test cases ran for each PMD, and another
> > one which
> > > > addresses your comment, and that will enable test cases for all PMDs.
> > > > This last patchset will require testing from all PMD maintainers and it is a less
> > urgent
> > > > problem to resolve, so we can decide if we want to merge it in this release or
> > wait
> > > > for more time in 20.08.
> > >
> > > Thanks for your efforts Pablo.
> > > If the basic is working, I am for removing *_TEST_TARGET_PMD_* in 20.05,
> > > and allow PMD maintainers to validate the tests during -rc phases.
> > 
> > Some patches using capabilities are merged in the crypto test.
> > 
> > What else is remaining? I see rte_cryptodev_driver_id_get() is still used.
> > I think rte_cryptodev_driver_id_get() should be deprecated.
> > 
> All of the cleanup cannot be done in one go. There are quite a few things which need to be cleaned
> 1. many test cases are checking the PMD type for specific PMDs. That need to be removed.
>      Currently it is done only for the block cipher cases.
> 2. many PMDs are maintaining their separate test suites. Which should be moved to a single one
> 3. there are some PDCP specific cases which need to be moved to security test.
> 
> For #1, we need to remove all calls to rte_cryptodev_driver_id_get and every PMD should check
> If it has properly defined capabilities or not.
> 
> I plan  to do #2 and #3 for NXP platforms in a couple of week. May be before RC2.
> I have asked all the PMD maintainers to move to a single testsuite otherwise their PMD changes will not
> Be picked.

That's perfect Akhil, thanks for driving it.
diff mbox series

Patch

diff --git a/app/test/test_cryptodev_hash_test_vectors.h b/app/test/test_cryptodev_hash_test_vectors.h
index cff2831..2ed077f 100644
--- a/app/test/test_cryptodev_hash_test_vectors.h
+++ b/app/test/test_cryptodev_hash_test_vectors.h
@@ -9,11 +9,6 @@ 
 #include <intel-ipsec-mb.h>
 #endif
 
-#if !defined(IMB_VERSION_NUM)
-#define IMB_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
-#define IMB_VERSION_NUM IMB_VERSION(0, 49, 0)
-#endif
-
 static const uint8_t plaintext_hash[] = {
 	"What a lousy earth! He wondered how many people "
 	"were destitute that same night even in his own "
@@ -462,9 +457,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -475,9 +468,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -542,9 +533,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -555,9 +544,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -598,9 +585,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -611,9 +596,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -656,9 +639,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -669,9 +650,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},
@@ -714,9 +693,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX
 	},
 	{
@@ -726,9 +703,7 @@  static const struct blockcipher_test_case hash_test_cases[] = {
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
-#if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
 			    BLOCKCIPHER_TEST_TARGET_PMD_MB |
-#endif
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX |
 			    BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX2
 	},