From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 810E9A034F; Mon, 22 Feb 2021 23:24:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC46740138; Mon, 22 Feb 2021 23:24:18 +0100 (CET) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mails.dpdk.org (Postfix) with ESMTP id A2F8B4003C for ; Mon, 22 Feb 2021 23:24:17 +0100 (CET) Received: by mail-lj1-f175.google.com with SMTP id c8so60827796ljd.12 for ; Mon, 22 Feb 2021 14:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j50CA7gSVv7XGm1dSIja8q3XGi7RH+FdxOtlTCIm7rQ=; b=b8GdPfLuyDTBUynM8iQZO71yJnQc+CnlndAeJsa5rJwbid9Lqfj4yRV0wdNU2trBsf sYmbjjXf+31BKHVyqXIreWssawnmInjp2mFCYaMJYZzLsSjNvCYfS7aEyG/FrBiezNpf JwF4dLBeUGvPOFLl0HiUtF6wAwkEfQhbUL5KsLveHjI+opYpVNRmJ+Yp0YHJSY3r3aZ5 hQkG3rTrbIh3nBZRQOsOFJafV8vkaEPjqNoVv0ssptJNMO9Xfx2ClG669VmMVkTtxppn KkaK4o2/D96IPAabDNdrK6y8ntPNTVmkOlittjQVFC9xI+1oWnDNKRGMyUuFtaNuC8Ba RO7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j50CA7gSVv7XGm1dSIja8q3XGi7RH+FdxOtlTCIm7rQ=; b=iHP4au2XDSGfYylImDCgFhdywIhFMhc+Ng+8XVST8KXm3agV+bo90xW32u2bWtltcu umuI+vMgH+eMu1w2srCdPuIT2X6nC8H1FYFb7VefyPe5Qc5zNMkbTrgSA0EJK1QBw/8O qUDzpxK0ZIWM9QNNeB8eVGDO40CJ7yVHphTAZAVSjjblv5jtj4Z+T6NaY8/mr5JFn4NR bYiErbRspTBgn4RpTdfUHZbhjLIZOiIP0FiW4Ka5dKj0Kb9nRN4kamqz3F4+hObypwln nmuE5GPezXjx9S9Nvo+ws6pjgpbvBlAYXjPhEWLzZ8GNlLB+Spvn2WmB6YqHn4N5VHvV 6R5w== X-Gm-Message-State: AOAM530ZNM6LWq477iwPOl9+576Dd7xQL3LY638esD4PxMQBpER0IJ8f MgEbpDWaA56JNosuV3TfESw= X-Google-Smtp-Source: ABdhPJwzZk+TohUBSb6riWkfdltTlFzub/pWALUSGZeOW+LPUU+P+GzSAsbg1fgl1HQ9jEaaiOkYQQ== X-Received: by 2002:a2e:9198:: with SMTP id f24mr11171661ljg.353.1614032657174; Mon, 22 Feb 2021 14:24:17 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id t26sm753879ljg.12.2021.02.22.14.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 14:24:16 -0800 (PST) Date: Tue, 23 Feb 2021 01:24:15 +0300 From: Dmitry Kozlyuk To: Jie Cc: dev@dpdk.org, roretzla@linux.microsoft.com, Bruce Richardson Message-ID: <20210223012415.142bf2fc@sovereign> In-Reply-To: <1614029102-30858-1-git-send-email-jizh@linux.microsoft.com> References: <1614029102-30858-1-git-send-email-jizh@linux.microsoft.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] rte_metrics: unconditionally export rte_metrics_tel_xxx functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" + 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.)