On 5/7/2025 2:24 PM, Konstantin Ananyev wrote:
-----Original Message-----
From: Burakov, Anatoly <anatoly.bura...@intel.com>
Sent: Wednesday, May 7, 2025 12:07 PM
To: Konstantin Ananyev <konstantin.anan...@huawei.com>; dev@dpdk.org
Subject: Re: [PATCH v4 1/2] cmdline: add floating point support
On 5/7/2025 12:35 PM, Konstantin Ananyev wrote:
Add support for parsing floating point numbers in cmdline library, as well
as unit tests for the new functionality. The parser supports single and
double precision floats, and will understand decimal fractions as well as
scientific notation.
There are standard functions for that: strtod/strtof - can't we simply use them?
I can ask the same question of the entire existence of this part of the
library: there are strtoull-type functions that should be available to
all targets,
Probably due to historical reasons - a while ago DPDK was able to run on
bare-metal (not any more).
so if we're going to use them for floating point parsing,
we might as well remove the number parsing part of the library entirely.
Sounds like a good cleanup for me.
+1 for it.
Either way is fine by me.
--
Thanks,
Anatoly
There's a small number of differences between what DPDK can do and what
strtoull/strtod can do. For example strtoull doesn't support binary
while we do. Strtoull has a concept of "negative hex numbers" while we
consider them to be invalid. Still, seems to work now so I'll submit a
v5 with the rework.
--
Thanks,
Anatoly