diff mbox series

[4/5] event/dpaa2: add selftest cases

Message ID 20190906103410.14996-5-hemant.agrawal@nxp.com
State New
Headers show
Series NXP DPAA2 EVENTDEV enhancements | expand

Commit Message

Hemant Agrawal Sept. 6, 2019, 10:34 a.m. UTC
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/event/dpaa2/Makefile              | 1 +
 drivers/event/dpaa2/dpaa2_eventdev.c      | 1 +
 drivers/event/dpaa2/dpaa2_eventdev.h      | 2 ++
 drivers/event/dpaa2/dpaa2_eventdev_logs.h | 6 ++++++
 drivers/event/dpaa2/meson.build           | 3 ++-
 5 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.17.1

Comments

Aaron Conole Sept. 6, 2019, 7:29 p.m. UTC | #1
Hemant Agrawal <hemant.agrawal@nxp.com> writes:

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---

>  drivers/event/dpaa2/Makefile              | 1 +

>  drivers/event/dpaa2/dpaa2_eventdev.c      | 1 +

>  drivers/event/dpaa2/dpaa2_eventdev.h      | 2 ++

>  drivers/event/dpaa2/dpaa2_eventdev_logs.h | 6 ++++++

>  drivers/event/dpaa2/meson.build           | 3 ++-

>  5 files changed, 12 insertions(+), 1 deletion(-)

>

> diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile

> index e0bb527b1..634179383 100644

> --- a/drivers/event/dpaa2/Makefile

> +++ b/drivers/event/dpaa2/Makefile

> @@ -40,5 +40,6 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API

>  #

>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_hw_dpcon.c

>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev.c

> +SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev_selftest.c

>  

>  include $(RTE_SDK)/mk/rte.lib.mk

> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c

> index 9255de16f..902a80f36 100644

> --- a/drivers/event/dpaa2/dpaa2_eventdev.c

> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c

