bnx2x: fix 32-bit build
authorRasesh Mody <rasesh.mody@qlogic.com>
Fri, 11 Dec 2015 06:36:40 +0000 (22:36 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 13 Dec 2015 00:58:10 +0000 (01:58 +0100)
Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
doc/guides/nics/bnx2x.rst
drivers/net/bnx2x/bnx2x.h
drivers/net/bnx2x/bnx2x_ethdev.c
drivers/net/bnx2x/bnx2x_rxtx.c
drivers/net/bnx2x/bnx2x_vfpf.c
scripts/test-build.sh

index 5647a90..85ac1c3 100644 (file)
@@ -143,6 +143,14 @@ command::
    cd <DPDK-source-directory>
    make config T=i686-native-linuxapp-gcc install
 
+To compile BNX2X PMD for Linux i686 gcc target, run the following "make"
+command:
+
+.. code-block:: console
+
+   cd <DPDK-source-directory>
+   make config T=i686-native-linuxapp-gcc install
+
 To compile BNX2X PMD for FreeBSD x86_64 clang target, run the following "gmake"
 command::
 
index 32fab21..2abab0c 100644 (file)
@@ -1444,22 +1444,22 @@ void bnx2x_reg_write16(struct bnx2x_softc *sc, size_t offset, uint16_t val);
 void bnx2x_reg_write32(struct bnx2x_softc *sc, size_t offset, uint32_t val);
 #else
 #define bnx2x_reg_write8(sc, offset, val)\
-       *((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val
+       *((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val
 
 #define bnx2x_reg_write16(sc, offset, val)\
-       *((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val
+       *((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val
 
 #define bnx2x_reg_write32(sc, offset, val)\
-       *((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val
+       *((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val
 
 #define bnx2x_reg_read8(sc, offset)\
-       (*((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)))
+       (*((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)))
 
 #define bnx2x_reg_read16(sc, offset)\
-       (*((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)))
+       (*((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)))
 
 #define bnx2x_reg_read32(sc, offset)\
-       (*((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)))
+       (*((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)))
 #endif
 
 #define REG_ADDR(sc, offset) (((uint64_t)sc->bar[BAR0].base_addr) + (offset))
index 0117049..69df02e 100644 (file)
@@ -442,7 +442,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
        sc->bar[BAR0].base_addr = (void *)pci_dev->mem_resource[0].addr;
        if (is_vf)
                sc->bar[BAR1].base_addr = (void *)
-                       ((uint64_t)pci_dev->mem_resource[0].addr + PXP_VF_ADDR_DB_START);
+                       ((uintptr_t)pci_dev->mem_resource[0].addr + PXP_VF_ADDR_DB_START);
        else
                sc->bar[BAR1].base_addr = pci_dev->mem_resource[2].addr;
 
index 2d2b0db..52152e2 100644 (file)
@@ -110,8 +110,10 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
        PMD_INIT_LOG(DEBUG, "fp[%02d] req_bd=%u, thresh=%u, usable_bd=%lu, "
                       "total_bd=%lu, rx_pages=%u, cq_pages=%u",
-                      queue_idx, nb_desc, rxq->rx_free_thresh, USABLE_RX_BD(rxq),
-                      TOTAL_RX_BD(rxq), rxq->nb_rx_pages, rxq->nb_cq_pages);
+                      queue_idx, nb_desc, rxq->rx_free_thresh,
+                      (unsigned long)USABLE_RX_BD(rxq),
+                      (unsigned long)TOTAL_RX_BD(rxq), rxq->nb_rx_pages,
+                      rxq->nb_cq_pages);
 
        /* Allocate RX ring hardware descriptors */
        dma_size = rxq->nb_rx_desc * sizeof(struct eth_rx_bd);
@@ -291,8 +293,9 @@ bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
        PMD_INIT_LOG(DEBUG, "fp[%02d] req_bd=%u, thresh=%u, usable_bd=%lu, "
                     "total_bd=%lu, tx_pages=%u",
-                    queue_idx, nb_desc, txq->tx_free_thresh, USABLE_TX_BD(txq),
-                    TOTAL_TX_BD(txq), txq->nb_tx_pages);
+                    queue_idx, nb_desc, txq->tx_free_thresh,
+                    (unsigned long)USABLE_TX_BD(txq),
+                    (unsigned long)TOTAL_TX_BD(txq), txq->nb_tx_pages);
 
        /* Allocate TX ring hardware descriptors */
        tsize = txq->nb_tx_desc * sizeof(union eth_tx_bd_types);
index b3fcceb..765cc92 100644 (file)
@@ -66,8 +66,8 @@ bnx2x_check_bull(struct bnx2x_softc *sc)
 
 /* add tlv to a buffer */
 #define BNX2X_TLV_APPEND(_tlvs, _offset, _type, _length) \
-       ((struct vf_first_tlv *)((uint64_t)_tlvs + _offset))->type   = _type; \
-       ((struct vf_first_tlv *)((uint64_t)_tlvs + _offset))->length = _length
+       ((struct vf_first_tlv *)((unsigned long)_tlvs + _offset))->type   = _type; \
+       ((struct vf_first_tlv *)((unsigned long)_tlvs + _offset))->length = _length
 
 /* Initiliaze header of the first tlv and clear mailbox*/
 static void
index f2bf763..6e67c8f 100755 (executable)
@@ -98,7 +98,6 @@ config () # <directory> <target> <options>
                echo $2 | grep -q '^i686' || \
                sed -ri       's,(PMD_SZEDATA2=)n,\1y,' $1/.config
                test "$DPDK_DEP_ZLIB" != y || \
-               echo $2 | grep -q '^i686' || \
                sed -ri          's,(BNX2X_PMD=)n,\1y,' $1/.config
                sed -ri            's,(NFP_PMD=)n,\1y,' $1/.config
                test "$DPDK_DEP_PCAP" != y || \