[v2,2/2] event/octeontx: remove selftest from dev args
diff mbox series

Message ID 20201119135736.4085-2-pbhagavatula@marvell.com
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series
  • [v2,1/2] event/octeontx2: remove selftest from dev args
Related show

Checks

Context Check Description
ci/iol-testing warning Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula Nov. 19, 2020, 1:57 p.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since selftest now depends on dynamic mbuf fields it is not
feasible to run selftest on device probe.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/eventdevs/octeontx.rst    | 12 ------------
 drivers/event/octeontx/ssovf_evdev.c | 22 ++++------------------
 drivers/event/octeontx/ssovf_evdev.h |  2 --
 3 files changed, 4 insertions(+), 32 deletions(-)

Comments

Jerin Jacob Nov. 20, 2020, 12:26 p.m. UTC | #1
On Thu, Nov 19, 2020 at 7:28 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Since selftest now depends on dynamic mbuf fields it is not
> feasible to run selftest on device probe.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Series applied to dpdk-next-eventdev/for-main. Thanks.



> ---
>  doc/guides/eventdevs/octeontx.rst    | 12 ------------
>  drivers/event/octeontx/ssovf_evdev.c | 22 ++++------------------
>  drivers/event/octeontx/ssovf_evdev.h |  2 --
>  3 files changed, 4 insertions(+), 32 deletions(-)
>
> diff --git a/doc/guides/eventdevs/octeontx.rst b/doc/guides/eventdevs/octeontx.rst
> index 79cae9f7d..435e1e953 100644
> --- a/doc/guides/eventdevs/octeontx.rst
> +++ b/doc/guides/eventdevs/octeontx.rst
> @@ -63,18 +63,6 @@ Example:
>      ./your_eventdev_application --vdev="event_octeontx"
>
>
> -Selftest
> ---------
> -
> -The functionality of OCTEON TX eventdev can be verified using this option,
> -various unit and functional tests are run to verify the sanity.
> -The tests are run once the vdev creation is successfully complete.
> -
> -.. code-block:: console
> -
> -    --vdev="event_octeontx,selftest=1"
> -
> -
>  Enable TIMvf stats
>  ------------------
>  TIMvf stats can be enabled by using this option, by default the stats are
> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
> index 6f242aac1..e60a7dc69 100644
> --- a/drivers/event/octeontx/ssovf_evdev.c
> +++ b/drivers/event/octeontx/ssovf_evdev.c
> @@ -710,8 +710,7 @@ ssovf_close(struct rte_eventdev *dev)
>  }
>
>  static int
> -ssovf_selftest(const char *key __rte_unused, const char *value,
> -               void *opaque)
> +ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque)
>  {
>         int *flag = opaque;
>         *flag = !!atoi(value);
> @@ -775,10 +774,8 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
>         const char *name;
>         const char *params;
>         int ret;
> -       int selftest = 0;
>
>         static const char *const args[] = {
> -               SSOVF_SELFTEST_ARG,
>                 TIMVF_ENABLE_STATS_ARG,
>                 NULL
>         };
> @@ -799,18 +796,9 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
>                                 "Ignoring unsupported params supplied '%s'",
>                                 name);
>                 } else {
> -                       int ret = rte_kvargs_process(kvlist,
> -                                       SSOVF_SELFTEST_ARG,
> -                                       ssovf_selftest, &selftest);
> -                       if (ret != 0) {
> -                               ssovf_log_err("%s: Error in selftest", name);
> -                               rte_kvargs_free(kvlist);
> -                               return ret;
> -                       }
> -
> -                       ret = rte_kvargs_process(kvlist,
> -                                       TIMVF_ENABLE_STATS_ARG,
> -                                       ssovf_selftest, &timvf_enable_stats);
> +                       ret = rte_kvargs_process(kvlist, TIMVF_ENABLE_STATS_ARG,
> +                                                ssovf_parsekv,
> +                                                &timvf_enable_stats);
>                         if (ret != 0) {
>                                 ssovf_log_err("%s: Error in timvf stats", name);
>                                 rte_kvargs_free(kvlist);
> @@ -877,8 +865,6 @@ ssovf_vdev_probe(struct rte_vdev_device *vdev)
>                         edev->max_event_ports);
>
>         ssovf_init_once = 1;
> -       if (selftest)
> -               test_eventdev_octeontx();
>         return 0;
>
>  error:
> diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h
> index 90d760a54..10163151c 100644
> --- a/drivers/event/octeontx/ssovf_evdev.h
> +++ b/drivers/event/octeontx/ssovf_evdev.h
> @@ -86,8 +86,6 @@
>  #define SSO_GRP_GET_PRIORITY              0x7
>  #define SSO_GRP_SET_PRIORITY              0x8
>
> -#define SSOVF_SELFTEST_ARG               ("selftest")
> -
>  /*
>   * In Cavium OCTEON TX SoC, all accesses to the device registers are
>   * implictly strongly ordered. So, The relaxed version of IO operation is
> --
> 2.17.1
>

Patch
diff mbox series

diff --git a/doc/guides/eventdevs/octeontx.rst b/doc/guides/eventdevs/octeontx.rst
index 79cae9f7d..435e1e953 100644
--- a/doc/guides/eventdevs/octeontx.rst
+++ b/doc/guides/eventdevs/octeontx.rst
@@ -63,18 +63,6 @@  Example:
     ./your_eventdev_application --vdev="event_octeontx"
 
 
-Selftest
---------
-
-The functionality of OCTEON TX eventdev can be verified using this option,
-various unit and functional tests are run to verify the sanity.
-The tests are run once the vdev creation is successfully complete.
-
-.. code-block:: console
-
-    --vdev="event_octeontx,selftest=1"
-
-
 Enable TIMvf stats
 ------------------
 TIMvf stats can be enabled by using this option, by default the stats are
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 6f242aac1..e60a7dc69 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -710,8 +710,7 @@  ssovf_close(struct rte_eventdev *dev)
 }
 
 static int
-ssovf_selftest(const char *key __rte_unused, const char *value,
-		void *opaque)
+ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque)
 {
 	int *flag = opaque;
 	*flag = !!atoi(value);
@@ -775,10 +774,8 @@  ssovf_vdev_probe(struct rte_vdev_device *vdev)
 	const char *name;
 	const char *params;
 	int ret;
-	int selftest = 0;
 
 	static const char *const args[] = {
-		SSOVF_SELFTEST_ARG,
 		TIMVF_ENABLE_STATS_ARG,
 		NULL
 	};
@@ -799,18 +796,9 @@  ssovf_vdev_probe(struct rte_vdev_device *vdev)
 				"Ignoring unsupported params supplied '%s'",
 				name);
 		} else {
-			int ret = rte_kvargs_process(kvlist,
-					SSOVF_SELFTEST_ARG,
-					ssovf_selftest, &selftest);
-			if (ret != 0) {
-				ssovf_log_err("%s: Error in selftest", name);
-				rte_kvargs_free(kvlist);
-				return ret;
-			}
-
-			ret = rte_kvargs_process(kvlist,
-					TIMVF_ENABLE_STATS_ARG,
-					ssovf_selftest, &timvf_enable_stats);
+			ret = rte_kvargs_process(kvlist, TIMVF_ENABLE_STATS_ARG,
+						 ssovf_parsekv,
+						 &timvf_enable_stats);
 			if (ret != 0) {
 				ssovf_log_err("%s: Error in timvf stats", name);
 				rte_kvargs_free(kvlist);
@@ -877,8 +865,6 @@  ssovf_vdev_probe(struct rte_vdev_device *vdev)
 			edev->max_event_ports);
 
 	ssovf_init_once = 1;
-	if (selftest)
-		test_eventdev_octeontx();
 	return 0;
 
 error:
diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h
index 90d760a54..10163151c 100644
--- a/drivers/event/octeontx/ssovf_evdev.h
+++ b/drivers/event/octeontx/ssovf_evdev.h
@@ -86,8 +86,6 @@ 
 #define SSO_GRP_GET_PRIORITY              0x7
 #define SSO_GRP_SET_PRIORITY              0x8
 
-#define SSOVF_SELFTEST_ARG               ("selftest")
-
 /*
  * In Cavium OCTEON TX SoC, all accesses to the device registers are
  * implictly strongly ordered. So, The relaxed version of IO operation is