* [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform
2015-11-26 1:35 [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Michael Qiu
@ 2015-11-26 1:35 ` Michael Qiu
2015-11-26 21:14 ` Thomas Monjalon
2015-11-26 14:29 ` [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Thomas Monjalon
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Michael Qiu @ 2015-11-26 1:35 UTC (permalink / raw)
To: dev
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(-)
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);
--
1.9.3
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform
2015-11-26 1:35 ` [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform Michael Qiu
@ 2015-11-26 21:14 ` Thomas Monjalon
2015-11-27 2:02 ` Qiu, Michael
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-26 21:14 UTC (permalink / raw)
To: Michael Qiu; +Cc: dev
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")
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform
2015-11-26 21:14 ` Thomas Monjalon
@ 2015-11-27 2:02 ` Qiu, Michael
0 siblings, 0 replies; 12+ messages in thread
From: Qiu, Michael @ 2015-11-27 2:02 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue
2015-11-26 1:35 [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Michael Qiu
2015-11-26 1:35 ` [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform Michael Qiu
@ 2015-11-26 14:29 ` Thomas Monjalon
2015-11-26 21:01 ` Thomas Monjalon
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-26 14:29 UTC (permalink / raw)
To: Michael Qiu; +Cc: dev
Hi Michael,
Thank you very much for working on compilation issues.
Please could you try to insert a "Fixes:" line in your logs?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue
2015-11-26 1:35 [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Michael Qiu
2015-11-26 1:35 ` [dpdk-dev] [PATCH 2/2] Fix compile issue in i686 platform Michael Qiu
2015-11-26 14:29 ` [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Thomas Monjalon
@ 2015-11-26 21:01 ` Thomas Monjalon
2015-11-27 1:16 ` Wan, Qun
2015-11-27 3:36 ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
4 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-26 21:01 UTC (permalink / raw)
To: Michael Qiu; +Cc: dev
2015-11-26 09:35, Michael Qiu:
> examples/distributor/main.c(338): error #167:
> argument of type "struct rte_mbuf *"
> is incompatible with parameter of type "const char *"
> _mm_prefetch(bufs[0], 0);
>
> The first param of _mm_prefetch should be "const char *" and
> need convert "struct rte_mbuf *" to "const void *".
[...]
> - _mm_prefetch(bufs[0], 0);
> - _mm_prefetch(bufs[1], 0);
> - _mm_prefetch(bufs[2], 0);
> + _mm_prefetch((const void *)bufs[0], 0);
> + _mm_prefetch((const void *)bufs[1], 0);
> + _mm_prefetch((const void *)bufs[2], 0);
With clang:
error: cast from 'const void *' to 'void *' drops const qualifier
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue
2015-11-26 1:35 [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Michael Qiu
` (2 preceding siblings ...)
2015-11-26 21:01 ` Thomas Monjalon
@ 2015-11-27 1:16 ` Wan, Qun
2015-11-27 3:36 ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
4 siblings, 0 replies; 12+ messages in thread
From: Wan, Qun @ 2015-11-27 1:16 UTC (permalink / raw)
To: Qiu, Michael, dev
Acked and verified.
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michael Qiu
Sent: Thursday, November 26, 2015 9:35 AM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue
examples/distributor/main.c(338): error #167:
argument of type "struct rte_mbuf *"
is incompatible with parameter of type "const char *"
_mm_prefetch(bufs[0], 0);
The first param of _mm_prefetch should be "const char *" and need convert "struct rte_mbuf *" to "const void *".
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
examples/distributor/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 972bddb..a4d8e34 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
/* for traffic we receive, queue it up for transmit */
uint16_t i;
- _mm_prefetch(bufs[0], 0);
- _mm_prefetch(bufs[1], 0);
- _mm_prefetch(bufs[2], 0);
+ _mm_prefetch((const void *)bufs[0], 0);
+ _mm_prefetch((const void *)bufs[1], 0);
+ _mm_prefetch((const void *)bufs[2], 0);
for (i = 0; i < nb_rx; i++) {
struct output_buffer *outbuf;
uint8_t outp;
- _mm_prefetch(bufs[i + 3], 0);
+ _mm_prefetch((const void *)bufs[i + 3], 0);
/*
* workers should update in_port to hold the
* output port value
--
1.9.3
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue
2015-11-26 1:35 [dpdk-dev] [PATCH 1/2] examples/distributor: Fix compile issue Michael Qiu
` (3 preceding siblings ...)
2015-11-27 1:16 ` Wan, Qun
@ 2015-11-27 3:36 ` Michael Qiu
2015-11-27 3:36 ` [dpdk-dev] [PATCH 2/2 v2] Fix compile issue in i686 platform Michael Qiu
2015-11-27 12:21 ` [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue De Lara Guarch, Pablo
4 siblings, 2 replies; 12+ messages in thread
From: Michael Qiu @ 2015-11-27 3:36 UTC (permalink / raw)
To: dev
examples/distributor/main.c(338): error #167:
argument of type "struct rte_mbuf *"
is incompatible with parameter of type "const char *"
_mm_prefetch(bufs[0], 0);
The first param pass to _mm_prefetch is wrong,
need convert "struct rte_mbuf *" to "void *".
Fixes: 07db4a975094 ("examples/distributor: new sample app")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
v2 --> v1:
convert "const void *" to "void *" to avoid CLANG issue.
add "Fixes" line in commit log
examples/distributor/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 972bddb..a4d8e34 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
/* for traffic we receive, queue it up for transmit */
uint16_t i;
- _mm_prefetch(bufs[0], 0);
- _mm_prefetch(bufs[1], 0);
- _mm_prefetch(bufs[2], 0);
+ _mm_prefetch((void *)bufs[0], 0);
+ _mm_prefetch((void *)bufs[1], 0);
+ _mm_prefetch((void *)bufs[2], 0);
for (i = 0; i < nb_rx; i++) {
struct output_buffer *outbuf;
uint8_t outp;
- _mm_prefetch(bufs[i + 3], 0);
+ _mm_prefetch((void *)bufs[i + 3], 0);
/*
* workers should update in_port to hold the
* output port value
--
1.9.3
^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 2/2 v2] Fix compile issue in i686 platform
2015-11-27 3:36 ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
@ 2015-11-27 3:36 ` Michael Qiu
2015-11-27 9:10 ` Thomas Monjalon
2015-11-27 12:21 ` [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue De Lara Guarch, Pablo
1 sibling, 1 reply; 12+ messages in thread
From: Michael Qiu @ 2015-11-27 3:36 UTC (permalink / raw)
To: dev
In i686 platform, long is 32bit, so XXX_CYCLECOUNTER_MASK
need define as 'ULL'
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")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
---
v2 --> v1:
add "Fixes" line in commit log
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(-)
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);
--
1.9.3
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue
2015-11-27 3:36 ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
2015-11-27 3:36 ` [dpdk-dev] [PATCH 2/2 v2] Fix compile issue in i686 platform Michael Qiu
@ 2015-11-27 12:21 ` De Lara Guarch, Pablo
2015-11-27 20:49 ` Thomas Monjalon
1 sibling, 1 reply; 12+ messages in thread
From: De Lara Guarch, Pablo @ 2015-11-27 12:21 UTC (permalink / raw)
To: Qiu, Michael, dev
> -----Original Message-----
> From: Qiu, Michael
> Sent: Friday, November 27, 2015 3:36 AM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo; thomas.monjalon@6wind.com; Qiu, Michael
> Subject: [PATCH 1/2 v2] examples/distributor: Fix compile issue
>
> examples/distributor/main.c(338): error #167:
> argument of type "struct rte_mbuf *"
> is incompatible with parameter of type "const char *"
> _mm_prefetch(bufs[0], 0);
>
> The first param pass to _mm_prefetch is wrong,
> need convert "struct rte_mbuf *" to "void *".
>
> Fixes: 07db4a975094 ("examples/distributor: new sample app")
>
> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue
2015-11-27 12:21 ` [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue De Lara Guarch, Pablo
@ 2015-11-27 20:49 ` Thomas Monjalon
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2015-11-27 20:49 UTC (permalink / raw)
To: Qiu, Michael; +Cc: dev
> > examples/distributor/main.c(338): error #167:
> > argument of type "struct rte_mbuf *"
> > is incompatible with parameter of type "const char *"
> > _mm_prefetch(bufs[0], 0);
> >
> > The first param pass to _mm_prefetch is wrong,
> > need convert "struct rte_mbuf *" to "void *".
> >
> > Fixes: 07db4a975094 ("examples/distributor: new sample app")
> >
> > Signed-off-by: Michael Qiu <michael.qiu@intel.com>
>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
As described by Pablo, it is seen with ICC 2015.
Series applied, thanks
^ permalink raw reply [flat|nested] 12+ messages in thread