app/test-eventdev: remove unnecessary memset

Message ID 20220713152848.160523-1-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series app/test-eventdev: remove unnecessary memset |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing fail Testing issues

Commit Message

Stephen Hemminger July 13, 2022, 3:28 p.m. UTC
  The function rte_event_dev_info_get already zeros the info structure.
Therefore the test code doesn't need to do it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-eventdev/test_order_common.c | 1 -
 app/test-eventdev/test_perf_atq.c     | 1 -
 app/test-eventdev/test_perf_queue.c   | 1 -
 3 files changed, 3 deletions(-)
  

Comments

Jerin Jacob Sept. 13, 2022, 1:54 p.m. UTC | #1
On Wed, Jul 13, 2022 at 8:59 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The function rte_event_dev_info_get already zeros the info structure.
> Therefore the test code doesn't need to do it.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-eventdev/for-main. Thanks


> ---
>  app/test-eventdev/test_order_common.c | 1 -
>  app/test-eventdev/test_perf_atq.c     | 1 -
>  app/test-eventdev/test_perf_queue.c   | 1 -
>  3 files changed, 3 deletions(-)
>
> diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c
> index 603e7c9178bc..6f00f2448a24 100644
> --- a/app/test-eventdev/test_order_common.c
> +++ b/app/test-eventdev/test_order_common.c
> @@ -328,7 +328,6 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
>         struct test_order *t = evt_test_priv(test);
>         struct rte_event_dev_info dev_info;
>
> -       memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
>         ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
>         if (ret) {
>                 evt_err("failed to get eventdev info %d", opt->dev_id);
> diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c
> index 5436a9b06cd8..8326f540459f 100644
> --- a/app/test-eventdev/test_perf_atq.c
> +++ b/app/test-eventdev/test_perf_atq.c
> @@ -212,7 +212,6 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
>
>         nb_queues = atq_nb_event_queues(opt);
>
> -       memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
>         ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
>         if (ret) {
>                 evt_err("failed to get eventdev info %d", opt->dev_id);
> diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c
> index 5ef2e5a3ef9c..814ab9f9bd86 100644
> --- a/app/test-eventdev/test_perf_queue.c
> +++ b/app/test-eventdev/test_perf_queue.c
> @@ -215,7 +215,6 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
>
>         nb_queues = perf_queue_nb_event_queues(opt);
>
> -       memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
>         ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
>         if (ret) {
>                 evt_err("failed to get eventdev info %d", opt->dev_id);
> --
> 2.35.1
>
  

Patch

diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c
index 603e7c9178bc..6f00f2448a24 100644
--- a/app/test-eventdev/test_order_common.c
+++ b/app/test-eventdev/test_order_common.c
@@ -328,7 +328,6 @@  order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 	struct test_order *t = evt_test_priv(test);
 	struct rte_event_dev_info dev_info;
 
-	memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
 	ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
 	if (ret) {
 		evt_err("failed to get eventdev info %d", opt->dev_id);
diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c
index 5436a9b06cd8..8326f540459f 100644
--- a/app/test-eventdev/test_perf_atq.c
+++ b/app/test-eventdev/test_perf_atq.c
@@ -212,7 +212,6 @@  perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 
 	nb_queues = atq_nb_event_queues(opt);
 
-	memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
 	ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
 	if (ret) {
 		evt_err("failed to get eventdev info %d", opt->dev_id);
diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c
index 5ef2e5a3ef9c..814ab9f9bd86 100644
--- a/app/test-eventdev/test_perf_queue.c
+++ b/app/test-eventdev/test_perf_queue.c
@@ -215,7 +215,6 @@  perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 
 	nb_queues = perf_queue_nb_event_queues(opt);
 
-	memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
 	ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
 	if (ret) {
 		evt_err("failed to get eventdev info %d", opt->dev_id);