From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <thomas.monjalon@6wind.com>, <dev@dpdk.org>
Cc: sony.chacko@qlogic.com
Subject: [dpdk-dev] [PATCH v3 07/11] bnx2x: Linux 32bit enablement
Date: Mon, 23 Nov 2015 23:44:32 -0800 [thread overview]
Message-ID: <1448351076-23161-8-git-send-email-rasesh.mody@qlogic.com> (raw)
In-Reply-To: <1448351076-23161-1-git-send-email-rasesh.mody@qlogic.com>
Compile tested.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
doc/guides/nics/bnx2x.rst | 8 ++++++++
drivers/net/bnx2x/bnx2x.h | 12 ++++++------
drivers/net/bnx2x/bnx2x_ethdev.c | 2 +-
drivers/net/bnx2x/bnx2x_rxtx.c | 11 +++++++----
drivers/net/bnx2x/bnx2x_vfpf.c | 4 ++--
5 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 5647a90..85ac1c3 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -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::
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 0362e4b..55ffbf1 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1457,22 +1457,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))
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 0117049..69df02e 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -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;
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index c25a898..0f8b9bd 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -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);
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index b3fcceb..765cc92 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -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
--
1.7.10.3
next prev parent reply other threads:[~2015-11-24 7:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 7:44 [dpdk-dev] [PATCH v3 00/11] bnx2x: Enhancement, fixes, licensing and doumentation Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 01/11] bnx2x: Update VF to support newer PF drivers Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 02/11] bnx2x: Fix x86_64-native-linuxapp-clang build error Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 03/11] bnx2x: Add periodic debug option Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 04/11] doc: Add BNX2X PMD documentationdoc: Add BNX2X PMD documentation Rasesh Mody
2015-11-24 14:16 ` Thomas Monjalon
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 05/11] bnx2x: Add LICENSE.bnx2x_pmd and update source files Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 06/11] bnx2x: FreeBSD enablement Rasesh Mody
2015-11-24 14:09 ` Thomas Monjalon
2015-11-24 7:44 ` Rasesh Mody [this message]
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 08/11] bnx2x: Handle zlib compatibility error Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 09/11] maintainers: Add maintainers for BNX2X PMD Rasesh Mody
2015-11-24 14:19 ` Thomas Monjalon
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 10/11] config: Enable BNX2X driver build by default Rasesh Mody
2015-11-24 14:25 ` Thomas Monjalon
2015-12-03 0:54 ` Rasesh Mody
2015-12-03 1:30 ` Thomas Monjalon
2015-12-03 2:54 ` Rasesh Mody
2015-12-08 21:45 ` Rasesh Mody
2015-11-24 7:44 ` [dpdk-dev] [PATCH v3 11/11] bnx2x: Add BNX2X PMD versioning Rasesh Mody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448351076-23161-8-git-send-email-rasesh.mody@qlogic.com \
--to=rasesh.mody@qlogic.com \
--cc=dev@dpdk.org \
--cc=sony.chacko@qlogic.com \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).