From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 286CDA046B for ; Fri, 23 Aug 2019 15:53:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0914C1C115; Fri, 23 Aug 2019 15:50:24 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 09E771BFCF for ; Fri, 23 Aug 2019 15:49:43 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B13FCEBD9DF671256DDD; Fri, 23 Aug 2019 21:49:41 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 23 Aug 2019 21:49:31 +0800 From: "Wei Hu (Xavier)" To: CC: , , , Date: Fri, 23 Aug 2019 21:47:11 +0800 Message-ID: <1566568031-45991-23-git-send-email-xavier.huwei@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566568031-45991-1-git-send-email-xavier.huwei@huawei.com> References: <1566568031-45991-1-git-send-email-xavier.huwei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 22/22] net/hns3: add hns3 build files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch add build related files for hns3 PMD driver. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Min Hu (Connor) Signed-off-by: Chunsong Feng Signed-off-by: Hao Chen Signed-off-by: Huisong Li --- MAINTAINERS | 7 ++++ config/common_armv8a_linux | 5 +++ config/common_base | 5 +++ config/defconfig_arm64-armv8a-linuxapp-clang | 2 + doc/guides/nics/features/hns3.ini | 38 +++++++++++++++++++ doc/guides/nics/hns3.rst | 55 ++++++++++++++++++++++++++++ drivers/net/Makefile | 1 + drivers/net/hns3/Makefile | 43 ++++++++++++++++++++++ drivers/net/hns3/meson.build | 19 ++++++++++ drivers/net/hns3/rte_pmd_hns3_version.map | 3 ++ drivers/net/meson.build | 1 + mk/rte.app.mk | 1 + 12 files changed, 180 insertions(+) create mode 100644 doc/guides/nics/features/hns3.ini create mode 100644 doc/guides/nics/hns3.rst create mode 100644 drivers/net/hns3/Makefile create mode 100644 drivers/net/hns3/meson.build create mode 100644 drivers/net/hns3/rte_pmd_hns3_version.map diff --git a/MAINTAINERS b/MAINTAINERS index 4100260..1794923 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -616,6 +616,13 @@ F: drivers/net/hinic/ F: doc/guides/nics/hinic.rst F: doc/guides/nics/features/hinic.ini +Hisilicon hns3 +M: Wei Hu (Xavier) +M: Min Hu (Connor) +F: drivers/net/hns3/ +F: doc/guides/nics/hns3.rst +F: doc/guides/nics/features/hns3.ini + Intel e1000 M: Wenzhuo Lu T: git://dpdk.org/next/dpdk-next-net-intel diff --git a/config/common_armv8a_linux b/config/common_armv8a_linux index 481712e..bf455c5 100644 --- a/config/common_armv8a_linux +++ b/config/common_armv8a_linux @@ -37,3 +37,8 @@ CONFIG_RTE_LIBRTE_AVP_PMD=n CONFIG_RTE_LIBRTE_PMD_IOAT_RAWDEV=n CONFIG_RTE_SCHED_VECTOR=n + +# +# Hisilicon HNS3 PMD driver +# +CONFIG_RTE_LIBRTE_HNS3_PMD=y diff --git a/config/common_base b/config/common_base index 8ef75c2..71a2c33 100644 --- a/config/common_base +++ b/config/common_base @@ -282,6 +282,11 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n CONFIG_RTE_LIBRTE_HINIC_PMD=n # +# Compile burst-oriented HNS3 PMD driver +# +CONFIG_RTE_LIBRTE_HNS3_PMD=n + +# # Compile burst-oriented IXGBE PMD driver # CONFIG_RTE_LIBRTE_IXGBE_PMD=y diff --git a/config/defconfig_arm64-armv8a-linuxapp-clang b/config/defconfig_arm64-armv8a-linuxapp-clang index d3b4dad..c73f5fb 100644 --- a/config/defconfig_arm64-armv8a-linuxapp-clang +++ b/config/defconfig_arm64-armv8a-linuxapp-clang @@ -6,3 +6,5 @@ CONFIG_RTE_TOOLCHAIN="clang" CONFIG_RTE_TOOLCHAIN_CLANG=y + +CONFIG_RTE_LIBRTE_HNS3_PMD=n diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini new file mode 100644 index 0000000..d38d35e --- /dev/null +++ b/doc/guides/nics/features/hns3.ini @@ -0,0 +1,38 @@ +; +; Supported features of the 'hns3' network poll mode driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Link status = Y +MTU update = Y +Jumbo frame = Y +Promiscuous mode = Y +Allmulticast mode = Y +Unicast MAC filter = Y +Multicast MAC filter = Y +RSS hash = Y +RSS key update = Y +RSS reta update = Y +DCB = Y +VLAN filter = Y +Flow director = Y +Flow control = Y +Flow API = Y +CRC offload = Y +VLAN offload = Y +L3 checksum offload = Y +L4 checksum offload = Y +Inner L3 checksum = Y +Inner L4 checksum = Y +Basic stats = Y +Extended stats = Y +Stats per queue = Y +Linux UIO = Y +Linux VFIO = Y +BSD nic_uio = N +x86-64 = N +ARMv8 = Y +ARMv7 = N +x86-32 = N +Power8 = N diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst new file mode 100644 index 0000000..c9d0253 --- /dev/null +++ b/doc/guides/nics/hns3.rst @@ -0,0 +1,55 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2018-2019 Hisilicon Limited. + +HNS3 Poll Mode Driver +=============================== + +The Hisilicon Network Subsystem is a long term evolution IP which is +supposed to be used in Hisilicon ICT SoCs such as Kunpeng 920. + +The HNS3 PMD (librte_pmd_hns3) provides poll mode driver support +for hns3(Hisilicon Network Subsystem 3) network engine. + +Features +-------- + +Features of the HNS3 PMD are: + +- Arch support: ARMv8. +- Multiple queues for TX and RX +- Receive Side Scaling (RSS) +- Packet type information +- Checksum offload +- Promiscuous mode +- Multicast mode +- Port hardware statistics +- Jumbo frames +- Link state information +- VLAN stripping +- NUMA support + +Prerequisites +------------- +- Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. + +Pre-Installation Configuration +------------------------------ + +Config File Options +~~~~~~~~~~~~~~~~~~~ + +The following options can be modified in the ``config`` file. +Please note that enabling debugging options may affect system performance. + +- ``CONFIG_RTE_LIBRTE_HNS3_PMD`` (default ``y``) + +Driver compilation and testing +------------------------------ + +Refer to the document :ref:`compiling and testing a PMD for a NIC ` +for details. + +Limitations or Known issues +--------------------------- +Build with clang is not supported yet. +Currently, only ARMv8 architecture is supported. \ No newline at end of file diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 5767fdf..1770d8b 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -30,6 +30,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic DIRS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += failsafe DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += hinic +DIRS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3 DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf DIRS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += ice diff --git a/drivers/net/hns3/Makefile b/drivers/net/hns3/Makefile new file mode 100644 index 0000000..a2e6502 --- /dev/null +++ b/drivers/net/hns3/Makefile @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018-2019 Hisilicon Limited. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_hns3.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API -fsigned-char + +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash +LDLIBS += -lrte_bus_pci + +EXPORT_MAP := rte_pmd_hns3_version.map + +LIBABIVER := 2 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_ethdev.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_ethdev_vf.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_cmd.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_mbx.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_rxtx.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_rss.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_fdir.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_intr.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_stats.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_regs.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_dcb.c +SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_mp.c + +# install this header file +SYMLINK-$(CONFIG_RTE_LIBRTE_HNS3_PMD)-include := hns3_ethdev.h + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build new file mode 100644 index 0000000..ad301a5 --- /dev/null +++ b/drivers/net/hns3/meson.build @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018-2019 Hisilicon Limited + +sources = files('hns3_cmd.c', + 'hns3_dcb.c', + 'hns3_intr.c', + 'hns3_ethdev.c', + 'hns3_ethdev_vf.c', + 'hns3_fdir.c', + 'hns3_flow.c', + 'hns3_mbx.c', + 'hns3_regs.c', + 'hns3_rss.c', + 'hns3_rxtx.c', + 'hns3_stats.c', + 'hns3_mp.c') +deps += ['hash'] + +cflags += '-DALLOW_EXPERIMENTAL_API' diff --git a/drivers/net/hns3/rte_pmd_hns3_version.map b/drivers/net/hns3/rte_pmd_hns3_version.map new file mode 100644 index 0000000..3aef967 --- /dev/null +++ b/drivers/net/hns3/rte_pmd_hns3_version.map @@ -0,0 +1,3 @@ +DPDK_19.08 { + local: *; +}; diff --git a/drivers/net/meson.build b/drivers/net/meson.build index 513f19b..eb1c6b6 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -18,6 +18,7 @@ drivers = ['af_packet', 'failsafe', 'fm10k', 'i40e', 'hinic', + 'hns3', 'iavf', 'ice', 'ifc', diff --git a/mk/rte.app.mk b/mk/rte.app.mk index ba5c39e..17b9916 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -172,6 +172,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += -lrte_pmd_enic _LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += -lrte_pmd_fm10k _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += -lrte_pmd_failsafe _LDLIBS-$(CONFIG_RTE_LIBRTE_HINIC_PMD) += -lrte_pmd_hinic +_LDLIBS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += -lrte_pmd_hns3 _LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += -lrte_pmd_i40e _LDLIBS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += -lrte_pmd_iavf _LDLIBS-$(CONFIG_RTE_LIBRTE_ICE_PMD) += -lrte_pmd_ice -- 2.7.4