From: Jerin Jacob <jerinjacobk@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dpdk-dev <dev@dpdk.org>, Pallavi Kadam <pallavi.kadam@intel.com>,
Narcisa Ana Maria Vasile <Narcisa.Vasile@microsoft.com>,
Ranjit Menon <ranjit.menon@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
Jerin Jacob <jerinj@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
Omar Cardona <ocardona@microsoft.com>,
David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] eal/windows: fix build by supporting trace
Date: Sun, 26 Apr 2020 17:02:39 +0530 [thread overview]
Message-ID: <CALBAE1PPaQWSF9Cme_NczWvSqwxhxRGmM2XX1ON9MPeZQCT-GQ@mail.gmail.com> (raw)
In-Reply-To: <20200426032245.2437733-3-dmitry.kozliuk@gmail.com>
On Sun, Apr 26, 2020 at 8:53 AM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Add EAL private functions to support trace storage:
>
> * eal_persistent_data_path()
> * eal_dir_create()
>
> Replace clock_gettime(CLOCK_REALTIME) with C11 timespec_get().
> Implementation is provided for MinGW-w64 that misses this function.
>
> Provide minimum viable implementations of malloc and timer functions
> used by tracing.
>
> Fixes: 185b7dc1d467 ("trace: save bootup timestamp")
> Fixes: 321dd5f8fa62 ("trace: add internal init and fini interface")
> Reported-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
In general, the patch looks good to me. Could you split the patch as two
1) New eal_permanent_data_path() and eal_dir_create() API definition,
and its implementation with unix and the common code changes to adapt new APIs.
2) Windows implementation of eal_permanent_data_path() and other
missing pieces for
trace implementation.
Some comments below,
>
> void eal_free_no_trace(void *addr);
>
> +/**
> + * Get absolute path to the directory where permanent data can be stored.
> + *
> + * @return
> + * Statically allocated string on success, NULL on failure.
> + */
> +const char *
> +eal_permanent_data_path(void);
Do windows have PATH_MAX kind of macro? I think, it is better API
consumer allocates
the memory of size PATH_MAX and implementation fills it, instead of,
the static scheme.
> +
> +/**
> + * Create a directory accessible to the current user only.
> + *
> + * This function does not create intermediate directories,
> + * thus only the last path component may be nonexistent.
> + *
> + * This function succeeds if path already exists and is a directory.
> + *
> + * Platform-independent code should use forward slash as path separator.
> + *
> + * @param path
> + * Path to be created.
> + * @return
> + * 0 on success, (-1) on failure and rte_errno is set.
> + */
> +int eal_dir_create(const char *path);
>
Looks good to me.
next prev parent reply other threads:[~2020-04-26 11:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-26 3:22 [dpdk-dev] [PATCH 0/2] eal/windows: fix build by supporing trace Dmitry Kozlyuk
2020-04-26 3:22 ` [dpdk-dev] [PATCH 1/2] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-26 11:14 ` Jerin Jacob
2020-04-26 3:22 ` [dpdk-dev] [PATCH 2/2] eal/windows: fix build by supporting trace Dmitry Kozlyuk
2020-04-26 11:32 ` Jerin Jacob [this message]
2020-04-26 12:02 ` Dmitry Kozlyuk
2020-04-26 12:23 ` Jerin Jacob
2020-04-26 12:36 ` Thomas Monjalon
2020-04-26 12:50 ` Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 0/3] eal/windows: fix build by enabling trace compilation Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 1/3] eal/windows: replace sys/queue.h with a complete one from FreeBSD Dmitry Kozlyuk
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 2/3] eal: add internal directory management API Dmitry Kozlyuk
2020-05-04 20:14 ` Narcisa Ana Maria Vasile
2020-04-26 15:28 ` [dpdk-dev] [PATCH v2 3/3] eal/windows: fix build by enabling trace compilation Dmitry Kozlyuk
2020-04-26 15:38 ` Thomas Monjalon
2020-04-26 16:42 ` Dmitry Kozlyuk
2020-04-26 16:41 ` [dpdk-dev] [PATCH v3] eal: disable tracing on Windows Dmitry Kozlyuk
2020-04-26 17:46 ` Jerin Jacob
2020-04-26 18:10 ` 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=CALBAE1PPaQWSF9Cme_NczWvSqwxhxRGmM2XX1ON9MPeZQCT-GQ@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=Narcisa.Vasile@microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=harini.ramakrishnan@microsoft.com \
--cc=jerinj@marvell.com \
--cc=ocardona@microsoft.com \
--cc=pallavi.kadam@intel.com \
--cc=ranjit.menon@intel.com \
--cc=skori@marvell.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 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).