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 AD74BA0553 for ; Sat, 11 Jun 2022 02:02:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A459D40E5A; Sat, 11 Jun 2022 02:02:56 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 5584740222 for ; Sat, 11 Jun 2022 02:02:54 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id h192so575366pgc.4 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=4SbAx7iMk2uAQi5NZOeiYLkbA+adTLUXbwxRAebRMCcPuESEmPAtdUIUkKVNj4PoVE bm8zTXJBqP1IwrBSW5XEkPfJIEARkeWD6w7Y6pik7poRSwRh1v6yU/Z9SCCUZw/+HjZT Bz3F2R1vvkzs0LEdjrQYLmmNJ+CWc0w0DHRW2UNOif9O0L06y6wjkL+iPcWlul908oG8 JUB0qROaoYKkEnxbA169a1yb3CNRrIT+EX8y7GsUr1CKqB2/mZV9OCH98tZJTedfXd6P +EWY/QrkL6iHQ440ll/eHQNeAXfYQacFmvmLt0dI2VgJKzipgP9Pm9Ene0O1UYOkaKXn rikw== X-Gm-Message-State: AOAM533af00iagqYtCw00eb2ZfnjNpRWSY+W1mie1A3QbiS2f74fv3En cWOaW2fC0fbgbC3QIPXtARM9Bw== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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/