patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
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
Date: Fri, 10 Jun 2022 16:45:22 -0700	[thread overview]
Message-ID: <20220610164445.13c66bfb@hermes.local> (raw)
In-Reply-To: <08953a79d2cf9a91cc687a25b964c52cf6bb3e09.1654898425.git.rahul.lakkireddy@chelsio.com>

On Sat, 11 Jun 2022 03:36:43 +0530
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> 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=1 build flag with
> GCC 11.
> 
> ../app/test-flow-perf/main.c: In function ‘pretty_number’:
> ../app/test-flow-perf/main.c:1737:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
>          sprintf(p[i++], "%d", (int)n);
>                             ^
> ../app/test-flow-perf/main.c:1737:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4
>          sprintf(p[i++], "%d", (int)n);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Bugzilla ID: 1029
> Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support")
> Cc: stable@dpdk.org
> 
> Reported-by: Daxue Gao <daxuex.gao@intel.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>

There was a better alternative proposed here:

https://patchwork.dpdk.org/project/dpdk/patch/20220518101657.1230416-12-david.marchand@redhat.com/

  reply	other threads:[~2022-06-11  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 22:06 Rahul Lakkireddy
2022-06-10 23:45 ` Stephen Hemminger [this message]
2022-06-13  9:55   ` Rahul Lakkireddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610164445.13c66bfb@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=daxuex.gao@intel.com \
    --cc=dev@dpdk.org \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=stable@dpdk.org \
    --cc=wisamm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).