DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0
@ 2015-10-08 16:53 Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 1/6] bnx2x: FreeBSD enablement Rasesh Mody
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:53 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Hi,

This patch set enables the BNX2X PMD and versions the driver at 1.0.0.

Thanks!
Rasesh

Harish Patil (1):
  config: Enable BNX2X driver build by default

Rasesh Mody (5):
  bnx2x: FreeBSD enablement
  bnx2x: Linux 32bit enablement
  maintainers: Add maintainers for BNX2X PMD
  doc: Update BNX2X PMD documentation
  bnx2x: Add BNX2X PMD versioning

 MAINTAINERS                      |    6 ++-
 config/common_bsdapp             |    5 +-
 config/common_linuxapp           |    4 +-
 doc/guides/nics/bnx2x.rst        |   20 +++++++
 drivers/net/bnx2x/bnx2x.c        |  110 +++++++++++++++++++++++++-------------
 drivers/net/bnx2x/bnx2x.h        |   35 +++++++++---
 drivers/net/bnx2x/bnx2x_ethdev.c |    2 +-
 drivers/net/bnx2x/bnx2x_rxtx.c   |   11 ++--
 drivers/net/bnx2x/bnx2x_vfpf.c   |    4 +-
 drivers/net/bnx2x/debug.c        |   32 +++++------
 drivers/net/bnx2x/ecore_sp.h     |    6 +++
 11 files changed, 165 insertions(+), 70 deletions(-)

-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 1/6] bnx2x: FreeBSD enablement
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 2/6] bnx2x: Linux 32bit enablement Rasesh Mody
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 config/common_bsdapp         |    1 +
 drivers/net/bnx2x/bnx2x.c    |    9 +++++++++
 drivers/net/bnx2x/bnx2x.h    |   23 +++++++++++++++++++++++
 drivers/net/bnx2x/ecore_sp.h |    6 ++++++
 4 files changed, 39 insertions(+)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index b37dcf4..d73725b 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -222,6 +222,7 @@ CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n
+CONFIG_RTE_LIBRTE_BNX2X_REG_ACCESS=n
 
 #
 # Compile burst-oriented Chelsio Terminator 10GbE/40GbE (CXGBE) PMD
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 1fa2492..c005a7a 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -9505,13 +9505,22 @@ static int bnx2x_pci_get_caps(struct bnx2x_softc *sc)
 		return -ENOMEM;
 	}
 
