From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Ali Alnubani <alialnu@nvidia.com>,
Aman Singh <aman.deep.singh@intel.com>,
Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
Raslan Darawsheh <rasland@nvidia.com>
Subject: Re: [PATCH] app/testpmd: fix build on signed comparison
Date: Mon, 22 Jul 2024 22:26:39 +0100 [thread overview]
Message-ID: <bb4299ac-42cb-4dc7-bd1d-1cdfed62849e@amd.com> (raw)
In-Reply-To: <DM4PR12MB516735962777CEA5C1A574CCDAA82@DM4PR12MB5167.namprd12.prod.outlook.com>
On 7/22/2024 8:21 PM, Ali Alnubani wrote:
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>> Sent: Monday, July 22, 2024 1:52 PM
>> To: Aman Singh <aman.deep.singh@intel.com>; Sivaprasad Tummala
>> <sivaprasad.tummala@amd.com>
>> Cc: dev@dpdk.org; stable@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
>> Subject: [PATCH] app/testpmd: fix build on signed comparison
>>
>> Build error:
>> .../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
>> .../app/test-pmd/config.c:5159:30:
>> error: comparison between signed and unsigned integer expressions
>> [-Werror=sign-compare]
>> if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
>> ^
>> All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
>> but the warning is related to the integer promotion rules of C:
>> 'nb_txq' -> uint16_t, promoted to 'int'
>> 'nb_fwd_ports' -> uint16_t, promoted to 'int'
>> (nb_txq * nb_fwd_ports) -> result 'int'
>> nb_fwd_lcores -> 'uint32_t'
>> Ends up comparing 'int' vs 'uint32_t'.
>>
>> Fixing by adding the casting back which was initially part of the patch.
>>
>> Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")
>> Cc: stable@dpdk.org
>>
>> Reported-by: Raslan Darawsheh <rasland@nvidia.com>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> ---
>> Cc: sivaprasad.tummala@amd.com
>> ---
>
> Hi Ferruh,
>
> I tested on openSUSE Leap 15.6 (gcc 7.5.0) with debug build type and can confirm it resolves the build failure.
>
> Tested-by: Ali Alnubani <alialnu@nvidia.com>
>
Thank you.
Applied to dpdk-next-net/main, thanks.
prev parent reply other threads:[~2024-07-22 21:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 10:52 Ferruh Yigit
2024-07-22 13:26 ` Ferruh Yigit
2024-07-22 16:11 ` Ferruh Yigit
2024-07-22 19:21 ` Ali Alnubani
2024-07-22 21:26 ` Ferruh Yigit [this message]
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=bb4299ac-42cb-4dc7-bd1d-1cdfed62849e@amd.com \
--to=ferruh.yigit@amd.com \
--cc=alialnu@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=rasland@nvidia.com \
--cc=sivaprasad.tummala@amd.com \
--cc=stable@dpdk.org \
/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).