DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: talshn@mellanox.com
Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com,
	david.marchand@redhat.com, ranjit.menon@intel.com,
	navasile@linux.microsoft.com, harini.ramakrishnan@microsoft.com,
	ocardona@microsoft.com, bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [PATCH 2/2] eal/windows: support debug calls
Date: Mon, 8 Jun 2020 03:31:08 +0300	[thread overview]
Message-ID: <20200608033108.3f99ebd7@sovereign> (raw)
In-Reply-To: <20200607093529.15456-3-talshn@mellanox.com>

On Sun,  7 Jun 2020 12:35:29 +0300
talshn@mellanox.com wrote:

> From: Tal Shnaiderman <talshn@mellanox.com>
> 
> Support the debug functions in eal_common_debug.c for Windows.
> 
> Implementation of rte_dump_stack to get a backtrace similarly to Unix
> and of rte_eal_cleanup in eal.c.
> 
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
>  config/meson.build                 |  1 +
>  lib/librte_eal/common/meson.build  |  1 +
>  lib/librte_eal/windows/eal.c       |  7 ++++
>  lib/librte_eal/windows/eal_debug.c | 77 +++++++++++++++++++++++++++++++++-----
>  4 files changed, 77 insertions(+), 9 deletions(-)
> 
> diff --git a/config/meson.build b/config/meson.build
> index 43ab113106..51a953c7d3 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -268,6 +268,7 @@ if is_windows
>  	if cc.get_id() == 'gcc'
>  		add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
>  	endif
> +	add_project_link_arguments('-lDbgHelp', language: 'c')

When cross-compiling with MinGW-w64 from Linux, the library is "dbghelp"
(lowercase), and filesystem is case-sensitive, so this doesn't work. Suggest
using lowercase everywhere.

[snip]
>   /* Launch threads, called at application init(). */
>  int
>  rte_eal_init(int argc, char **argv)
> diff --git a/lib/librte_eal/windows/eal_debug.c b/lib/librte_eal/windows/eal_debug.c
> index 669be6ff97..fda217bee4 100644
> --- a/lib/librte_eal/windows/eal_debug.c
> +++ b/lib/librte_eal/windows/eal_debug.c
> @@ -5,16 +5,75 @@
>  #include <stdarg.h>
>  #include <rte_log.h>
>  #include <rte_debug.h>
> +#include <rte_windows.h>
>  
> - /* call abort(), it will generate a coredump if enabled */
> -void
> -__rte_panic(const char *funcname, const char *format, ...)
> +#include <DbgHelp.h>

Same problem with filename, same solution.

> +
> +#define BACKTRACE_SIZE 256
> +
> +/* dump the stack of the calling core */
> +void rte_dump_stack(void)

Result type should be on its own line. Please re-check the series for this
particular violation, there are a few more instances.

[rest snipped]

-- 
Dmitry Kozlyuk

      reply	other threads:[~2020-06-08  0:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07  9:35 [dpdk-dev] [PATCH 0/2] Support EAL debug functions on Windows talshn
2020-06-07  9:35 ` [dpdk-dev] [PATCH 1/2] eal: move OS common debug functions to single file talshn
2020-06-07  9:35 ` [dpdk-dev] [PATCH 2/2] eal/windows: support debug calls talshn
2020-06-08  0:31   ` Dmitry Kozlyuk [this message]

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=20200608033108.3f99ebd7@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=talshn@mellanox.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).