* [PATCH] Simple fix in rte_is_power_of_2 and RTE_MIN/RTE_MAX [not found] ` <EDD8E64855FBDA45ACDFE02112E795B70DC85350FD-7bu+sH2UtuEjroPwUH3sq+N5nnCVAcvGQQ4Iyu8u01E@public.gmane.org> @ 2014-12-10 16:45 ` r k 0 siblings, 0 replies; only message in thread From: r k @ 2014-12-10 16:45 UTC (permalink / raw) To: dev-VfR2kkLFssw@public.gmane.org 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 ^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-10 16:45 UTC | newest] Thread overview: (only message) (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1418229688-4667-1-git-send-email-rkerur@gmail.com> [not found] ` <EDD8E64855FBDA45ACDFE02112E795B70DC85350FD@HQ1-EXCH03.corp.brocade.com> [not found] ` <EDD8E64855FBDA45ACDFE02112E795B70DC85350FD-7bu+sH2UtuEjroPwUH3sq+N5nnCVAcvGQQ4Iyu8u01E@public.gmane.org> 2014-12-10 16:45 ` [PATCH] Simple fix in rte_is_power_of_2 and RTE_MIN/RTE_MAX r k
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).