[dpdk-dev,1/2] net/thunderx: fix build issues with 32bit target

Message ID 1489160345-21955-1-git-send-email-jerin.jacob@caviumnetworks.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Jerin Jacob March 10, 2017, 3:39 p.m. UTC
  Fixes: e438796617dc ("net/thunderx: add PMD skeleton")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_struct.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Ferruh Yigit March 15, 2017, 4:32 p.m. UTC | #1
On 3/10/2017 3:39 PM, Jerin Jacob wrote:
> Fixes: e438796617dc ("net/thunderx: add PMD skeleton")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Still getting build error with 32bit when debug enabled:

In file included from .../drivers/net/thunderx/base/../nicvf_logs.h:36:0,
                 from .../drivers/net/thunderx/base/nicvf_plat.h:40,
                 from .../drivers/net/thunderx/nicvf_rxtx.c:50:
.../drivers/net/thunderx/nicvf_rxtx.c: In function ‘nicvf_fill_rbdr’:
.../drivers/net/thunderx/base/nicvf_plat.h:74:50:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
 #define nicvf_addr_read(addr) rte_read64_relaxed((void *)(addr))
                                                  ^
.../drivers/net/thunderx/nicvf_rxtx.c:376:2:
note: in expansion of macro ‘NICVF_RX_ASSERT’
  NICVF_RX_ASSERT((unsigned int)to_fill <= (qlen_mask -
  ^~~~~~~~~~~~~~~
.../drivers/net/thunderx/nicvf_rxtx.c:377:4:
note: in expansion of macro ‘nicvf_addr_read’
   (nicvf_addr_read(rbdr->rbdr_status) & NICVF_RBDR_COUNT_MASK)));
    ^~~~~~~~~~~~~~~
  

Patch

diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h
index c900e12..0e4e1dd 100644
--- a/drivers/net/thunderx/nicvf_struct.h
+++ b/drivers/net/thunderx/nicvf_struct.h
@@ -58,8 +58,8 @@  struct nicvf_txq {
 	union sq_entry_t *desc;
 	nicvf_phys_addr_t phys;
 	struct rte_mbuf **txbuffs;
-	uint64_t sq_head;
-	uint64_t sq_door;
+	uintptr_t sq_head;
+	uintptr_t sq_door;
 	struct rte_mempool *pool;
 	struct nicvf *nic;
 	void (*pool_free)(struct nicvf_txq *sq);
@@ -74,8 +74,8 @@  struct nicvf_txq {
 
 struct nicvf_rxq {
 	uint64_t mbuf_phys_off;
-	uint64_t cq_status;
-	uint64_t cq_door;
+	uintptr_t cq_status;
+	uintptr_t cq_door;
 	nicvf_phys_addr_t phys;
 	union cq_entry_t *desc;
 	struct nicvf_rbdr *shared_rbdr;