* [PATCH] app/dumpcap: replace use of __builtin_clzl
@ 2024-10-16 20:51 Stephen Hemminger
2024-10-30 10:24 ` David Marchand
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2024-10-16 20:51 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
DPDK applications should avoid direct use of compiler builtin.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index cb2a439f79..9ca578e27e 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -677,7 +677,7 @@ static struct rte_ring *create_ring(void)
/* Find next power of 2 >= size. */
size = ring_size;
- log2 = sizeof(size) * 8 - __builtin_clzl(size - 1);
+ log2 = sizeof(size) * 8 - rte_clz64(size - 1);
size = 1u << log2;
if (size != ring_size) {
--
2.45.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] app/dumpcap: replace use of __builtin_clzl
2024-10-16 20:51 [PATCH] app/dumpcap: replace use of __builtin_clzl Stephen Hemminger
@ 2024-10-30 10:24 ` David Marchand
0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2024-10-30 10:24 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Wed, Oct 16, 2024 at 10:52 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> DPDK applications should avoid direct use of compiler builtin.
>
> Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-30 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 20:51 [PATCH] app/dumpcap: replace use of __builtin_clzl Stephen Hemminger
2024-10-30 10:24 ` David Marchand
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).