Simple fix in rte_is_power_of_2 and RTE_MIN/RTE_MAX
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): EDD8E64855FBDA45ACDFE02112E795B70DC85350FD@HQ1-EXCH03.corp.brocade.com
A message that is not in the archive (sent off-list or not yet received): EDD8E64855FBDA45ACDFE02112E795B70DC85350FD-7bu+sH2UtuEjroPwUH3sq+N5nnCVAcvGQQ4Iyu8u01E@public.gmane.org
PATCH 1/1 Simple fix in rte_is_power_of_2 and RTE_MIN/RTE_MAX
Subject: [PATCH] Simple fix in rte_is_power_of_2 and RTE_MIN/RTE_MAX
Number 0 is not a power_of_2, fix it in rte_is_power_of_2 function. Avoid code which generates branching when calculating min and max.
Ravi Kerur (1):
Fix rte_is_power_of_2() function since it returns true for zero and
zero is not a power of 2. Avoid branching in RTE_MIN and
RTE_MAX when calculating minimum and maximum of two numbers.
lib/librte_eal/common/include/rte_common.h | 6 +++--- lib/librte_pmd_e1000/igb_pf.c | 4 ++-- lib/librte_pmd_ixgbe/ixgbe_pf.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
--
1.9.1