* [dpdk-dev] [PATCH] ethdev: avoid usage of ULL for 64-bit unsigned constants
@ 2021-10-22 11:20 Andrew Rybchenko
2021-10-22 17:24 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2021-10-22 11:20 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit; +Cc: dev
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(-)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 9847b412c5..0238c3f9bd 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -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)
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: avoid usage of ULL for 64-bit unsigned constants
2021-10-22 11:20 [dpdk-dev] [PATCH] ethdev: avoid usage of ULL for 64-bit unsigned constants Andrew Rybchenko
@ 2021-10-22 17:24 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-10-22 17:24 UTC (permalink / raw)
To: Andrew Rybchenko, Thomas Monjalon; +Cc: dev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-22 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 11:20 [dpdk-dev] [PATCH] ethdev: avoid usage of ULL for 64-bit unsigned constants Andrew Rybchenko
2021-10-22 17:24 ` Ferruh Yigit
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).