DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Jie <jizh@linux.microsoft.com>
Cc: dev@dpdk.org, roretzla@linux.microsoft.com,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] rte_metrics: unconditionally export rte_metrics_tel_xxx functions
Date: Tue, 23 Feb 2021 01:24:15 +0300	[thread overview]
Message-ID: <20210223012415.142bf2fc@sovereign> (raw)
In-Reply-To: <1614029102-30858-1-git-send-email-jizh@linux.microsoft.com>

+ Bruce

On Mon, 22 Feb 2021 13:25:02 -0800, Jie wrote:
[...]
> diff --git a/config/meson.build b/config/meson.build
> index 3cf560b8a..892bd9677 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -292,6 +292,11 @@ if is_freebsd
>  	add_project_arguments('-D__BSD_VISIBLE', language: 'c')
>  endif
>  
> +jansson = dependency('jansson', required: false, method: 'pkg-config')
> +if jansson.found()
> +	dpdk_conf.set('RTE_HAVE_JANSSON', 1)
> +endif

DPDK seems to prefer "HAS" for such macros.

Why not do this in lib/librte_telemetry/meson.build?

[...]
> --- a/lib/librte_metrics/meson.build
> +++ b/lib/librte_metrics/meson.build
> @@ -4,11 +4,12 @@
>  sources = files('rte_metrics.c')
>  headers = files('rte_metrics.h')
>  
> -jansson = dependency('jansson', required: false, method: 'pkg-config')
> -if jansson.found()
> +if dpdk_conf.has('RTE_HAVE_JANSSON')
>  	ext_deps += jansson
> -	sources += files('rte_metrics_telemetry.c')
> -	headers += files('rte_metrics_telemetry.h')
> -	deps += ['ethdev', 'telemetry']
> -	includes += include_directories('../librte_telemetry')
>  endif
> +
> +sources += files('rte_metrics_telemetry.c')
> +headers += files('rte_metrics_telemetry.h')

Can be merged with definitions above.

[...]
>  int32_t
>  rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list)
>  {
> +#ifdef JANSSON

Why not use RTE_HAS_JANSSON everywhere? (One more occurrence below.)


  reply	other threads:[~2021-02-22 22:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 21:25 Jie
2021-02-22 22:24 ` Dmitry Kozlyuk [this message]
2021-02-23 10:03   ` Bruce Richardson
2021-02-23 23:01 ` [dpdk-dev] [PATCH v2] rte_metrics: unconditionally exports " Jie Zhou
2021-02-24 10:36   ` Bruce Richardson
2021-02-24 18:46   ` [dpdk-dev] [PATCH v3] " Jie Zhou
2021-03-06 20:18     ` Dmitry Kozlyuk
2021-03-08 18:05     ` [dpdk-dev] [PATCH v4] " Jie Zhou
2021-03-16  9:07       ` 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=20210223012415.142bf2fc@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jizh@linux.microsoft.com \
    --cc=roretzla@linux.microsoft.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).