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 4CB88A04FD; Wed, 8 Jun 2022 14:21:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0899C42BE5; Wed, 8 Jun 2022 14:21:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 2EC9042BC2 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-634-gGxHXOZcP3mf4IhPPb73Jg-1; Wed, 08 Jun 2022 08:21:03 -0400 X-MC-Unique: gGxHXOZcP3mf4IhPPb73Jg-1 Received: by mail-lj1-f199.google.com with SMTP id u9-20020a2e91c9000000b0025569a92731so3712750ljg.3 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=X+rk3rqZeKB40oqXrtpmQq9QlVE7LuzYU2PqcckGZgpvNCSF/YIQW3iQvvOJVEWQTh FgnogqCMmEhcuyQi0wqhXfqFUv2jza+MgQblhgN9nmeJew6/n5Jy+K4zmE6PurTxtl+I SZxISTFsRzbcZveCiSYc8DKFUG+Zg8zMvhAPgZvjfwaxZ9xKs+EVOmV+We6oUwuXWNsV b8vbOESNajqoDdykcl9/tHLU/9dC7OBXGBohcg7E0ohliYAVRAiZKCugN6tyJxAU1DXF NytKRbTvVPCXXp0RXsHArHjfenU7/ZRhZDtvu6bNLxEG52w1KGcTgQn2f40GhxvRw3dt 9h5w== X-Gm-Message-State: AOAM533exiPLL2xLiBT4bUcZ2nhSoev8b/tIQAtkrUCkyrL2fOAuTIfi GmU9+q5cT21TqDgbQmdtUNFRztZHsp/akQE/VK+cJFVxLalvcyXix+R2mthAFncoOGPOb80OO+R GmHeqD5KuuAZYpHGrgm0= X-Received: by 2002:ac2:5201:0:b0:479:3923:9559 with SMTP id a1-20020ac25201000000b0047939239559mr11088031lfl.553.1654690862148; 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: 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 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