* [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID
@ 2026-03-27 4:15 Aarnav JP
2026-03-27 4:15 ` [PATCH 2/2] examples/ptpclient: " Aarnav JP
2026-03-27 7:43 ` [PATCH 1/2] examples/packet_ordering: " David Marchand
0 siblings, 2 replies; 5+ messages in thread
From: Aarnav JP @ 2026-03-27 4:15 UTC (permalink / raw)
To: dev, Volodymyr Fialko, Sergio Gonzalez Monroy, Reshma Pattan,
Declan Doherty, Neil Horman
Cc: jerinj, ndabilpuram, rbhansali, Aarnav JP, stable
port_id is uint16_t, use PRIu16 instead of PRIu8 to fix
format specifier mismatch warning with GCC 15.
../examples/packet_ordering/main.c: In function 'main':
../examples/packet_ordering/main.c:740:46:
warning: format '%hhu' expects argument of type 'unsigned char',
but argument 3 has type 'uint16_t' [-Wformat=]
740 | rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu8"\n",
| ^
Fixes: 850f3733f840 ("examples/packet_ordering: new sample app")
Cc: stable@dpdk.org
Signed-off-by: Aarnav JP <ajp@marvell.com>
---
examples/packet_ordering/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 5ffdf72d71..748fe0826a 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -737,7 +737,7 @@ main(int argc, char **argv)
printf("Initializing port %u... done\n", port_id);
if (configure_eth_port(port_id) != 0)
- rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu8"\n",
+ rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu16"\n",
port_id);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] examples/ptpclient: fix format specifier for port ID
2026-03-27 4:15 [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID Aarnav JP
@ 2026-03-27 4:15 ` Aarnav JP
2026-03-27 8:01 ` David Marchand
2026-03-27 7:43 ` [PATCH 1/2] examples/packet_ordering: " David Marchand
1 sibling, 1 reply; 5+ messages in thread
From: Aarnav JP @ 2026-03-27 4:15 UTC (permalink / raw)
To: dev, Kirill Rybalchenko, Pablo de Lara, John McNamara,
Daniel Mrzyglod
Cc: jerinj, ndabilpuram, rbhansali, Aarnav JP, stable
portid is uint16_t, use PRIu16 instead of PRIu8 to fix
format specifier mismatch warning with GCC 15.
../examples/ptpclient/ptpclient.c: In function 'main':
../examples/ptpclient/ptpclient.c:797:30:
warning: format '%hhu' expects argument of type 'unsigned char',
but argument 3 has type 'uint16_t' [-Wformat=]
797 | "Cannot init port %"PRIu8 "\n",
| ^
Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Cc: stable@dpdk.org
Signed-off-by: Aarnav JP <ajp@marvell.com>
---
examples/ptpclient/ptpclient.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index c344e7db1e..1fec4af767 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -794,7 +794,7 @@ main(int argc, char *argv[])
ptp_enabled_port_nb++;
} else {
rte_exit(EXIT_FAILURE,
- "Cannot init port %"PRIu8 "\n",
+ "Cannot init port %"PRIu16 "\n",
portid);
}
} else
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] examples/ptpclient: fix format specifier for port ID
2026-03-27 4:15 ` [PATCH 2/2] examples/ptpclient: " Aarnav JP
@ 2026-03-27 8:01 ` David Marchand
2026-03-27 8:08 ` David Marchand
0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2026-03-27 8:01 UTC (permalink / raw)
To: Aarnav JP
Cc: dev, Kirill Rybalchenko, Pablo de Lara, John McNamara,
Daniel Mrzyglod, jerinj, ndabilpuram, rbhansali, stable
On Fri, 27 Mar 2026 at 05:16, Aarnav JP <ajp@marvell.com> wrote:
>
> portid is uint16_t, use PRIu16 instead of PRIu8 to fix
> format specifier mismatch warning with GCC 15.
>
> ../examples/ptpclient/ptpclient.c: In function 'main':
> ../examples/ptpclient/ptpclient.c:797:30:
> warning: format '%hhu' expects argument of type 'unsigned char',
> but argument 3 has type 'uint16_t' [-Wformat=]
> 797 | "Cannot init port %"PRIu8 "\n",
> | ^
>
> Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Same as previous comment, at the time this code was introduced,
port_id was a uint8_t.
This can be fixed when applying:
Fixes: 47523597ff6c ("examples: fix port id type")
> Cc: stable@dpdk.org
>
> Signed-off-by: Aarnav JP <ajp@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] examples/ptpclient: fix format specifier for port ID
2026-03-27 8:01 ` David Marchand
@ 2026-03-27 8:08 ` David Marchand
0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-03-27 8:08 UTC (permalink / raw)
To: Aarnav JP
Cc: dev, Kirill Rybalchenko, Pablo de Lara, John McNamara,
Daniel Mrzyglod, jerinj, ndabilpuram, rbhansali, stable
On Fri, 27 Mar 2026 at 09:01, David Marchand <david.marchand@redhat.com> wrote:
>
> On Fri, 27 Mar 2026 at 05:16, Aarnav JP <ajp@marvell.com> wrote:
> >
> > portid is uint16_t, use PRIu16 instead of PRIu8 to fix
> > format specifier mismatch warning with GCC 15.
> >
> > ../examples/ptpclient/ptpclient.c: In function 'main':
> > ../examples/ptpclient/ptpclient.c:797:30:
> > warning: format '%hhu' expects argument of type 'unsigned char',
> > but argument 3 has type 'uint16_t' [-Wformat=]
> > 797 | "Cannot init port %"PRIu8 "\n",
> > | ^
> >
> > Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
>
> Same as previous comment, at the time this code was introduced,
> port_id was a uint8_t.
>
> This can be fixed when applying:
> Fixes: 47523597ff6c ("examples: fix port id type")
>
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Aarnav JP <ajp@marvell.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
Series applied, thanks for the fixes.
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID
2026-03-27 4:15 [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID Aarnav JP
2026-03-27 4:15 ` [PATCH 2/2] examples/ptpclient: " Aarnav JP
@ 2026-03-27 7:43 ` David Marchand
1 sibling, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-03-27 7:43 UTC (permalink / raw)
To: Aarnav JP
Cc: dev, Volodymyr Fialko, Sergio Gonzalez Monroy, Reshma Pattan,
Declan Doherty, Neil Horman, jerinj, ndabilpuram, rbhansali,
stable
Hello,
On Fri, 27 Mar 2026 at 05:16, Aarnav JP <ajp@marvell.com> wrote:
>
> port_id is uint16_t, use PRIu16 instead of PRIu8 to fix
> format specifier mismatch warning with GCC 15.
>
> ../examples/packet_ordering/main.c: In function 'main':
> ../examples/packet_ordering/main.c:740:46:
> warning: format '%hhu' expects argument of type 'unsigned char',
> but argument 3 has type 'uint16_t' [-Wformat=]
> 740 | rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu8"\n",
> | ^
>
> Fixes: 850f3733f840 ("examples/packet_ordering: new sample app")
At the time this code was introduced, port_id was a uint8_t.
This can be fixed when applying:
Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Cc: stable@dpdk.org
>
> Signed-off-by: Aarnav JP <ajp@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-27 8:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 4:15 [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID Aarnav JP
2026-03-27 4:15 ` [PATCH 2/2] examples/ptpclient: " Aarnav JP
2026-03-27 8:01 ` David Marchand
2026-03-27 8:08 ` David Marchand
2026-03-27 7:43 ` [PATCH 1/2] examples/packet_ordering: " David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox