From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Harry van Haaren <harry.van.haaren@intel.com>
Cc: dev@dpdk.org, thomas@monjalon.net, keith.wiles@intel.com,
bruce.richardson@intel.com
Subject: Re: [PATCH v3 2/7] service cores: EAL init changes
Date: Tue, 4 Jul 2017 17:05:32 +0530 [thread overview]
Message-ID: <20170704113531.GA14921@jerin> (raw)
In-Reply-To: <1499031314-7172-3-git-send-email-harry.van.haaren@intel.com>
-----Original Message-----
> Date: Sun, 2 Jul 2017 22:35:09 +0100
> From: Harry van Haaren <harry.van.haaren@intel.com>
> To: dev@dpdk.org
> CC: jerin.jacob@caviumnetworks.com, thomas@monjalon.net,
> keith.wiles@intel.com, bruce.richardson@intel.com, Harry van Haaren
> <harry.van.haaren@intel.com>
> Subject: [PATCH v3 2/7] service cores: EAL init changes
> X-Mailer: git-send-email 2.7.4
>
> This commit shows the changes required in rte_eal_init()
> to transparently launch the service threads. The threads
> are launched into the service worker functions here because
> after rte_eal_init() the application is not gauranteed to
> call any other DPDK API.
>
> As the registration of services happens at initialization
> time, the services that require CPU time are already available
> when we reach the end of rte_eal_init().
>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
>
> ---
>
> v2 comments:
> - Include BSD implementation (Jerin)
> - Move details of core-tracking into rte_service_lcore_add(Jerin)
> - Given there are changes other to suggested, not using Ack
> ---
> lib/librte_eal/bsdapp/eal/eal.c | 22 ++++++++++++++++++++++
> lib/librte_eal/linuxapp/eal/eal.c | 23 +++++++++++++++++++++++
> 2 files changed, 45 insertions(+)
>
> diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
> index 05f0c1f..4f7dcb3 100644
> --- a/lib/librte_eal/bsdapp/eal/eal.c
> +++ b/lib/librte_eal/bsdapp/eal/eal.c
> @@ -653,6 +653,17 @@ rte_eal_init(int argc, char **argv)
> rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
> rte_eal_mp_wait_lcore();
>
> + /* initialize services first so vdevs can register during bus_probe.
> + * Ignore return value of already initialized, this means EAL parameter
> + * -s was used to set a service-core mask.
> + */
> + ret = rte_service_init();
> + if (ret) {
> + rte_eal_init_alert("rte_service_init() failed\n");
> + rte_errno = ENOEXEC;
> + return -1;
> + }
> +
> /* Probe all the buses and devices/drivers on them */
> if (rte_bus_probe()) {
> rte_eal_init_alert("Cannot probe devices\n");
> @@ -660,6 +671,17 @@ rte_eal_init(int argc, char **argv)
> return -1;
> }
>
> + /* initialize default services configuration */
> + uint32_t service_cores[RTE_MAX_LCORE];
> + int count = rte_service_lcore_list(service_cores, RTE_MAX_LCORE);
> + for (i = 0; i < count; i++)
> + rte_service_lcore_start(service_cores[i]);
> + ret = rte_service_set_default_mapping();
> + if (ret) {
> + rte_errno = ENOEXEC;
> + return -1;
> + }
> +
> rte_eal_mcfg_complete();
>
> return fctret;
> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> index 7c78f2d..d63dd87 100644
> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -78,6 +78,7 @@
> #include <rte_version.h>
> #include <rte_atomic.h>
> #include <malloc_heap.h>
> +#include <rte_service_private.h>
Not included this header file for bsdapp compilation. It should fail to
compile. Right?
next prev parent reply other threads:[~2017-07-04 11:35 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 9:06 [PATCH 1/6] service cores: header and implementation Harry van Haaren
2017-06-23 9:06 ` [PATCH 2/6] service cores: coremask parsing Harry van Haaren
2017-06-26 12:49 ` Jerin Jacob
2017-06-29 11:13 ` Van Haaren, Harry
2017-06-23 9:06 ` [PATCH 3/6] service cores: EAL init changes Harry van Haaren
2017-06-26 12:55 ` Jerin Jacob
2017-06-29 11:13 ` Van Haaren, Harry
2017-06-23 9:06 ` [PATCH 4/6] service cores: mark cores in lcore config as RTE Harry van Haaren
2017-06-23 9:06 ` [PATCH 5/6] service core: add unit tests Harry van Haaren
2017-06-26 13:06 ` Jerin Jacob
2017-06-29 11:14 ` Van Haaren, Harry
2017-06-23 9:06 ` [PATCH 6/6] service cores: enable event/sw with service Harry van Haaren
2017-06-26 13:46 ` Jerin Jacob
2017-06-29 11:15 ` Van Haaren, Harry
2017-06-26 11:59 ` [PATCH 1/6] service cores: header and implementation Jerin Jacob
2017-06-29 11:13 ` Van Haaren, Harry
2017-06-29 11:23 ` [PATCH v2 0/5] service cores: cover letter Harry van Haaren
2017-06-29 11:23 ` [PATCH v2 1/5] service cores: header and implementation Harry van Haaren
2017-06-29 11:23 ` [PATCH v2 2/5] service cores: EAL init changes Harry van Haaren
2017-06-29 11:23 ` [PATCH v2 3/5] service cores: coremask parsing Harry van Haaren
2017-06-29 11:23 ` [PATCH v2 4/5] service cores: add unit tests Harry van Haaren
2017-06-29 11:23 ` [PATCH v2 5/5] service cores: enable event/sw with service Harry van Haaren
2017-07-02 21:35 ` [PATCH v3 0/7] service cores: cover letter Harry van Haaren
2017-07-02 21:35 ` [PATCH v3 1/7] service cores: header and implementation Harry van Haaren
2017-07-04 17:16 ` Jerin Jacob
2017-07-02 21:35 ` [PATCH v3 2/7] service cores: EAL init changes Harry van Haaren
2017-07-04 11:35 ` Jerin Jacob [this message]
2017-07-07 16:28 ` Van Haaren, Harry
2017-07-02 21:35 ` [PATCH v3 3/7] service cores: coremask parsing Harry van Haaren
2017-07-04 12:45 ` Jerin Jacob
2017-07-06 14:47 ` Van Haaren, Harry
2017-07-07 10:45 ` Jerin Jacob
2017-07-07 10:57 ` Van Haaren, Harry
2017-07-02 21:35 ` [PATCH v3 4/7] service cores: add unit tests Harry van Haaren
2017-07-04 11:14 ` Jerin Jacob
2017-07-02 21:35 ` [PATCH v3 5/7] service cores: enable event/sw with service Harry van Haaren
2017-07-04 10:52 ` Jerin Jacob
2017-07-07 16:28 ` Van Haaren, Harry
2017-07-02 21:35 ` [PATCH v3 6/7] maintainers: claim service cores Harry van Haaren
2017-07-04 10:53 ` Jerin Jacob
2017-07-02 21:35 ` [PATCH v3 7/7] doc: add service cores to doc and release notes Harry van Haaren
2017-07-02 22:16 ` Mcnamara, John
2017-07-04 10:56 ` Jerin Jacob
2017-07-07 16:41 ` [PATCH v4 0/7] service cores: cover letter Harry van Haaren
2017-07-07 16:41 ` [PATCH v4 1/7] service cores: header and implementation Harry van Haaren
2017-07-11 8:29 ` Jerin Jacob
2017-07-11 9:54 ` Thomas Monjalon
2017-07-11 12:32 ` Van Haaren, Harry
2017-07-11 12:44 ` Jerin Jacob
2017-07-11 12:49 ` Van Haaren, Harry
2017-07-11 14:10 ` Van Haaren, Harry
2017-07-07 16:41 ` [PATCH v4 2/7] service cores: EAL init changes Harry van Haaren
2017-07-11 7:42 ` Jerin Jacob
2017-07-11 14:11 ` Van Haaren, Harry
2017-07-07 16:41 ` [PATCH v4 3/7] service cores: coremask parsing Harry van Haaren
2017-07-07 16:41 ` [PATCH v4 4/7] service cores: add unit tests Harry van Haaren
2017-07-11 8:12 ` Jerin Jacob
2017-07-07 16:41 ` [PATCH v4 5/7] event/sw: enable SW PMD with service capability Harry van Haaren
2017-07-07 16:41 ` [PATCH v4 6/7] doc: add service cores to doc and release notes Harry van Haaren
2017-07-07 16:41 ` [PATCH v4 7/7] maintainers: claim service cores Harry van Haaren
2017-07-11 7:53 ` Jerin Jacob
2017-07-09 22:08 ` [PATCH v4 0/7] service cores: cover letter Thomas Monjalon
2017-07-10 8:18 ` Van Haaren, Harry
2017-07-10 11:41 ` Jerin Jacob
2017-07-11 14:19 ` [PATCH v5 " Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 1/7] service cores: header and implementation Harry van Haaren
2017-07-12 16:35 ` Jerin Jacob
2017-07-11 14:19 ` [PATCH v5 2/7] service cores: EAL init changes Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 3/7] service cores: coremask parsing Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 4/7] service cores: add unit tests Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 5/7] event/sw: enable SW PMD with service capability Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 6/7] doc: add service cores to doc and release notes Harry van Haaren
2017-07-11 14:19 ` [PATCH v5 7/7] maintainers: claim service cores Harry van Haaren
2017-07-12 16:49 ` [PATCH v5 0/7] service cores: cover letter Jerin Jacob
2017-07-16 19:25 ` Thomas Monjalon
2017-07-17 8:07 ` Van Haaren, Harry
2017-07-17 15:21 ` [PATCH] service: add corelist to EAL arguments Harry van Haaren
2017-07-17 15:53 ` Ananyev, Konstantin
2017-07-17 15:58 ` Van Haaren, Harry
2017-07-17 16:10 ` Ananyev, Konstantin
2017-07-17 16:16 ` Van Haaren, Harry
2017-07-19 5:42 ` 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=20170704113531.GA14921@jerin \
--to=jerin.jacob@caviumnetworks.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=keith.wiles@intel.com \
--cc=thomas@monjalon.net \
/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.