From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: santosh.shukla@caviumnetworks.com, dev@dpdk.org
Subject: Re: [PATCH] app/eventdev: use proper teardown sequence
Date: Wed, 18 Jul 2018 23:06:15 +0530 [thread overview]
Message-ID: <20180718173613.GC29741@jerin> (raw)
In-Reply-To: <20180717143307.5270-1-pbhagavatula@caviumnetworks.com>
-----Original Message-----
> Date: Tue, 17 Jul 2018 20:03:07 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] app/eventdev: use proper teardown sequence
> X-Mailer: git-send-email 2.18.0
>
> Use proper teardown sequence when SIGINT is caught to prevent
> eventdev from going into undefined state.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
> app/test-eventdev/evt_main.c | 6 +++++-
> app/test-eventdev/test_pipeline_common.c | 1 -
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c
> index 57bb94570..bc25fb386 100644
> --- a/app/test-eventdev/evt_main.c
> +++ b/app/test-eventdev/evt_main.c
> @@ -25,8 +25,12 @@ signal_handler(int signum)
> signum);
> /* request all lcores to exit from the main loop */
> *(int *)test->test_priv = true;
> - rte_wmb();
>
> + if (test->ops.ethdev_destroy)
> + test->ops.ethdev_destroy(test, &opt);
I think, stopping the producer should be enough to have proper tear down
sequence, as, When producer stops, the dequeue eventually will not have the
events and it will exit properly.
> +
> + rte_event_dev_stop(opt.dev_id);
> + rte_wmb();
> rte_eal_mp_wait_lcore();
>
> if (test->ops.test_result)
> diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
> index 719518ff3..70fd04517 100644
> --- a/app/test-eventdev/test_pipeline_common.c
> +++ b/app/test-eventdev/test_pipeline_common.c
> @@ -476,7 +476,6 @@ pipeline_eventdev_destroy(struct evt_test *test, struct evt_options *opt)
> {
> RTE_SET_USED(test);
>
> - rte_event_dev_stop(opt->dev_id);
> rte_event_dev_close(opt->dev_id);
> }
>
> --
> 2.18.0
>
next prev parent reply other threads:[~2018-07-18 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 14:33 [PATCH] app/eventdev: use proper teardown sequence Pavan Nikhilesh
2018-07-18 17:36 ` Jerin Jacob [this message]
2018-07-19 11:41 ` [PATCH v2] " Pavan Nikhilesh
2018-07-24 11:01 ` [PATCH v3] " Pavan Nikhilesh
2018-07-24 12:14 ` [PATCH v4] " Pavan Nikhilesh
2018-07-24 15:39 ` Jerin Jacob
2018-07-25 13:12 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180718173613.GC29741@jerin \
--to=jerin.jacob@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=pbhagavatula@caviumnetworks.com \
--cc=santosh.shukla@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.