[5/6] app/test: register octeontx2 PMD to asym testsuite

Message ID 1568042799-25982-6-git-send-email-anoobj@marvell.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series add asymmetric support in crypto_octeontx2 PMD |

Checks

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

Commit Message

Anoob Joseph Sept. 9, 2019, 3:26 p.m. UTC
  From: Sunila Sahu <ssahu@marvell.com>

This patch updates asymmetric crypto unit-test application to
validate asymmetric crypto operation supported by octeontx2 PMD.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
---
 app/test/test_cryptodev_asym.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
  

Comments

Akhil Goyal Oct. 1, 2019, 2:13 p.m. UTC | #1
> 
> From: Sunila Sahu <ssahu@marvell.com>
> 
> This patch updates asymmetric crypto unit-test application to
> validate asymmetric crypto operation supported by octeontx2 PMD.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
> Signed-off-by: Sunila Sahu <ssahu@marvell.com>
> ---
>  app/test/test_cryptodev_asym.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index 241c384..edbd34e 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -1851,6 +1851,21 @@ test_cryptodev_octeontx_asym(void)
>  	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
>  }
> 
> +static int
> +test_cryptodev_octeontx2_asym(void)
> +{
> +	gbl_driver_id = rte_cryptodev_driver_id_get(
> +			RTE_STR(CRYPTODEV_NAME_OCTEONTX2_PMD));
> +	if (gbl_driver_id == -1) {
> +		RTE_LOG(ERR, USER1, "OCTEONTX2 PMD must be loaded.
> Check if "
> +
> 	"CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO is "
> +				"enabled in config file to run this "
> +				"testsuite.\n");
> +		return TEST_FAILED;
> +	}
> +	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
> +}
> +
>  REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
>  					  test_cryptodev_openssl_asym);
> 
> @@ -1858,3 +1873,6 @@
> REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest,
> test_cryptodev_qat_asym);
> 
>  REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
>  					  test_cryptodev_octeontx_asym);

It looks a typo but it is intentional. Better to add a comment here and in the description
That you are reusing the octeontx test suite.

> +
> +REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
> +					  test_cryptodev_octeontx2_asym);
> --
> 2.7.4
  
Anoob Joseph Oct. 2, 2019, 10:52 a.m. UTC | #2
Hi Akhil,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Akhil Goyal
> Sent: Tuesday, October 1, 2019 7:44 PM
> To: Anoob Joseph <anoobj@marvell.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>; Thomas Monjalon <thomas@monjalon.net>
> Cc: Sunila Sahu <ssahu@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Narayana Prasad Raju Athreya
> <pathreya@marvell.com>; Fiona Trahe <fiona.trahe@intel.com>; Kanaka Durga
> Kotamarthy <kkotamarthy@marvell.com>; Shally Verma
> <shallyv@marvell.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 5/6] app/test: register octeontx2 PMD to asym
> testsuite
> 
> >
> > From: Sunila Sahu <ssahu@marvell.com>
> >
> > This patch updates asymmetric crypto unit-test application to validate
> > asymmetric crypto operation supported by octeontx2 PMD.
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
> > Signed-off-by: Sunila Sahu <ssahu@marvell.com>
> > ---
> >  app/test/test_cryptodev_asym.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/app/test/test_cryptodev_asym.c
> > b/app/test/test_cryptodev_asym.c index 241c384..edbd34e 100644
> > --- a/app/test/test_cryptodev_asym.c
> > +++ b/app/test/test_cryptodev_asym.c
> > @@ -1851,6 +1851,21 @@ test_cryptodev_octeontx_asym(void)
> >  	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
> >  }
> >
> > +static int
> > +test_cryptodev_octeontx2_asym(void)
> > +{
> > +	gbl_driver_id = rte_cryptodev_driver_id_get(
> > +			RTE_STR(CRYPTODEV_NAME_OCTEONTX2_PMD));
> > +	if (gbl_driver_id == -1) {
> > +		RTE_LOG(ERR, USER1, "OCTEONTX2 PMD must be loaded.
> > Check if "
> > +
> > 	"CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO is "
> > +				"enabled in config file to run this "
> > +				"testsuite.\n");
> > +		return TEST_FAILED;
> > +	}
> > +	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
> > +}
> > +
> >  REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
> >  					  test_cryptodev_openssl_asym);
> >
> > @@ -1858,3 +1873,6 @@
> > REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest,
> > test_cryptodev_qat_asym);
> >
> >  REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
> >  					  test_cryptodev_octeontx_asym);
> 
> It looks a typo but it is intentional. Better to add a comment here and in the
> description That you are reusing the octeontx test suite.

[Anoob] Will make this change in v2.
 
> 
> > +
> > +REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
> > +					  test_cryptodev_octeontx2_asym);
> > --
> > 2.7.4
  

Patch

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 241c384..edbd34e 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -1851,6 +1851,21 @@  test_cryptodev_octeontx_asym(void)
 	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
 }
 
+static int
+test_cryptodev_octeontx2_asym(void)
+{
+	gbl_driver_id = rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_OCTEONTX2_PMD));
+	if (gbl_driver_id == -1) {
+		RTE_LOG(ERR, USER1, "OCTEONTX2 PMD must be loaded. Check if "
+				"CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO is "
+				"enabled in config file to run this "
+				"testsuite.\n");
+		return TEST_FAILED;
+	}
+	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
+}
+
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
@@ -1858,3 +1873,6 @@  REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
+
+REGISTER_TEST_COMMAND(cryptodev_octeontx2_asym_autotest,
+					  test_cryptodev_octeontx2_asym);