On Thu,  4 Jun 2026 06:48:37 +0300
Denis Sergeev <[email protected]> wrote:

> The IPv4 parsing helper used by pktgen and pktchkr read each octet with
> "%u", which accepts values above 255 from the configuration file and
> encodes them into unintended device register values.
> 
> Replace the hand-rolled parser in both modules with inet_pton(), which
> validates the dotted-quad format and the octet range, and matches the
> IPv4 parsing already used by other DPDK drivers. For valid input the
> returned value is byte-order identical to the previous helper, so the
> register contents are unchanged.
> 
> Fixes: 9c7188a68d7b ("net/ark: provide API for hardware modules pktchkr and 
> pktgen")
> Cc: [email protected]
> 
> Signed-off-by: Denis Sergeev <[email protected]>
> ---

I think you need an additional header.

FAILED: drivers/libtmp_rte_net_ark.a.p/net_ark_ark_pktchkr.c.o
cc -Idrivers/libtmp_rte_net_ark.a.p -Idrivers -I../drivers -Idrivers/net/ark 
-I../drivers/net/ark -Ilib/ethdev -I../lib/ethdev -Ilib/eal/common 
-I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include 
-I../lib/eal/include -Ilib/eal/freebsd/include -I../lib/eal/freebsd/include 
-Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal -I../lib/eal 
-Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics 
-I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/argparse 
-I../lib/argparse -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool 
-I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter -I../lib/meter 
-Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/bsd -Ilib/pci 
-I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Xclang 
-fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra 
-Werror -std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wcomma 
-Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declar
 ations -Wmissing-prototypes -Wnested-externs -Wold-style-definition 
-Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef 
-Wwrite-strings -Wno-missing-field-initializers -D_GNU_SOURCE -D__BSD_VISIBLE 
-fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API 
-Wno-format-truncation -Wno-address-of-packed-member 
-DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.ark -DRTE_ANNOTATE_LOCKS -Wthread-safety -MD 
-MQ drivers/libtmp_rte_net_ark.a.p/net_ark_ark_pktchkr.c.o -MF 
drivers/libtmp_rte_net_ark.a.p/net_ark_ark_pktchkr.c.o.d -o 
drivers/libtmp_rte_net_ark.a.p/net_ark_ark_pktchkr.c.o -c 
../drivers/net/ark/ark_pktchkr.c
../drivers/net/ark/ark_pktchkr.c:381:16: error: use of undeclared identifier 
'AF_INET'
381 |         if (inet_pton(AF_INET, ip_address, &addr) != 1)

Reply via email to