[v3,1/7] distributor: use abstracted bit count functions

Message ID 1699400300-22545-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series use abstracted bit count functions |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Tyler Retzlaff Nov. 7, 2023, 11:38 p.m. UTC
  Use rte_ctz32 or rte_ctz64 respectively instead of __builtin_ctzl
depending on the resultant type of the expression passed as an argument

Fixes: 18898c4d06f9 ("eal: use abstracted bit count functions")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/distributor/rte_distributor_single.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/distributor/rte_distributor_single.c b/lib/distributor/rte_distributor_single.c
index ad43c13..08144e5 100644
--- a/lib/distributor/rte_distributor_single.c
+++ b/lib/distributor/rte_distributor_single.c
@@ -252,7 +252,7 @@  struct rte_mbuf *
 
 			if (match) {
 				next_mb = NULL;
-				unsigned worker = __builtin_ctzl(match);
+				unsigned worker = rte_ctz64(match);
 				if (add_to_backlog(&d->backlog[worker],
 						next_value) < 0)
 					next_idx--;