From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-0016ce01.pphosted.com (mx0a-0016ce01.pphosted.com [67.231.148.157]) by dpdk.org (Postfix) with ESMTP id 274D391B6 for ; Tue, 24 Nov 2015 08:45:16 +0100 (CET) Received: from pps.filterd (m0045602.ppops.net [127.0.0.1]) by mx0a-0016ce01.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id tAO7jCGk008410; Mon, 23 Nov 2015 23:45:12 -0800 Received: from avcashub1.qlogic.com (avcashub3.qlogic.com [198.70.193.117]) by mx0a-0016ce01.pphosted.com with ESMTP id 1yceg1g9n4-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 23 Nov 2015 23:45:12 -0800 Received: from avluser05.qlc.com (10.1.113.115) by qlc.com (10.1.4.192) with Microsoft SMTP Server id 14.3.235.1; Mon, 23 Nov 2015 23:45:11 -0800 Received: (from rmody@localhost) by avluser05.qlc.com (8.14.4/8.14.4/Submit) id tAO7jBSN023584; Mon, 23 Nov 2015 23:45:11 -0800 X-Authentication-Warning: avluser05.qlc.com: rmody set sender to rasesh.mody@qlogic.com using -f From: Rasesh Mody To: , Date: Mon, 23 Nov 2015 23:44:32 -0800 Message-ID: <1448351076-23161-8-git-send-email-rasesh.mody@qlogic.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1448351076-23161-1-git-send-email-rasesh.mody@qlogic.com> References: <1448351076-23161-1-git-send-email-rasesh.mody@qlogic.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7994 signatures=670662 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1511240145 Cc: sony.chacko@qlogic.com Subject: [dpdk-dev] [PATCH v3 07/11] bnx2x: Linux 32bit enablement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 07:45:16 -0000 Compile tested. Signed-off-by: Rasesh Mody --- 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 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 + 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