Use BIT_ULL() instead of ICE_FLOW_HASH_FLD() which does the same bit shift
operation.

Signed-off-by: Bruce Allan <bruce.w.al...@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com>
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com>
---
 drivers/net/ice/base/ice_flow.h | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 0bb3efca0..2ec9bb022 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -14,24 +14,22 @@
 #define ICE_FLOW_VSI_INVAL             0xffff
 #define ICE_FLOW_FLD_OFF_INVAL         0xffff
 
-/* Use any of the type from flow field to generate a equivalent hash field */
-#define ICE_FLOW_HASH_FLD(t)   (1ULL << (t))
-
+/* Generate flow hash field from flow field type(s) */
 #define ICE_FLOW_HASH_IPV4     \
-       (ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_IPV4_SA) | \
-        ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_IPV4_DA))
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA))
 #define ICE_FLOW_HASH_IPV6     \
-       (ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_IPV6_SA) | \
-        ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_IPV6_DA))
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA))
 #define ICE_FLOW_HASH_TCP_PORT \
-       (ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT) | \
-        ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_TCP_DST_PORT))
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT))
 #define ICE_FLOW_HASH_UDP_PORT \
-       (ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT) | \
-        ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_UDP_DST_PORT))
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT))
 #define ICE_FLOW_HASH_SCTP_PORT        \
-       (ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT) | \
-        ICE_FLOW_HASH_FLD(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT))
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT))
 
 #define ICE_HASH_INVALID       0
 #define ICE_HASH_TCP_IPV4      (ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_TCP_PORT)
-- 
2.13.6

Reply via email to