DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: Harry van Haaren <harry.van.haaren@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] service: fix service core launch
Date: Thu, 4 Jan 2018 21:00:59 +0530	[thread overview]
Message-ID: <20180104153058.mm4s24p2jpqmsiie@Pavan-LT> (raw)
In-Reply-To: <1513768907-112647-2-git-send-email-harry.van.haaren@intel.com>

Hi Harry,

On Wed, Dec 20, 2017 at 11:21:47AM +0000, Harry van Haaren wrote:
> diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c
> index 311c704..43f2318 100644
> --- a/test/test/test_service_cores.c
> +++ b/test/test/test_service_cores.c
> @@ -348,6 +348,7 @@ service_lcore_en_dis_able(void)
>
>  	/* call remote_launch to verify that app can launch ex-service lcore */
>  	service_remote_launch_flag = 0;
> +	rte_eal_wait_lcore(slcore_id);
>  	int ret = rte_eal_remote_launch(service_remote_launch_func, NULL,
>  					slcore_id);
>  	TEST_ASSERT_EQUAL(0, ret, "Ex-service core remote launch failed.");
> @@ -505,6 +506,10 @@ service_threaded_test(int mt_safe)
>  	if (!mt_safe)
>  		test_params[1] = 1;
>
> +	/* wait for lcores before start() */
> +	rte_eal_wait_lcore(slcore_1);
> +	rte_eal_wait_lcore(slcore_2);
> +
>  	rte_service_lcore_start(slcore_1);
>  	rte_service_lcore_start(slcore_2);

As you are touching this file can you change following things:

Need to increase the delay to a value similar to other tc.
 service_lcore_running_check(void)
 {
        uint64_t tick = service_tick;
-       rte_delay_ms(SERVICE_DELAY * 10);
+       rte_delay_ms(100);
        /* if (tick != service_tick) we know the lcore as polled the service */
        return tick != service_tick;
 }


As service_mt_unsafe_poll and service_mt_safe_poll use the same function body and
are called one after the other we need to wait for them to complete before
proceeding to the next tc i.e service_mt_unsafe_poll -> wait for the cores to
complete -> service_mt_safe_poll else it will lead to unintended side effects.

@@ -523,6 +523,8 @@ service_threaded_test(int mt_safe)
        TEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0),
                        "Failed to stop MT Safe service");

+       rte_eal_wait_lcore(slcore_1);
+       rte_eal_wait_lcore(slcore_2);
        unregister_all();

        /* return the value of the callback pass_test variable to caller */

Cheers,
Pavan.

>
> @@ -611,6 +616,7 @@ service_app_lcore_poll_impl(const int mt_safe)
>  	rte_service_runstate_set(id, 1);
>
>  	uint32_t app_core2 = rte_get_next_lcore(slcore_id, 1, 1);
> +	rte_eal_wait_lcore(app_core2);
>  	int app_core2_ret = rte_eal_remote_launch(service_run_on_app_core_func,
>  						  &id, app_core2);
>
> --
> 2.7.4
>

  reply	other threads:[~2018-01-04 15:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 11:21 [dpdk-dev] [PATCH 1/2] service: fix del to reset lcore role to rte Harry van Haaren
2017-12-20 11:21 ` [dpdk-dev] [PATCH 2/2] service: fix service core launch Harry van Haaren
2018-01-04 15:30   ` Pavan Nikhilesh [this message]
2018-01-04 15:20 ` [dpdk-dev] [PATCH 1/2] service: fix del to reset lcore role to rte Pavan Nikhilesh
2018-01-08 15:58 ` [dpdk-dev] [PATCH v2 " Harry van Haaren
2018-01-08 15:58   ` [dpdk-dev] [PATCH v2 2/2] service: fix service core launch Harry van Haaren
2018-01-09 11:38   ` [dpdk-dev] [PATCH v3 1/2] service: fix del to reset lcore role to rte Harry van Haaren
2018-01-09 11:38     ` [dpdk-dev] [PATCH v3 2/2] service: fix service core launch Harry van Haaren
2018-01-09 12:14     ` [dpdk-dev] [PATCH v3 1/2] service: fix del to reset lcore role to rte Bruce Richardson
2018-01-09 13:37     ` [dpdk-dev] [PATCH v4 1/2] service: fix lcore role after delete Harry van Haaren
2018-01-09 13:37       ` [dpdk-dev] [PATCH v4 2/2] service: fix service core launch Harry van Haaren
2018-01-10 10:23       ` [dpdk-dev] [PATCH v4 1/2] service: fix lcore role after delete Pavan Nikhilesh
2018-01-11 22:30         ` Thomas Monjalon

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=20180104153058.mm4s24p2jpqmsiie@Pavan-LT \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).