From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: David Hunt <david.hunt@intel.com>, dev@dpdk.org
Cc: lukaszx.gosiewski@intel.com,
Marcin Hajkowski <marcinx.hajkowski@intel.com>,
Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Subject: Re: [dpdk-dev] [PATCH v5] power: add fifo per core for JSON interface
Date: Tue, 9 Jul 2019 16:12:28 +0100 [thread overview]
Message-ID: <f3246ef0-cde9-170c-e0bd-52ea43c67260@intel.com> (raw)
In-Reply-To: <20190709150753.15732-1-david.hunt@intel.com>
On 09-Jul-19 4:07 PM, David Hunt wrote:
> From: Marcin Hajkowski <marcinx.hajkowski@intel.com>
>
> This patch implements a separate FIFO for each cpu core to improve the
> previous functionality where anyone with access to the FIFO could affect
> any core on the system. By using appropriate permissions, fifo interfaces
> can be configured to only affect the particular cores.
>
> Because each FIFO is per core, the following fields have been removed
> from the command JSON format: core_list, resource_id, name.
>
> Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> Signed-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com>
> Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
> Tested-by: David Hunt <david.hunt@intel.com>
>
> ---
> v2:
> * updated handling vm_name (use proper buff size)
> * rebase to master changes
>
> v3:
> * improvement to coding style
>
> v4:
> * rebase to tip of master
>
> v5:
> * merged docs into same patch as the code, as per mailing list policy
> * made changes out of review by Anatoly.
> ---
<snip>
> - if (setup_host_channel_info(&chan_info, 0) < 0) {
> - rte_free(chan_info);
> - return 0;
> + ret = fifo_path(socket_path, sizeof(socket_path), i);
> + if (ret < 0)
> + goto error;
> +
> + ret = mkfifo(socket_path, 0660);
> + RTE_LOG(DEBUG, CHANNEL_MANAGER, "TRY CREATE fifo '%s'\n",
> + socket_path);
> + if ((errno != EEXIST) && (ret < 0)) {
> + RTE_LOG(ERR, CHANNEL_MANAGER, "Cannot create fifo '%s' error: "
> + "%s\n", socket_path, strerror(errno));
> + goto error;
> + }
> + chan_info = rte_malloc(NULL, sizeof(*chan_info), 0);
> + if (chan_info == NULL) {
> + RTE_LOG(ERR, CHANNEL_MANAGER, "Error allocating memory for "
> + "channel '%s'\n", socket_path);
> + goto error;
> + }
> + chan_infos[i] = chan_info;
> + rte_strlcpy(chan_info->channel_path, socket_path,
> + sizeof(chan_info->channel_path));
> +
> + if (setup_host_channel_info(&chan_info, i) < 0) {
> + rte_free(chan_info);
> + chan_infos[i] = NULL;
> + goto error;
> + }
> + num_channels_enabled++;
> }
> - num_channels_enabled++;
>
> return num_channels_enabled;
> +error:
> + /* Clean up the channels opened before we hit an error. */
> + for (i = 0; i < RTE_MAX_LCORE; i++) {
You're going up to RTE_MAX_LCORE here, but up to ci->core_count in the
original loop. Is that intentional?
Other than that,
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
next prev parent reply other threads:[~2019-07-09 15:12 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 10:45 [dpdk-dev] [PATCH 0/2] " Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-08 10:45 ` [dpdk-dev] [PATCH 1/2] " Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-08 10:45 ` [dpdk-dev] [PATCH 2/2] doc: update according to the fifo per core impl Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 0/2] power: add fifo per core for JSON interface Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 1/2] " Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 2/2] doc: update according to the fifo per core impl Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-22 20:37 ` [dpdk-dev] [PATCH v2 0/2] power: add fifo per core for JSON interface Thomas Monjalon
2019-04-22 20:37 ` Thomas Monjalon
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 0/2] " Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 1/2] power: " Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-06-07 8:26 ` Hajkowski, MarcinX
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 2/2] doc: update according to the fifo per core impl Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-06-13 9:21 ` [dpdk-dev] [PATCH v4 0/2] Fifo per core Hajkowski
2019-06-13 9:21 ` [dpdk-dev] [PATCH v4 1/2] power: add fifo per core for JSON interface Hajkowski
2019-07-08 13:44 ` Burakov, Anatoly
2019-07-09 15:07 ` [dpdk-dev] [PATCH v5] " David Hunt
2019-07-09 15:12 ` Burakov, Anatoly [this message]
2019-07-09 15:23 ` Hunt, David
2019-07-09 15:21 ` [dpdk-dev] [PATCH v6] " David Hunt
2019-07-09 15:27 ` Hunt, David
2019-07-09 15:38 ` Thomas Monjalon
2019-07-10 21:55 ` Thomas Monjalon
2019-06-13 9:21 ` [dpdk-dev] [PATCH v4 2/2] doc: update according to the fifo per core impl Hajkowski
2019-07-08 13:34 ` Burakov, Anatoly
2019-07-08 15:46 ` Hunt, David
2019-07-04 20:09 ` [dpdk-dev] [PATCH v4 0/2] Fifo per core Thomas Monjalon
2019-06-07 8:50 ` [dpdk-dev] [PATCH 0/2] power: add fifo per core for JSON interface Hajkowski, MarcinX
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=f3246ef0-cde9-170c-e0bd-52ea43c67260@intel.com \
--to=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=lukaszx.gosiewski@intel.com \
--cc=lukaszx.krakowiak@intel.com \
--cc=marcinx.hajkowski@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).