+#ifndef __FreeBSD__
 	pci_read(sc, PCI_STATUS, &status, 2);
 	if (!(status & PCI_STATUS_CAP_LIST)) {
+#else
+	pci_read(sc, PCIR_STATUS, &status, 2);
+	if (!(status & PCIM_STATUS_CAPPRESENT)) {
+#endif
 		PMD_DRV_LOG(NOTICE, "PCIe capability reading failed");
 		return -1;
 	}
 
+#ifndef __FreeBSD__
 	pci_read(sc, PCI_CAPABILITY_LIST, &pci_cap.next, 1);
+#else
+	pci_read(sc, PCIR_CAP_PTR, &pci_cap.next, 1);
+#endif
 	while (pci_cap.next) {
 		cap->addr = pci_cap.next & ~3;
 		pci_read(sc, pci_cap.next & ~3, &pci_cap, 2);
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index ca3a4d7..724ae64 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -16,6 +16,12 @@
 #ifndef __BNX2X_H__
 #define __BNX2X_H__
 
+#ifdef __FreeBSD__
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN    _BIG_ENDIAN
+#define __BYTE_ORDER    _BYTE_ORDER
+#endif
+
 #include "bnx2x_ethdev.h"
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -47,6 +53,7 @@
 
 #include "elink.h"
 
+#ifndef __FreeBSD__
 #include <linux/pci_regs.h>
 
 #define PCIY_PMG                       PCI_CAP_ID_PM
@@ -68,11 +75,15 @@
 #define PCIM_PSTAT_PMEENABLE           PCI_PM_CTRL_PME_ENABLE
 #define PCIR_MSIX_CTRL                 PCI_MSIX_FLAGS
 #define PCIM_MSIXCTRL_TABLE_SIZE       PCI_MSIX_FLAGS_QSIZE
+#else
+#include <dev/pci/pcireg.h>
+#endif
 
 #define IFM_10G_CX4                    20 /* 10GBase CX4 copper */
 #define IFM_10G_TWINAX                 22 /* 10GBase Twinax copper */
 #define IFM_10G_T                      26 /* 10GBase-T - RJ45 */
 
+#ifndef __FreeBSD__
 #define PCIR_EXPRESS_DEVICE_STA        PCI_EXP_TYPE_RC_EC
 #define PCIM_EXP_STA_TRANSACTION_PND   PCI_EXP_DEVSTA_TRPND
 #define PCIR_EXPRESS_LINK_STA          PCI_EXP_LNKSTA
@@ -81,6 +92,16 @@
 #define PCIR_EXPRESS_DEVICE_CTL        PCI_EXP_DEVCTL
 #define PCIM_EXP_CTL_MAX_PAYLOAD       PCI_EXP_DEVCTL_PAYLOAD
 #define PCIM_EXP_CTL_MAX_READ_REQUEST  PCI_EXP_DEVCTL_READRQ
+#else
+#define PCIR_EXPRESS_DEVICE_STA	PCIER_DEVICE_STA
+#define PCIM_EXP_STA_TRANSACTION_PND   PCIEM_STA_TRANSACTION_PND
+#define PCIR_EXPRESS_LINK_STA          PCIER_LINK_STA
+#define PCIM_LINK_STA_WIDTH            PCIEM_LINK_STA_WIDTH
+#define PCIM_LINK_STA_SPEED            PCIEM_LINK_STA_SPEED
+#define PCIR_EXPRESS_DEVICE_CTL        PCIER_DEVICE_CTL
+#define PCIM_EXP_CTL_MAX_PAYLOAD       PCIEM_CTL_MAX_PAYLOAD
+#define PCIM_EXP_CTL_MAX_READ_REQUEST  PCIEM_CTL_MAX_READ_REQUEST
+#endif
 
 #ifndef ARRAY_SIZE
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
@@ -148,6 +169,7 @@ struct bnx2x_device_type {
 #endif
 #define MCLBYTES                              (1 << MCLSHIFT)
 
+#if !defined(MJUMPAGESIZE)
 #if BNX2X_PAGE_SIZE < 2048
 #define MJUMPAGESIZE    MCLBYTES
 #elif BNX2X_PAGE_SIZE <= 8192
@@ -155,6 +177,7 @@ struct bnx2x_device_type {
 #else
 #define MJUMPAGESIZE    (8 * 1024)
 #endif
+#endif
 #define MJUM9BYTES      (9 * 1024)
 #define MJUM16BYTES     (16 * 1024)
 
diff --git a/drivers/net/bnx2x/ecore_sp.h b/drivers/net/bnx2x/ecore_sp.h
index 8e65584..a0b7b75 100644
--- a/drivers/net/bnx2x/ecore_sp.h
+++ b/drivers/net/bnx2x/ecore_sp.h
@@ -16,6 +16,12 @@
 #ifndef ECORE_SP_H
 #define ECORE_SP_H
 
+#ifdef __FreeBSD__
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN    _BIG_ENDIAN
+#define __BYTE_ORDER    _BYTE_ORDER
+#endif
+
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #ifndef LITTLE_ENDIAN
 #define LITTLE_ENDIAN
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 2/6] bnx2x: Linux 32bit enablement
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 1/6] bnx2x: FreeBSD enablement Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 3/6] maintainers: Add maintainers for BNX2X PMD Rasesh Mody
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Compile tested.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 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 ++--
 drivers/net/bnx2x/debug.c        |   32 ++++++++++++++++----------------
 5 files changed, 32 insertions(+), 29 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 724ae64..bfe4c43 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 a7608ef..5994791 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -439,7 +439,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
diff --git a/drivers/net/bnx2x/debug.c b/drivers/net/bnx2x/debug.c
index ca59f55..656d9ca 100644
--- a/drivers/net/bnx2x/debug.c
+++ b/drivers/net/bnx2x/debug.c
@@ -23,8 +23,8 @@
 void
 bnx2x_reg_write8(struct bnx2x_softc *sc, size_t offset, uint8_t val)
 {
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%02x", offset, val);
-	*((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val;
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%02x", (unsigned long)offset, val);
+	*((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val;
 }
 
 void
@@ -32,11 +32,11 @@ bnx2x_reg_write16(struct bnx2x_softc *sc, size_t offset, uint16_t val)
 {
 	if ((offset % 2) != 0) {
 		PMD_DRV_LOG(NOTICE, "Unaligned 16-bit write to 0x%08lx",
-			    offset);
+			    (unsigned long)offset);
 	}
 
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%04x", offset, val);
-	*((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val;
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%04x", (unsigned long)offset, val);
+	*((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val;
 }
 
 void
@@ -44,11 +44,11 @@ bnx2x_reg_write32(struct bnx2x_softc *sc, size_t offset, uint32_t val)
 {
 	if ((offset % 4) != 0) {
 		PMD_DRV_LOG(NOTICE, "Unaligned 32-bit write to 0x%08lx",
-			    offset);
+			    (unsigned long)offset);
 	}
 
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", offset, val);
-	*((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val;
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", (unsigned long)offset, val);
+	*((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val;
 }
 
 uint8_t
@@ -56,8 +56,8 @@ bnx2x_reg_read8(struct bnx2x_softc *sc, size_t offset)
 {
 	uint8_t val;
 
-	val = (uint8_t)(*((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)));
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%02x", offset, val);
+	val = (uint8_t)(*((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)));
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%02x", (unsigned long)offset, val);
 
 	return (val);
 }
@@ -69,11 +69,11 @@ bnx2x_reg_read16(struct bnx2x_softc *sc, size_t offset)
 
 	if ((offset % 2) != 0) {
 		PMD_DRV_LOG(NOTICE, "Unaligned 16-bit read from 0x%08lx",
-			    offset);
+			    (unsigned long)offset);
 	}
 
-	val = (uint16_t)(*((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)));
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", offset, val);
+	val = (uint16_t)(*((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)));
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", (unsigned long)offset, val);
 
 	return (val);
 }
@@ -85,12 +85,12 @@ bnx2x_reg_read32(struct bnx2x_softc *sc, size_t offset)
 
 	if ((offset % 4) != 0) {
 		PMD_DRV_LOG(NOTICE, "Unaligned 32-bit read from 0x%08lx",
-			    offset);
+			    (unsigned long)offset);
 		return 0;
 	}
 
-	val = (uint32_t)(*((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)));
-	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", offset, val);
+	val = (uint32_t)(*((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)));
+	PMD_REG_ACCESS_LOG(DEBUG, "offset=0x%08lx val=0x%08x", (unsigned long)offset, val);
 
 	return (val);
 }
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 3/6] maintainers: Add maintainers for BNX2X PMD
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 1/6] bnx2x: FreeBSD enablement Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 2/6] bnx2x: Linux 32bit enablement Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default Rasesh Mody
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Add maintainers for BNX2X PMD.
Add file path to BNX2X PMD guide.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 MAINTAINERS |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 080a8e8..23309f8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -276,8 +276,12 @@ M: John McNamara <john.mcnamara@intel.com>
 F: drivers/net/pcap/
 F: doc/guides/nics/pcap_ring.rst
 
-QLogic/Broadcom bnx2x
+QLogic bnx2x
+M: Sony Chacko <sony.chacko@qlogic.com>
+M: Harish Patil <harish.patil@qlogic.com>
+M: Rasesh Mody <rasesh.mody@qlogic.com>
 F: drivers/net/bnx2x/
+F: doc/guides/nics/bnx2x.rst
 
 Ring PMD
 M: Bruce Richardson <bruce.richardson@intel.com>
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
                   ` (2 preceding siblings ...)
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 3/6] maintainers: Add maintainers for BNX2X PMD Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  2015-10-20 16:18   ` Thomas Monjalon
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation Rasesh Mody
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 6/6] bnx2x: Add BNX2X PMD versioning Rasesh Mody
  5 siblings, 1 reply; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

From: Harish Patil <harish.patil@qlogic.com>

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 config/common_bsdapp   |    4 ++--
 config/common_linuxapp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index d73725b..ca371da 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -214,9 +214,9 @@ CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1
 
 #
-# Compile burst-oriented Broadcom PMD driver
+# Compile burst-oriented QLogic BNX2X PMD
 #
-CONFIG_RTE_LIBRTE_BNX2X_PMD=n
+CONFIG_RTE_LIBRTE_BNX2X_PMD=y
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 013fa0d..027b269 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -212,9 +212,9 @@ CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1
 
 #
-# Compile burst-oriented Broadcom PMD driver
+# Compile burst-oriented QLogic BNX2X PMD
 #
-CONFIG_RTE_LIBRTE_BNX2X_PMD=n
+CONFIG_RTE_LIBRTE_BNX2X_PMD=y
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
                   ` (3 preceding siblings ...)
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  2015-10-20 16:19   ` Thomas Monjalon
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 6/6] bnx2x: Add BNX2X PMD versioning Rasesh Mody
  5 siblings, 1 reply; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 doc/guides/nics/bnx2x.rst |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 613a2b7..d3912ed 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -86,6 +86,10 @@ Prerequisites
   `QLogic Driver Download Center <http://driverdownloads.qlogic.com>`
   to get the required firmware.
 
+- This driver relies on external zlib library for unzipping the firmware image.
+  The zlib library is not part of DPDK and must be installed separately. The
+  minimum version of zlib library required is v1.2.5.2.
+
 Pre-Installation Configuration
 ------------------------------
 
@@ -141,6 +145,14 @@ command:
    cd <DPDK-source-directory>
    make config T=x86_64-native-linuxapp-clang 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:
 
@@ -149,6 +161,14 @@ command:
    cd <DPDK-source-directory>
    gmake config T=x86_64-native-bsdapp-clang install
 
+To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
+command:
+
+.. code-block:: console
+
+   cd <DPDK-source-directory>
+   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc48 CC=gcc48
+
 Linux
 -----
 
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-dev] [PATCH 6/6] bnx2x: Add BNX2X PMD versioning
  2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
                   ` (4 preceding siblings ...)
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation Rasesh Mody
@ 2015-10-08 16:54 ` Rasesh Mody
  5 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-08 16:54 UTC (permalink / raw)
  To: dev; +Cc: sony.chacko

Add BNX2X PMD version, print it as part of adapter info.
Adjusted print adapter info output formatting.

This patch versions BNX2X PMD at 1.0.0.

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
 drivers/net/bnx2x/bnx2x.c |  101 +++++++++++++++++++++++++++++----------------
 1 file changed, 65 insertions(+), 36 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index c005a7a..65dcaa5 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -21,6 +21,7 @@
 #include "ecore_init.h"
 #include "ecore_init_ops.h"
 
+#include "rte_version.h"
 #include "rte_pci_dev_ids.h"
 
 #include <sys/types.h>
@@ -28,6 +29,26 @@
 #include <fcntl.h>
 #include <zlib.h>
 
+#define BNX2X_PMD_VER_PREFIX "BNX2X PMD"
+#define BNX2X_PMD_VERSION_MAJOR 1
+#define BNX2X_PMD_VERSION_MINOR 0
+#define BNX2X_PMD_VERSION_PATCH 0
+
+static inline const char *
+bnx2x_pmd_version(void)
+{
+	static char version[32];
+
+	snprintf(version, sizeof(version), "%s %s_%d.%d.%d",
+			BNX2X_PMD_VER_PREFIX,
+			BNX2X_DRIVER_VERSION,
+			BNX2X_PMD_VERSION_MAJOR,
+			BNX2X_PMD_VERSION_MINOR,
+			BNX2X_PMD_VERSION_PATCH);
+
+	return version;
+}
+
 static z_stream zlib_stream;
 
 #define EVL_VLID_MASK 0x0FFF
@@ -11726,87 +11747,95 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
 
 	PMD_INIT_LOG(DEBUG, "\n\n===================================\n");
 	/* Hardware chip info. */
-	PMD_INIT_LOG(DEBUG, "%10s : %#08x\n", "ASIC", sc->devinfo.chip_id);
-	PMD_INIT_LOG(DEBUG, "%10s : %c%d\n", "Rev", (CHIP_REV(sc) >> 12) + 'A',
+	PMD_INIT_LOG(DEBUG, "%12s : %#08x", "ASIC", sc->devinfo.chip_id);
+	PMD_INIT_LOG(DEBUG, "%12s : %c%d", "Rev", (CHIP_REV(sc) >> 12) + 'A',
 		     (CHIP_METAL(sc) >> 4));
 
 	/* Bus info. */
-	PMD_INIT_LOG(DEBUG, "%10s : %d, ", "Bus PCIe", sc->devinfo.pcie_link_width);
+	PMD_INIT_LOG(DEBUG, "%12s : %d, ", "Bus PCIe", sc->devinfo.pcie_link_width);
 	switch (sc->devinfo.pcie_link_speed) {
 	case 1:
-		PMD_INIT_LOG(DEBUG, "2.5 Gbps\n");
+		PMD_INIT_LOG(DEBUG, "%23s", "2.5 Gbps");
 		break;
 	case 2:
-		PMD_INIT_LOG(DEBUG, "5 Gbps\n");
+		PMD_INIT_LOG(DEBUG, "%21s", "5 Gbps");
 		break;
 	case 4:
-		PMD_INIT_LOG(DEBUG, "8 Gbps\n");
+		PMD_INIT_LOG(DEBUG, "%21s", "8 Gbps");
 		break;
 	default:
-		PMD_INIT_LOG(DEBUG, "Unknown link speed\n");
+		PMD_INIT_LOG(DEBUG, "%33s", "Unknown link speed");
 	}
 
 	/* Device features. */
-	PMD_INIT_LOG(DEBUG, "%10s : ", "Flags");
+	PMD_INIT_LOG(DEBUG, "%12s : ", "Flags");
 
 	/* Miscellaneous flags. */
 	if (sc->devinfo.pcie_cap_flags & BNX2X_MSI_CAPABLE_FLAG) {
-		PMD_INIT_LOG(DEBUG, "MSI");
+		PMD_INIT_LOG(DEBUG, "%18s", "MSI");
 		i++;
 	}
 
 	if (sc->devinfo.pcie_cap_flags & BNX2X_MSIX_CAPABLE_FLAG) {
 		if (i > 0)
 			PMD_INIT_LOG(DEBUG, "|");
-		PMD_INIT_LOG(DEBUG, "MSI-X");
+		PMD_INIT_LOG(DEBUG, "%20s", "MSI-X");
 		i++;
 	}
 
-	PMD_INIT_LOG(DEBUG, "\n");
-
 	if (IS_PF(sc)) {
-		PMD_INIT_LOG(DEBUG, "\n%10s : ", "Queues");
+		PMD_INIT_LOG(DEBUG, "%12s : ", "Queues");
 		switch (sc->sp->rss_rdata.rss_mode) {
 		case ETH_RSS_MODE_DISABLED:
-			PMD_INIT_LOG(DEBUG, "None\n");
+			PMD_INIT_LOG(DEBUG, "%19s", "None");
 			break;
 		case ETH_RSS_MODE_REGULAR:
-			PMD_INIT_LOG(DEBUG, "RSS : %d\n", sc->num_queues);
+			PMD_INIT_LOG(DEBUG, "%18s : %d", "RSS", sc->num_queues);
 			break;
 		default:
-			PMD_INIT_LOG(DEBUG, "Unknown\n");
+			PMD_INIT_LOG(DEBUG, "%22s", "Unknown");
 			break;
 		}
 	}
 
+	/* RTE and Driver versions */
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "DPDK",
+		     rte_version());
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "Driver",
+		     bnx2x_pmd_version());
+
 	/* Firmware versions and device features. */
