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 EDDDDA054F; Sat, 11 Jun 2022 02:02:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD91340222; Sat, 11 Jun 2022 02:02:55 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 543B840041 for ; Sat, 11 Jun 2022 02:02:54 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id c14so536347pgu.13 for ; Fri, 10 Jun 2022 17:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TLrGQOoZyHYtiZj7EnK61JFADdmpnnPr+VPZePVmR08=; b=bowvj5E8Im1n9hnPgYSE4F75Q8lN66R/BTjMK72fnlroEfdtLw4/jVlsDO55tKs+lE EUZWEmXb/ZLLAQUS8tjve29/wHEZwwGkIzv/Parwx0u5XjzAvbw+a+wJZ9N8GUtAgHTH hh0956OTLEGjrYiBTxsBo6ybToQAvQYCoPTAhpOHj8ysJREA21fwixuuVrgvHtYfUqgF 87w5pHuOipJYapqkTSHuLOcCa+qLbUZ7Ekx81G239I8ZO3f6aSgnu90/dSI3C0XAm83c cmsl/oKwnaWTf5hobzisTGLHnfrix+XCZ4p3k36+PVJjNH6YrPiRjohRy6rYPkt8eykk 4bWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TLrGQOoZyHYtiZj7EnK61JFADdmpnnPr+VPZePVmR08=; b=Cwzmur/fS9INiQH4O/R58/SkzoAO/cxeKq8tWQ5YSS1+D01+sg6glwMa8kMZVdinS6 eXblHUYVcQohyhrMEl5SPnnrnyPa6JwN5fG2cc/rpdDwTyU8/Oc0QSdgFHLe7z3YYsJj NsV71e7FMFTrmRINR6i5ZYwdPAG4NidpXJxl/kFpvI36LZITD1japLMsAsek88+oIvQJ fzGTLgKJizvLO34JdUHSfl1PSkP5u+03NedMkzCCJHvw4cqnImk4ugMRVGkoSzE26x2f vVhNRbrOMqVj1ZjYBcWTQw1hRfIER4HxO406B/31G1VIg6qAwPTxRKGX6/gWqdHiwR8h QCZA== X-Gm-Message-State: AOAM533JPgKUlP8MY+Iae00wC7rCWeUP/xAch5zMVL5ACMBVp7mI7qlb AS9fqt96XpMw4RpvTrjOX/whUytKMvMnbWcX X-Google-Smtp-Source: ABdhPJwWsGBTXYVTuDrc8K8pGdylNCnfF0vpJ9I/gG/5KPstVLCIz1lYlKFjE15jlWJIe/owmJkx+A== X-Received: by 2002:a62:7cd2:0:b0:51b:9ba6:a028 with SMTP id x201-20020a627cd2000000b0051b9ba6a028mr55262606pfc.24.1654905773559; Fri, 10 Jun 2022 17:02:53 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id jc17-20020a17090325d100b0015e8da1f9e8sm300838plb.77.2022.06.10.17.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 17:02:53 -0700 (PDT) Date: Fri, 10 Jun 2022 16:45:22 -0700 From: Stephen Hemminger To: Rahul Lakkireddy Cc: dev@dpdk.org, daxuex.gao@intel.com, wisamm@nvidia.com, stable@dpdk.org Subject: Re: [PATCH] app/flow-perf: fix logic to add comma every three digits Message-ID: <20220610164445.13c66bfb@hermes.local> In-Reply-To: <08953a79d2cf9a91cc687a25b964c52cf6bb3e09.1654898425.git.rahul.lakkireddy@chelsio.com> References: <08953a79d2cf9a91cc687a25b964c52cf6bb3e09.1654898425.git.rahul.lakkireddy@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Sat, 11 Jun 2022 03:36:43 +0530 Rahul Lakkireddy wrote: > Add comma after 1 in 1000 too, like 1,000. Also, since max uint64_t is > a 20 digit number, increase space in temporary array to hold 20 digits. > Fixes following warnings when using optimization=3D1 build flag with > GCC 11. >=20 > ../app/test-flow-perf/main.c: In function =E2=80=98pretty_number=E2=80=99: > ../app/test-flow-perf/main.c:1737:28: warning: =E2=80=98sprintf=E2=80=99 = may write a terminating nul past the end of the destination [-Wformat-overf= low=3D] > sprintf(p[i++], "%d", (int)n); > ^ > ../app/test-flow-perf/main.c:1737:9: note: =E2=80=98sprintf=E2=80=99 outp= ut between 2 and 5 bytes into a destination of size 4 > sprintf(p[i++], "%d", (int)n); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Bugzilla ID: 1029 > Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support") > Cc: stable@dpdk.org >=20 > Reported-by: Daxue Gao > Signed-off-by: Rahul Lakkireddy There was a better alternative proposed here: https://patchwork.dpdk.org/project/dpdk/patch/20220518101657.1230416-12-dav= id.marchand@redhat.com/