diff mbox

[dpdk-dev,4/4] bnx2x: enable BNX2X poll mode driver

Message ID 1431041135-6289-5-git-send-email-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Stephen Hemminger May 7, 2015, 11:25 p.m. UTC
This is build infrastructure changes for bnx2x driver.
 - enable BNX2X poll mode driver in default config.
 - add it to mk
 - put entry in MAINTAINERS

Note: I intentionally did not list myself as maintainer of this
driver.  There is no official support for this driver.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 MAINTAINERS                                     |  3 +++
 config/common_linuxapp                          | 10 +++++++++
 lib/Makefile                                    |  1 +
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 30 +++++++++++++++++++++++++
 lib/librte_pmd_bnx2x/rte_pmd_bnx2x_version.map  |  4 ++++
 mk/rte.app.mk                                   |  8 +++++++
 6 files changed, 56 insertions(+)
 create mode 100644 lib/librte_pmd_bnx2x/rte_pmd_bnx2x_version.map
diff mbox

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index f53b87e..f9340c6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -258,6 +258,9 @@  M: John McNamara <john.mcnamara@intel.com>
 F: lib/librte_pmd_pcap/
 F: doc/guides/nics/pcap_ring.rst
 
+Qlogic/Broadcom bnx2x
+F: lib/librte_pmd_bnx2x/
+
 Ring PMD
 M: Bruce Richardson <bruce.richardson@intel.com>
 F: lib/librte_pmd_ring/
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 0078dc9..ef991f2 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -214,6 +214,16 @@  CONFIG_RTE_LIBRTE_ENIC_PMD=y
 CONFIG_RTE_LIBRTE_ENIC_DEBUG=n
 
 #
+# Compile burst-oriented Broadcom PMD driver
+#
+CONFIG_RTE_LIBRTE_BNX2X_PMD=y
+CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n
+CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n
+CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n
+CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
+
+#
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
diff --git a/lib/Makefile b/lib/Makefile
index d94355d..c89092f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -47,6 +47,7 @@  DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e
 DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += librte_pmd_fm10k
 DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4
 DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += librte_pmd_enic
+DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += librte_pmd_bnx2x
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 21d2eed..be4c35d 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -140,6 +140,14 @@ 
 #define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
 #endif
 
+#ifndef RTE_PCI_DEV_ID_DECL_BNX2X
+#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF
+#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
@@ -155,6 +163,11 @@ 
 #define PCI_VENDOR_ID_VMWARE 0x15AD
 #endif
 
+#ifndef PCI_VENDOR_ID_BROADCOM
+/** Vendor ID used by Broadcom devices */
+#define PCI_VENDOR_ID_BROADCOM 0x14E4
+#endif
+
 /******************** Physical EM devices from e1000_hw.h ********************/
 
 #define E1000_DEV_ID_82542                    0x1000
@@ -548,6 +561,21 @@  RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3)
 
 RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF)
 
+/****************** Qualcom devices ******************/
+
+/* Broadcom/Qualcom BNX2X */
+#define BNX2X_DEV_ID_57711	0x164F
+#define BNX2X_DEV_ID_57810	0x168E
+#define BNX2X_DEV_ID_57810_MF	0x16AE
+#define BNX2X_DEV_ID_57810_VF	0x16AF
+
+RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711)
+RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810)
+#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT
+RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_MF)
+#endif
+RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF)
+
 /*
  * Undef all RTE_PCI_DEV_ID_DECL_* here.
  */
@@ -560,5 +588,7 @@  RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF)
 #undef RTE_PCI_DEV_ID_DECL_I40EVF
 #undef RTE_PCI_DEV_ID_DECL_VIRTIO
 #undef RTE_PCI_DEV_ID_DECL_VMXNET3
+#undef RTE_PCI_DEV_ID_DECL_BNX2X
+#undef RTE_PCI_DEV_ID_DECL_BNX2XVF
 #undef RTE_PCI_DEV_ID_DECL_FM10K
 #undef RTE_PCI_DEV_ID_DECL_FM10KVF
diff --git a/lib/librte_pmd_bnx2x/rte_pmd_bnx2x_version.map b/lib/librte_pmd_bnx2x/rte_pmd_bnx2x_version.map
new file mode 100644
index 0000000..ef35398
--- /dev/null
+++ b/lib/librte_pmd_bnx2x/rte_pmd_bnx2x_version.map
@@ -0,0 +1,4 @@ 
+DPDK_2.0 {
+
+	local: *;
+};
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 62a76ae..3bc0f5d 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -151,6 +151,10 @@  ifeq ($(CONFIG_RTE_LIBRTE_MLX4_PMD),y)
 LDLIBS += -libverbs
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_BNX2X_PMD),y)
+LDLIBS += -lz
+endif
+
 LDLIBS += --start-group
 
 ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n)
@@ -219,6 +223,10 @@  ifeq ($(CONFIG_RTE_LIBRTE_ENIC_PMD),y)
 LDLIBS += -lrte_pmd_enic
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_BNX2X_PMD),y)
+LDLIBS += -lrte_pmd_bnx2x
+endif
+
 ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
 LDLIBS += -lrte_pmd_i40e
 endif