> @@ -951,6 +951,7 @@ static struct rte_eventdev_ops dpaa2_eventdev_ops = {

>  	.port_unlink      = dpaa2_eventdev_port_unlink,

>  	.timeout_ticks    = dpaa2_eventdev_timeout_ticks,

>  	.dump             = dpaa2_eventdev_dump,

> +	.dev_selftest     = test_eventdev_dpaa2,

>  	.eth_rx_adapter_caps_get = dpaa2_eventdev_eth_caps_get,

>  	.eth_rx_adapter_queue_add = dpaa2_eventdev_eth_queue_add,

>  	.eth_rx_adapter_queue_del = dpaa2_eventdev_eth_queue_del,

> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h

> index bdac1aa56..abc038e49 100644

> --- a/drivers/event/dpaa2/dpaa2_eventdev.h

> +++ b/drivers/event/dpaa2/dpaa2_eventdev.h

> @@ -98,4 +98,6 @@ struct dpaa2_eventdev {

>  struct dpaa2_dpcon_dev *rte_dpaa2_alloc_dpcon_dev(void);

>  void rte_dpaa2_free_dpcon_dev(struct dpaa2_dpcon_dev *dpcon);

>  

> +int test_eventdev_dpaa2(void);

> +

>  #endif /* __DPAA2_EVENTDEV_H__ */

> diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h

> index 86f2e5393..bb5a0e26c 100644

> --- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h

> +++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h

> @@ -35,4 +35,10 @@ extern int dpaa2_logtype_event;

>  #define DPAA2_EVENTDEV_DP_WARN(fmt, args...) \

>  	DPAA2_EVENTDEV_DP_LOG(WARNING, fmt, ## args)

>  

> +#define dpaa2_evdev_info(fmt, ...) DPAA2_EVENTDEV_LOG(INFO, fmt, ##__VA_ARGS__)

> +#define dpaa2_evdev_dbg(fmt, ...) DPAA2_EVENTDEV_LOG(DEBUG, fmt, ##__VA_ARGS__)

> +#define dpaa2_evdev_err(fmt, ...) DPAA2_EVENTDEV_LOG(ERR, fmt, ##__VA_ARGS__)

> +#define dpaa2_evdev__func_trace dpaa2_evdev_dbg

> +#define dpaa2_evdev_selftest dpaa2_evdev_info

> +

>  #endif /* _DPAA2_EVENTDEV_LOGS_H_ */

> diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build

> index f7da7fad5..cea87d77b 100644

> --- a/drivers/event/dpaa2/meson.build

> +++ b/drivers/event/dpaa2/meson.build

> @@ -9,7 +9,8 @@ if not is_linux

>  endif

>  deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec']

>  sources = files('dpaa2_hw_dpcon.c',

> -		'dpaa2_eventdev.c')

> +		'dpaa2_eventdev.c',

> +		'dpaa2_eventdev_selftest.c)


Unterminated string.

>  allow_experimental_apis = true

>  includes += include_directories('../../crypto/dpaa2_sec/')
diff mbox series

Patch

diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile
index e0bb527b1..634179383 100644
--- a/drivers/event/dpaa2/Makefile
+++ b/drivers/event/dpaa2/Makefile
@@ -40,5 +40,6 @@  CFLAGS += -DALLOW_EXPERIMENTAL_API
 #
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_hw_dpcon.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2_eventdev_selftest.c
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 9255de16f..902a80f36 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -951,6 +951,7 @@  static struct rte_eventdev_ops dpaa2_eventdev_ops = {
 	.port_unlink      = dpaa2_eventdev_port_unlink,
 	.timeout_ticks    = dpaa2_eventdev_timeout_ticks,
 	.dump             = dpaa2_eventdev_dump,
+	.dev_selftest     = test_eventdev_dpaa2,
 	.eth_rx_adapter_caps_get = dpaa2_eventdev_eth_caps_get,
 	.eth_rx_adapter_queue_add = dpaa2_eventdev_eth_queue_add,
 	.eth_rx_adapter_queue_del = dpaa2_eventdev_eth_queue_del,
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h
index bdac1aa56..abc038e49 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev.h
@@ -98,4 +98,6 @@  struct dpaa2_eventdev {
 struct dpaa2_dpcon_dev *rte_dpaa2_alloc_dpcon_dev(void);
 void rte_dpaa2_free_dpcon_dev(struct dpaa2_dpcon_dev *dpcon);
 
+int test_eventdev_dpaa2(void);
+
 #endif /* __DPAA2_EVENTDEV_H__ */
diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
index 86f2e5393..bb5a0e26c 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
@@ -35,4 +35,10 @@  extern int dpaa2_logtype_event;
 #define DPAA2_EVENTDEV_DP_WARN(fmt, args...) \
 	DPAA2_EVENTDEV_DP_LOG(WARNING, fmt, ## args)
 
+#define dpaa2_evdev_info(fmt, ...) DPAA2_EVENTDEV_LOG(INFO, fmt, ##__VA_ARGS__)
+#define dpaa2_evdev_dbg(fmt, ...) DPAA2_EVENTDEV_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define dpaa2_evdev_err(fmt, ...) DPAA2_EVENTDEV_LOG(ERR, fmt, ##__VA_ARGS__)
+#define dpaa2_evdev__func_trace dpaa2_evdev_dbg
+#define dpaa2_evdev_selftest dpaa2_evdev_info
+
 #endif /* _DPAA2_EVENTDEV_LOGS_H_ */
diff --git a/drivers/event/dpaa2/meson.build b/drivers/event/dpaa2/meson.build
index f7da7fad5..cea87d77b 100644
--- a/drivers/event/dpaa2/meson.build
+++ b/drivers/event/dpaa2/meson.build
@@ -9,7 +9,8 @@  if not is_linux
 endif
 deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec']
 sources = files('dpaa2_hw_dpcon.c',
-		'dpaa2_eventdev.c')
+		'dpaa2_eventdev.c',
+		'dpaa2_eventdev_selftest.c)
 
 allow_experimental_apis = true
 includes += include_directories('../../crypto/dpaa2_sec/')