[dpdk-dev,2/2] Fix compile issue in i686 platform

Message ID 1448501706-21718-2-git-send-email-michael.qiu@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Michael Qiu Nov. 26, 2015, 1:35 a.m. UTC
  In i686 platform, long is 32bit, so XXX_CYCLECOUNTER_MASK
need define as 'ULL'

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
 drivers/net/e1000/igb_ethdev.c   | 2 +-
 drivers/net/i40e/i40e_ethdev.c   | 2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Thomas Monjalon Nov. 26, 2015, 9:14 p.m. UTC | #1
2015-11-26 09:35, Michael Qiu:
> In i686 platform, long is 32bit, so XXX_CYCLECOUNTER_MASK
> need define as 'ULL'
> 
> Signed-off-by: Michael Qiu <michael.qiu@intel.com>

This patch is correct but the description is not exact:
I have no issue with my i686 compiler.
For future reference, please could you be more precise
about the reproduction environment? Is it related to a specific compiler?

We also need to add these lines:
Fixes: 9c857bf6be87 ("igb: support ieee1588 functions for device time")
Fixes: 1c4445e1f28e ("ixgbe: support ieee1588 functions for device time")
Fixes: f3a4e40eca0c ("i40e: support ieee1588 functions for device time")
  
Michael Qiu Nov. 27, 2015, 2:02 a.m. UTC | #2
On 2015/11/27 5:15, Thomas Monjalon wrote:
> 2015-11-26 09:35, Michael Qiu:
>> In i686 platform, long is 32bit, so XXX_CYCLECOUNTER_MASK
>> need define as 'ULL'
>>
>> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
> This patch is correct but the description is not exact:
> I have no issue with my i686 compiler.
> For future reference, please could you be more precise
> about the reproduction environment? Is it related to a specific compiler?

OK, I will be for careful about the compile and os next time.

> We also need to add these lines:
> Fixes: 9c857bf6be87 ("igb: support ieee1588 functions for device time")
> Fixes: 1c4445e1f28e ("ixgbe: support ieee1588 functions for device time")
> Fixes: f3a4e40eca0c ("i40e: support ieee1588 functions for device time")

So I will repost the patch set.

Thanks,
Michael
  

Patch

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 31452ae..518b6c9 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -78,7 +78,7 @@ 
 #define IGB_8_BIT_MASK   UINT8_MAX
 
 /* Additional timesync values. */
-#define E1000_CYCLECOUNTER_MASK      0xffffffffffffffff
+#define E1000_CYCLECOUNTER_MASK      0xffffffffffffffffULL
 #define E1000_ETQF_FILTER_1588       3
 #define IGB_82576_TSYNC_SHIFT        16
 #define E1000_INCPERIOD_82576        (1 << E1000_TIMINCA_16NS_SHIFT)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 13ab81a..5cd6e88 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -131,7 +131,7 @@ 
 #define I40E_PTP_1GB_INCVAL      0x2000000000ULL
 #define I40E_PRTTSYN_TSYNENA     0x80000000
 #define I40E_PRTTSYN_TSYNTYPE    0x0e000000
-#define I40E_CYCLECOUNTER_MASK   0xffffffffffffffff
+#define I40E_CYCLECOUNTER_MASK   0xffffffffffffffffULL
 
 #define I40E_MAX_PERCENT            100
 #define I40E_DEFAULT_DCB_APP_NUM    1
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 49f2410..808ac69 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -136,7 +136,7 @@ 
 #define IXGBE_INCVAL_SHIFT_82599 7
 #define IXGBE_INCPER_SHIFT_82599 24
 
-#define IXGBE_CYCLECOUNTER_MASK   0xffffffffffffffff
+#define IXGBE_CYCLECOUNTER_MASK   0xffffffffffffffffULL
 
 static int eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev);