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 E4872A04FD for ; Wed, 8 Jun 2022 14:21:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE95342BB9; Wed, 8 Jun 2022 14:21:06 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2D3B942BB9 for ; Wed, 8 Jun 2022 14:21:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654690864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d128jyAe4OWfzt2KpBX5MGs01HJw3OFGk0CbAMNxht4=; b=jNVydyMjrwUFdBHmapyFAkmXvAUP7eFF9fFjN7K/Qc9gSY5kKfIFHdPIMZYzA61T1wjRKL 2ua5btQZE7cfTzfzboMd9Jxos1PKYSmumcQPDKrbWNcNUEV58fRUMmNFVNcuz4Q7OpBnL9 XFHYiEnmQb+YFGLIOPN6Uzr/QVS02MA= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-wbaolInJO_CW6jGDMgKt6w-1; Wed, 08 Jun 2022 08:21:03 -0400 X-MC-Unique: wbaolInJO_CW6jGDMgKt6w-1 Received: by mail-lj1-f199.google.com with SMTP id f10-20020a2e9e8a000000b00250925fec6aso3695081ljk.20 for ; Wed, 08 Jun 2022 05:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=d128jyAe4OWfzt2KpBX5MGs01HJw3OFGk0CbAMNxht4=; b=QkUIJ+u/z/2Vi7w5XJgYfnOPrl2SmwBLt6T4M86Vq+pz83FNKPbQEeAW/AVlWXwk9e 4BYk9SwhdUbd1MLvHV6UESKgqaoBreKIxGGxZ/ltZLS8pfyV5qNQE7MaCG7p3/36a3rl vbGoVnWarS9XY8cGkTviFKzs/SX1yde61h2jRjLl0xmaupf/wKzlrRhHFem4JMuozYWp oZ5jbHQKI3oOTHIRu3tcBIHC8CcdCkF7C9xKS/IYtffmHUNmwSWD0tMdwFBLqGxsBV5A LEIltCXHgClEIOcrm0WjRgd3Ov37rwJZqicu9mEMOc8aHE++fRm3CNdmRSqlvveVMSv6 ZzBA== X-Gm-Message-State: AOAM532I36UlmnJeGK8gWwzQr/GDNhEiOklwHVvmwu33f2x4YfTvIN5G veAaXx+hJV6CZtmEfhhdBGsphGFZkH1cTWJOwEVYJZvJCfwQ16SkFmYiV3KtuHjgRdPlMXQzHWI ewMfJX/Ha1XHWks+AQoWza8Y= X-Received: by 2002:ac2:5201:0:b0:479:3923:9559 with SMTP id a1-20020ac25201000000b0047939239559mr11088032lfl.553.1654690862149; Wed, 08 Jun 2022 05:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7/soTYFTzyTrYT2Dpa2sEA85+7oGlPPD3z1pA3i6PrBve4LkhMMgurVj1/PM/7tejrReDdsYcCRaiMIQpiGs= X-Received: by 2002:ac2:5201:0:b0:479:3923:9559 with SMTP id a1-20020ac25201000000b0047939239559mr11087980lfl.553.1654690860974; Wed, 08 Jun 2022 05:21:00 -0700 (PDT) MIME-Version: 1.0 References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-12-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Wed, 8 Jun 2022 14:20:49 +0200 Message-ID: Subject: Re: [PATCH 11/12] app/flow-perf: fix build with GCC 12 To: Wisam Monther Cc: "dev@dpdk.org" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "ferruh.yigit@xilinx.com" , "stable@dpdk.org" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Wed, Jun 8, 2022 at 11:03 AM Wisam Monther wrote: > > Hi David, > > > -----Original Message----- > > From: David Marchand > > Sent: Wednesday, May 18, 2022 1:17 PM > > To: dev@dpdk.org > > Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) ; > > ferruh.yigit@xilinx.com; stable@dpdk.org; Wisam Monther > > > > Subject: [PATCH 11/12] app/flow-perf: fix build with GCC 12 > > > > GCC 12 raises the following warning: > > > > ../app/test-flow-perf/main.c: In function =E2=80=98start_forwarding=E2= =80=99: > > ../app/test-flow-perf/main.c:1737:28: error: =E2=80=98sprintf=E2=80=99 = may write a > > terminating nul past the end of the destination > > [-Werror=3Dformat-overflow=3D] > > 1737 | sprintf(p[i++], "%d", (int)n); > > | ^ > > In function =E2=80=98pretty_number=E2=80=99, > > inlined from =E2=80=98packet_per_second_stats=E2=80=99 at > > ../app/test-flow-perf/main.c:1792:4, > > inlined from =E2=80=98start_forwarding=E2=80=99 at > > ../app/test-flow-perf/main.c:1831:3: > > [...] > > > > We can simplify this code and rely on libc integer formatting via this = system > > locales. > > > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > > --- > > I've tested the patch and reviewed it, it's working fine, so thank you fo= r that. > One comment > The initial value of 0 is 000 > > Example: > CMD: ./dpdk-test-flow-perf -n 4 -a -- ingress --group=3D1 --ether -= -queue --rules-count=3D200000 --enable-fwd > core tx tx drops rx > ------ ---------------- ---------------- ---------------- > 1 000 000 000 > > Can you handle this to be single 0 instead of not needed leading zeros? Hum, I don't remember why I added this precision... This should be just a matter of changing the format from %'16.3s to %'16s, can you confirm? --=20 David Marchand