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 B3F82A0C46; Fri, 23 Jul 2021 15:08:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36E1F40040; Fri, 23 Jul 2021 15:08:59 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id EC6C44003C for ; Fri, 23 Jul 2021 15:08:57 +0200 (CEST) Received: from [192.168.100.116] (unknown [37.139.99.76]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 3941C7F510; Fri, 23 Jul 2021 16:08:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 3941C7F510 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1627045737; bh=1bTW4tS0tZTmlzHfasjpKrNQgEBH4GkmNoH2g0R+dH4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=FmDxckTlyjYZt29e9kw1KZ9Y5s+sAcHF3ptsLiZG3PxIw5sLz6ah5VzB61aQQRU4v /+nvnzQ8Hlo4C0zwGrzzQmL0O61dEOy2uZlUc0bJ7Yh2IR0Bmygj+mZzBpuWoxlC+t QLm8Gfe0Lh1B6tztm6IVJhKJ/2wTZIM2iezxC2W8= To: David Marchand Cc: dev , Xiaoyun Li , Ivan Ilchenko References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20210722095433.1898589-1-andrew.rybchenko@oktetlabs.ru> <20210722095433.1898589-12-andrew.rybchenko@oktetlabs.ru> From: Andrew Rybchenko Message-ID: <617e777d-f4a0-a0ff-ba24-aba139925789@oktetlabs.ru> Date: Fri, 23 Jul 2021 16:08:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 11/11] app/testpmd: add option to display extended statistics 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" Hi David, On 7/22/21 11:15 PM, David Marchand wrote: > On Thu, Jul 22, 2021 at 11:55 AM Andrew Rybchenko > wrote: >> >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c >> index 8468018cf3..baffef1642 100644 >> --- a/app/test-pmd/cmdline.c >> +++ b/app/test-pmd/cmdline.c >> @@ -3609,6 +3609,62 @@ cmdline_parse_inst_t cmd_stop = { >> >> /* *** SET CORELIST and PORTLIST CONFIGURATION *** */ >> >> +int >> +parse_xstats_list(char *in_str, struct rte_eth_xstat_name **xstats, >> + unsigned int *xstats_num) > > I had saved this comment as it seemed harmless, but in_str can be constified. > And well, mingw build seems picky about it: > > [5/20] Compiling C object app/dpdk-testpmd.exe.p/test-pmd_parameters.c.obj > FAILED: app/dpdk-testpmd.exe.p/test-pmd_parameters.c.obj > x86_64-w64-mingw32-gcc -Iapp/dpdk-testpmd.exe.p -Iapp -I../../dpdk/app > -Ilib/ethdev -I../../dpdk/lib/ethdev -I. -I../../dpdk -Iconfig > -I../../dpdk/config -Ilib/eal/include -I../../dpdk/lib/eal/include > -Ilib/eal/windows/include -I../../dpdk/lib/eal/windows/include > -Ilib/eal/x86/include -I../../dpdk/lib/eal/x86/include > -Ilib/eal/common -I../../dpdk/lib/eal/common -Ilib/eal > -I../../dpdk/lib/eal -Ilib/kvargs -I../../dpdk/lib/kvargs -Ilib/net > -I../../dpdk/lib/net -Ilib/mbuf -I../../dpdk/lib/mbuf -Ilib/mempool > -I../../dpdk/lib/mempool -Ilib/ring -I../../dpdk/lib/ring -Ilib/meter > -I../../dpdk/lib/meter -Ilib/metrics -I../../dpdk/lib/metrics > -Ilib/telemetry -I../../dpdk/lib/telemetry -Ilib/gro > -I../../dpdk/lib/gro -Ilib/gso -I../../dpdk/lib/gso -Ilib/cmdline > -I../../dpdk/lib/cmdline -Idrivers/bus/pci > -I../../dpdk/drivers/bus/pci -I../../dpdk/drivers/bus/pci/windows > -Ilib/pci -I../../dpdk/lib/pci -Ilib/bitratestats > -I../../dpdk/lib/bitratestats -Ilib/pdump -I../../dpdk/lib/pdump > -Ilib/latencystats -I../../dpdk/lib/latencystats -Idrivers/net/i40e > -I../../dpdk/drivers/net/i40e -Idrivers/net/i40e/base > -I../../dpdk/drivers/net/i40e/base -Idrivers/bus/vdev > -I../../dpdk/drivers/bus/vdev -Ilib/hash -I../../dpdk/lib/hash > -Ilib/rcu -I../../dpdk/lib/rcu -fdiagnostics-color=always -pipe > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 -g -include > rte_config.h -Wextra -Wcast-qual -Wdeprecated -Wformat > -Wformat-nonliteral -Wformat-security -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wold-style-definition > -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef > -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned > -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00 > -D__USE_MINGW_ANSI_STDIO -mno-avx512f -march=native > -DALLOW_EXPERIMENTAL_API -Wno-deprecated-declarations -MD -MQ > app/dpdk-testpmd.exe.p/test-pmd_parameters.c.obj -MF > app/dpdk-testpmd.exe.p/test-pmd_parameters.c.obj.d -o > app/dpdk-testpmd.exe.p/test-pmd_parameters.c.obj -c > ../../dpdk/app/test-pmd/parameters.c > In file included from ../../dpdk/app/test-pmd/parameters.c:6: > ../../dpdk/app/test-pmd/parameters.c: In function 'launch_args_parse': > ../../dpdk/lib/eal/windows/include/getopt.h:38:16: error: passing > argument 1 of 'parse_xstats_list' discards 'const' qualifier from > pointer target type [-Werror=discarded-qualifiers] > 38 | #define optarg usual_optarg > | ^~~~~~~~~~~~ > ../../dpdk/app/test-pmd/parameters.c:699:28: note: in expansion of > macro 'optarg' > 699 | rc = parse_xstats_list(optarg, &xstats_display, > | ^~~~~~ > In file included from ../../dpdk/app/test-pmd/parameters.c:46: > ../../dpdk/app/test-pmd/testpmd.h:787:29: note: expected 'char *' but > argument is of type 'const char *' > 787 | int parse_xstats_list(char *in_str, struct rte_eth_xstat_name **xstats, > | ~~~~~~^~~~~~ > cc1: all warnings being treated as errors > [19/20] Compiling C object app/dpdk-testpmd.exe.p/test-pmd_cmdline.c.obj Many thanks, I'll send v3 shortly with fixes applied to avoid dup resolution, remove debug printout and make mingw build happy. Andrew.