ethdev: avoid usage of ULL for 64-bit unsigned constants
Checks
Commit Message
Use UINT64_C() macro instead.
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
The patch should be applied on top of ethdev namespace addition [1].
[1] https://patches.dpdk.org/project/dpdk/patch/20211022110314.470843-1-ferruh.yigit@intel.com/
lib/ethdev/rte_ethdev.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On 10/22/2021 12:20 PM, Andrew Rybchenko wrote:
> Use UINT64_C() macro instead.
>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.
@@ -687,23 +687,23 @@ struct rte_eth_rss_conf {
* It basically stands for the innermost encapsulation level RSS
* can be performed on according to PMD and device capabilities.
*/
-#define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (0ULL << 50)
+#define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (UINT64_C(0) << 50)
#define ETH_RSS_LEVEL_PMD_DEFAULT RTE_ETH_RSS_LEVEL_PMD_DEFAULT
/**
* level 1, requests RSS to be performed on the outermost packet
* encapsulation level.
*/
-#define RTE_ETH_RSS_LEVEL_OUTERMOST (1ULL << 50)
+#define RTE_ETH_RSS_LEVEL_OUTERMOST (UINT64_C(1) << 50)
#define ETH_RSS_LEVEL_OUTERMOST RTE_ETH_RSS_LEVEL_OUTERMOST
/**
* level 2, requests RSS to be performed on the specified inner packet
* encapsulation level, from outermost to innermost (lower to higher values).
*/
-#define RTE_ETH_RSS_LEVEL_INNERMOST (2ULL << 50)
+#define RTE_ETH_RSS_LEVEL_INNERMOST (UINT64_C(2) << 50)
#define ETH_RSS_LEVEL_INNERMOST RTE_ETH_RSS_LEVEL_INNERMOST
-#define RTE_ETH_RSS_LEVEL_MASK (3ULL << 50)
+#define RTE_ETH_RSS_LEVEL_MASK (UINT64_C(3) << 50)
#define ETH_RSS_LEVEL_MASK RTE_ETH_RSS_LEVEL_MASK
#define RTE_ETH_RSS_LEVEL(rss_hf) ((rss_hf & RTE_ETH_RSS_LEVEL_MASK) >> 50)