-	PMD_INIT_LOG(DEBUG, "%10s : %d.%d.%d\n%10s : %s\n",
+	PMD_INIT_LOG(DEBUG, "%12s : %d.%d.%d",
 		     "Firmware",
 		     BNX2X_5710_FW_MAJOR_VERSION,
 		     BNX2X_5710_FW_MINOR_VERSION,
-		     BNX2X_5710_FW_REVISION_VERSION,
+		     BNX2X_5710_FW_REVISION_VERSION);
+	PMD_INIT_LOG(DEBUG, "%12s : %s",
 		     "Bootcode", sc->devinfo.bc_ver_str);
 
-	PMD_INIT_LOG(DEBUG, "===================================\n");
-	PMD_INIT_LOG(DEBUG, "%10s : %u\n", "Bnx2x Func", sc->pcie_func);
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "Bnx2x Flags", get_bnx2x_flags(sc->flags));
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "DMAE Is",
+	PMD_INIT_LOG(DEBUG, "\n\n===================================\n");
+	PMD_INIT_LOG(DEBUG, "%12s : %u", "Bnx2x Func", sc->pcie_func);
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "Bnx2x Flags", get_bnx2x_flags(sc->flags));
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "DMAE Is",
 		     (sc->dmae_ready ? "Ready" : "Not Ready"));
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "OVLAN", (OVLAN(sc) ? "YES" : "NO"));
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "MF", (IS_MF(sc) ? "YES" : "NO"));
-	PMD_INIT_LOG(DEBUG, "%10s : %u\n", "MTU", sc->mtu);
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "PHY Type", get_ext_phy_type(ext_phy_type));
-	PMD_INIT_LOG(DEBUG, "%10s : ", "MAC Addr");
-	for (i = 0; i < 6; i++)
-		PMD_INIT_LOG(DEBUG, "%x%s", sc->link_params.mac_addr[i],
-			     i < 5 ? ":" : "\n");
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "RX Mode", get_rx_mode(sc->rx_mode));
-	PMD_INIT_LOG(DEBUG, "%10s : %s\n", "State", get_state(sc->state));
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "OVLAN", (OVLAN(sc) ? "YES" : "NO"));
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "MF", (IS_MF(sc) ? "YES" : "NO"));
+	PMD_INIT_LOG(DEBUG, "%12s : %u", "MTU", sc->mtu);
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "PHY Type", get_ext_phy_type(ext_phy_type));
+	PMD_INIT_LOG(DEBUG, "%12s : %x:%x:%x:%x:%x:%x", "MAC Addr",
+			sc->link_params.mac_addr[0],
+			sc->link_params.mac_addr[1],
+			sc->link_params.mac_addr[2],
+			sc->link_params.mac_addr[3],
+			sc->link_params.mac_addr[4],
+			sc->link_params.mac_addr[5]);
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "RX Mode", get_rx_mode(sc->rx_mode));
+	PMD_INIT_LOG(DEBUG, "%12s : %s", "State", get_state(sc->state));
 	if (sc->recovery_state)
