From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C0C1A04AA; Tue, 8 Sep 2020 07:35:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2A781BEAC; Tue, 8 Sep 2020 07:35:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2A1621DB8; Tue, 8 Sep 2020 07:35:32 +0200 (CEST) IronPort-SDR: Mrp/ddP2CuHk2Zwp6oR82hQdCRAZ56UW/CV2cDM59RFZO9kWhlCfbWTUPgOVYF/xhBd1Zmi10F onzIyt6h6IEA== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="138123632" X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="138123632" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 22:35:31 -0700 IronPort-SDR: FpoeTOwY3yL8s/aPTzU8jFtJ+6JyU4kpaCZJjVbCytzLpLWc+i0zhNIQf/LdnqoSStsP4OOkGM WUPb0HO97bdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="504253480" Received: from irsmsx604.ger.corp.intel.com ([163.33.146.137]) by fmsmga006.fm.intel.com with ESMTP; 07 Sep 2020 22:35:31 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by IRSMSX604.ger.corp.intel.com (163.33.146.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 8 Sep 2020 06:35:29 +0100 Received: from shsmsx605.ccr.corp.intel.com ([10.109.6.215]) by SHSMSX605.ccr.corp.intel.com ([10.109.6.215]) with mapi id 15.01.1713.004; Tue, 8 Sep 2020 13:35:27 +0800 From: "Jiang, YuX" To: "Richardson, Bruce" , "dev@dpdk.org" CC: "Richardson, Bruce" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build Thread-Index: AQHWgUWZCAGxBJ6O/0K3BH43P1MTN6leQQBQ Date: Tue, 8 Sep 2020 05:35:27 +0000 Message-ID: <7b12c900017e4d6da77ec225bb897750@intel.com> References: <20200902155611.654185-1-bruce.richardson@intel.com> <20200902162427.668466-1-bruce.richardson@intel.com> In-Reply-To: <20200902162427.668466-1-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in meson build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" + weix.ling@intel.com -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson Sent: Thursday, September 3, 2020 12:24 AM To: dev@dpdk.org Cc: Richardson, Bruce ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix name of bitrate library in = meson build The bitrate library in DPDK is actually in a "bitratestats" directory, so t= hat is used by meson for the macro and library name. Therefore, we need to = update references to RTE_LIBRTE_BITRATE to RTE_LIBRTE_BITRATESTATS in testp= md to have it found. Rather than supporting both defines, since make is bei= ng removed, we can just replace all instances of the former define with the= latter. To ensure testpmd links ok when this is done, we also need to add bitratest= ats to the list of library dependencies. Fixes: 5b9656b157d3 ("lib: build with meson") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- v2: fixed search-replace fail, where I ended up with "BITRATESTATSSTATS". Thanks to dmarchand for his eagle-eyes in spotting this quickly. :-) The exact commit to attribute the bug to is complicated, but I'm chosing th= e above commit as the one where the issue of the different macro should hav= e been originally spotted. --- app/test-pmd/meson.build | 3 +++ app/test-pmd/parameters.c | 4 ++-- app/test-pmd/testpmd.c | 12 ++++++------ app/test-pmd/testpmd.h | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index ea56= e547bb..f52ab148f6 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -25,6 +25,9 @@ sources =3D files('5tswap.c', 'util.c') =20 deps +=3D ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci= '] +if dpdk_conf.has('RTE_LIBRTE_BITRATESTATS') + deps +=3D 'bitratestats' +endif if dpdk_conf.has('RTE_LIBRTE_PDUMP') deps +=3D 'pdump' endif diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 7c= b0e3d6ec..2a4cb6d2b7 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -613,7 +613,7 @@ launch_args_parse(int argc, char** argv) #ifdef RTE_LI= BRTE_LATENCY_STATS { "latencystats", 1, 0, 0 }, #endif -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS { "bitrate-stats", 1, 0, 0 }, #endif { "disable-crc-strip", 0, 0, 0 }, @@ -986,7 +986,7 @@ launch_args_parse(int argc, char** argv) " must be >=3D 0\n", n); } #endif -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (!strcmp(lgopts[opt_idx].name, "bitrate-stats")) { n =3D atoi(optarg); if (n >=3D 0) { diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7842c3b7= 81..d92c0ecc1f 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -54,7 +54,7 @@ #endif #include #include -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS #include #endif #ifdef RTE_LIBRTE_LATENCY_STATS @@ -478,7 +478,7 @@ uint8_t xstats_hide_zero; unsigned int num_sockets =3D= 0; unsigned int socket_ids[RTE_MAX_NUMA_NODES]; =20 -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS /* Bitrate statistics */ struct rte_stats_bitrates *bitrate_data; lcoreid_t bitrate_lcore_id; @@ -= 2063,7 +2063,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t p= kt_fwd) struct fwd_stream **fsm; streamid_t nb_fs; streamid_t sm_id; -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS uint64_t tics_per_1sec; uint64_t tics_datum; uint64_t tics_current; @@ -2078,7 +2078,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd= _t pkt_fwd) do { for (sm_id =3D 0; sm_id < nb_fs; sm_id++) (*pkt_fwd)(fsm[sm_id]); -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (bitrate_enabled !=3D 0 && bitrate_lcore_id =3D=3D rte_lcore_id()) { tics_current =3D rte_rdtsc(); @@ -3706,7 +3706,7 @@ main(int argc, char** argv) "Check the core mask argument\n"); =20 /* Bitrate/latency stats disabled by default */ -#ifdef RTE_LIBRTE_BITRAT= E +#ifdef RTE_LIBRTE_BITRATESTATS bitrate_enabled =3D 0; #endif #ifdef RTE_LIBRTE_LATENCY_STATS @@ -3800,7 +3800,7 @@ main(int argc, char** argv) #endif =20 /* Setup bitrate stats */ -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS if (bitrate_enabled !=3D 0) { bitrate_data =3D rte_stats_bitrate_create(); if (bitrate_data =3D=3D NULL) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 25a12b14= f2..4fa9797f7e 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -407,7 +407,7 @@ extern uint8_t latencystats_enabled; extern lcoreid_t = latencystats_lcore_id; #endif =20 -#ifdef RTE_LIBRTE_BITRATE +#ifdef RTE_LIBRTE_BITRATESTATS extern lcoreid_t bitrate_lcore_id; extern uint8_t bitrate_enabled; #endif -- 2.25.1