From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id F0D4BC38C for ; Wed, 17 Jun 2015 01:51:48 +0200 (CEST) Received: by pdjn11 with SMTP id n11so24807983pdj.0 for ; Tue, 16 Jun 2015 16:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1ID28gOPx6ZGFPKq/bx9Ay7hAYtG92r4+TIKzwhtvlw=; b=XZLWWFxIKCm6h27huE9Rux/3ad7bPIIW8f2b7xleJAAE7+WL4XBzdUcIVVQid4CPjk UKfwEUBChMp3fWNkaryg6QV8SnjomixMYXeMG95g/0bP9WSVVggXXQcocNkoCag9h0q8 lH+Fg9cjWHiwz1KY9HAcmWuLmUisf5gmIgBnihFLhDmaAx3IEiJi511etTdiPKOQ27y6 0af5+eqt88Ps3U9LVt5t61Sn6UeueB93N8zIIeK+l12vbD+s3ztN8t5yFXA5ZyHX3YAu sLbJ8mfR3uuSCqRYeDBv/KyNIWKqBv2foD1Bv5H3d7qAyx1LNKhEnjQtxZhVLMqwoTfV mUNA== X-Gm-Message-State: ALoCoQlDjVNsYZpcE2xWchtvkPzapWx9hXoYrzdTyZk2RsHCC6gLzc2am4Eof6owzu+t7+gg833+ X-Received: by 10.68.65.66 with SMTP id v2mr5179098pbs.9.1434498708404; Tue, 16 Jun 2015 16:51:48 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id pp6sm2501917pbb.79.2015.06.16.16.51.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jun 2015 16:51:47 -0700 (PDT) From: Stephen Hemminger To: ameen.rahman@qlogic.com Date: Tue, 16 Jun 2015 16:51:40 -0700 Message-Id: <1434498700-8522-5-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434498700-8522-1-git-send-email-stephen@networkplumber.org> References: <1434498700-8522-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org, Stephen Hemminger Subject: [dpdk-dev] [PATCH 4/4] bnx2x: enable PMD build 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, 16 Jun 2015 23:51:49 -0000 From: Stephen Hemminger This is build infrastructure changes for bnx2x driver. - enable BNX2X poll mode driver in default config. - add it to mk - put entry in MAINTAINERS Qlogic has discussed taking over as maintainer, if they want to they can submit a patch to change MAINTAINER file. Signed-off-by: Stephen Hemminger --- MAINTAINERS | 3 +++ config/common_linuxapp | 10 +++++++++ drivers/net/Makefile | 1 + drivers/net/bnx2x/Makefile | 28 +++++++++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 30 +++++++++++++++++++++++++ mk/rte.app.mk | 2 ++ 6 files changed, 74 insertions(+) create mode 100644 drivers/net/bnx2x/Makefile diff --git a/MAINTAINERS b/MAINTAINERS index 9362c19..3339cbc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -259,6 +259,9 @@ M: John McNamara F: drivers/net/pcap/ F: doc/guides/nics/pcap_ring.rst +Qlogic/Broadcom bnx2x +F: drivers/net/bnx2x/ + Ring PMD M: Bruce Richardson F: drivers/net/ring/ diff --git a/config/common_linuxapp b/config/common_linuxapp index 5deb55a..cf30529 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/drivers/net/Makefile b/drivers/net/Makefile index 1e6648a..c265f63 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -45,6 +45,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt +DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile new file mode 100644 index 0000000..0de5db9 --- /dev/null +++ b/drivers/net/bnx2x/Makefile @@ -0,0 +1,28 @@ +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_bnx2x.a + +CFLAGS += -O3 -g +CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DZLIB_CONST + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x_rxtx.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x_stats.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x_ethdev.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += ecore_sp.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += elink.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x_vfpf.c +SRCS-$(CONFIG_RTE_LIBRTE_BNX2X_DEBUG) += debug.c + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += lib/librte_eal lib/librte_ether lib/librte_hash +DEPDIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += lib/librte_mempool lib/librte_mbuf + +include $(RTE_SDK)/mk/rte.lib.mk 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 5d1b285..35429e9 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -144,6 +144,14 @@ #define RTE_PCI_DEV_ID_DECL_ENIC(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 @@ -164,6 +172,11 @@ #define PCI_VENDOR_ID_CISCO 0x1137 #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 @@ -565,6 +578,21 @@ RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_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. */ @@ -577,5 +605,7 @@ RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_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/mk/rte.app.mk b/mk/rte.app.mk index 1a2043a..00d2327 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -97,6 +97,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse endif _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs +_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lz _LDLIBS-y += --start-group @@ -132,6 +133,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null +_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) -- 2.1.4