Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3b28fd7
)
avf: fix bit calculation function fls_u32
34/38134/2
author
Ting Xu
<ting.xu@intel.com>
Mon, 6 Feb 2023 03:01:10 +0000
(
03:01
+0000)
committer
Damjan Marion
<dmarion@0xa5.net>
Wed, 8 Feb 2023 10:08:16 +0000
(10:08 +0000)
In avf the function fls_u32 is used to calculate the power of 2.
Fix the expression of this function.
Type: fix
Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I27160de8588a5efb3f24306597a5a240deb3ab74
src/plugins/avf/avf_fdir_lib.c
patch
|
blob
|
history
diff --git
a/src/plugins/avf/avf_fdir_lib.c
b/src/plugins/avf/avf_fdir_lib.c
index
b16c09f
..
cf774a7
100644
(file)
--- a/
src/plugins/avf/avf_fdir_lib.c
+++ b/
src/plugins/avf/avf_fdir_lib.c
@@
-28,7
+28,7
@@
static inline int
fls_u32 (u32 x)
{
- return (x == 0) ? 0 :
32
- count_leading_zeros (x);
+ return (x == 0) ? 0 :
64
- count_leading_zeros (x);
}
static inline int