-		PMD_INIT_LOG(DEBUG, "%10s : %s\n", "Recovery",
+		PMD_INIT_LOG(DEBUG, "%12s : %s", "Recovery",
 			     get_recovery_state(sc->recovery_state));
-	PMD_INIT_LOG(DEBUG, "%10s : CQ = %lx,  EQ = %lx\n", "SPQ Left",
+	PMD_INIT_LOG(DEBUG, "%12s : CQ = %lx,  EQ = %lx", "SPQ Left",
 		     sc->cq_spq_left, sc->eq_spq_left);
-	PMD_INIT_LOG(DEBUG, "%10s : %x\n", "Switch", sc->link_params.switch_cfg);
-	PMD_INIT_LOG(DEBUG, "===================================\n\n");
+	PMD_INIT_LOG(DEBUG, "%12s : %x", "Switch", sc->link_params.switch_cfg);
+	PMD_INIT_LOG(DEBUG, "\n\n===================================\n");
 }
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default Rasesh Mody
@ 2015-10-20 16:18   ` Thomas Monjalon
  2015-10-22  0:40     ` Rasesh Mody
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2015-10-20 16:18 UTC (permalink / raw)
  To: Harish Patil; +Cc: dev, sony.chacko

2015-10-08 09:54, Rasesh Mody:
> From: Harish Patil <harish.patil@qlogic.com>
> 
> Signed-off-by: Harish Patil <harish.patil@qlogic.com>
> Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>

You cannot enable bnx2x without gracefully handle miss of zlib header.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation
  2015-10-08 16:54 ` [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation Rasesh Mody
@ 2015-10-20 16:19   ` Thomas Monjalon
  2015-10-22  0:39     ` Rasesh Mody
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2015-10-20 16:19 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dev, sony.chacko

This patch can be avoided by updating the documentation with each
code change atomically.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation
  2015-10-20 16:19   ` Thomas Monjalon
@ 2015-10-22  0:39     ` Rasesh Mody
  0 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-22  0:39 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Sony Chacko

> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 20, 2015 9:20 AM
>
> This patch can be avoided by updating the documentation with each code
> change atomically.

Agreed, will take care in next submission.

________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default
  2015-10-20 16:18   ` Thomas Monjalon
@ 2015-10-22  0:40     ` Rasesh Mody
  0 siblings, 0 replies; 11+ messages in thread
From: Rasesh Mody @ 2015-10-22  0:40 UTC (permalink / raw)
  To: Thomas Monjalon, Harish Patil; +Cc: dev, Sony Chacko

> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 20, 2015 9:18 AM
>
> 2015-10-08 09:54, Rasesh Mody:
> > From: Harish Patil <harish.patil@qlogic.com>
> >
> > Signed-off-by: Harish Patil <harish.patil@qlogic.com>
> > Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
>
> You cannot enable bnx2x without gracefully handle miss of zlib header.

Ok, will resubmit this.
Thanks!
Rasesh


________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-22  0:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08 16:53 [dpdk-dev] [PATCH 0/6] bnx2x: Enable BNX2X PMD versioned at 1.0.0 Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 1/6] bnx2x: FreeBSD enablement Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 2/6] bnx2x: Linux 32bit enablement Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 3/6] maintainers: Add maintainers for BNX2X PMD Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 4/6] config: Enable BNX2X driver build by default Rasesh Mody
2015-10-20 16:18   ` Thomas Monjalon
2015-10-22  0:40     ` Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 5/6] doc: Update BNX2X PMD documentation Rasesh Mody
2015-10-20 16:19   ` Thomas Monjalon
2015-10-22  0:39     ` Rasesh Mody
2015-10-08 16:54 ` [dpdk-dev] [PATCH 6/6] bnx2x: Add BNX2X PMD versioning Rasesh Mody

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).