DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dev@dpdk.org>
Cc: <linuxarm@huawei.com>, <xavier_huwei@163.com>,
	<xavier.huwei@tom.com>, <forest.zhouchang@huawei.com>
Subject: [dpdk-dev] [PATCH v3 01/22] net/hns3: add build and doc infrastructure
Date: Thu, 26 Sep 2019 22:01:47 +0800	[thread overview]
Message-ID: <1569506528-60464-2-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1569506528-60464-1-git-send-email-xavier.huwei@huawei.com>

This patch adds build and doc infrastructure for hns3 PMD driver.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
v2 -> v3:
	1. Resolve the conflict problem when performing git operation
	   based on the current repository.

v1 -> v2:
	1. Address Jerin Jacob Kollanukkaran's comments as follows:
	   https://www.mail-archive.com/dev@dpdk.org/msg140958.html
	2. Address Stephen Hemminger's comments as follows:
	   https://www.mail-archive.com/dev@dpdk.org/msg141495.html
	   https://www.mail-archive.com/dev@dpdk.org/msg141496.html
	3. Address Ferruh Yigit's comments as follows:
	   https://www.mail-archive.com/dev@dpdk.org/msg141544.html
	   https://www.mail-archive.com/dev@dpdk.org/msg141530.html
	   https://www.mail-archive.com/dev@dpdk.org/msg141531.html
---
 MAINTAINERS                                  |  8 ++++
 config/common_base                           |  5 +++
 config/common_linux                          |  5 +++
 config/defconfig_arm-armv7a-linuxapp-gcc     |  1 +
 config/defconfig_i686-native-linuxapp-gcc    |  5 +++
 config/defconfig_i686-native-linuxapp-icc    |  5 +++
 config/defconfig_ppc_64-power8-linuxapp-gcc  |  1 +
 config/defconfig_x86_64-native-linuxapp-icc  |  5 +++
 config/defconfig_x86_x32-native-linuxapp-gcc |  5 +++
 doc/guides/nics/features/hns3.ini            |  9 +++++
 doc/guides/nics/hns3.rst                     | 60 ++++++++++++++++++++++++++++
 doc/guides/nics/index.rst                    |  1 +
 doc/guides/rel_notes/release_19_11.rst       |  6 +++
 drivers/net/Makefile                         |  1 +
 drivers/net/hns3/Makefile                    | 23 +++++++++++
 drivers/net/hns3/hns3_ethdev.c               |  3 ++
 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 +
 20 files changed, 167 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/hns3_ethdev.c
 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 b3d9aad..9c137c1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -613,6 +613,14 @@ F: drivers/net/hinic/
 F: doc/guides/nics/hinic.rst
 F: doc/guides/nics/features/hinic.ini
 
+Hisilicon hns3
+M: Wei Hu (Xavier) <xavier.huwei@huawei.com>
+M: Min Hu (Connor) <humin29@huawei.com>
+M: Yisen Zhuang <yisen.zhuang@huawei.com>
+F: drivers/net/hns3/
+F: doc/guides/nics/hns3.rst
+F: doc/guides/nics/features/hns3.ini
+
 Intel e1000
 M: Wenzhuo Lu <wenzhuo.lu@intel.com>
 T: git://dpdk.org/next/dpdk-next-net-intel
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/common_linux b/config/common_linux
index 6e25255..96e2e1f 100644
--- a/config/common_linux
+++ b/config/common_linux
@@ -63,3 +63,8 @@ CONFIG_RTE_LIBRTE_ENETC_PMD=y
 # HINIC PMD driver
 #
 CONFIG_RTE_LIBRTE_HINIC_PMD=y
+
+#
+# Hisilicon HNS3 PMD driver
+#
+CONFIG_RTE_LIBRTE_HNS3_PMD=y
diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc
index 26ab5c5..c91423f 100644
--- a/config/defconfig_arm-armv7a-linuxapp-gcc
+++ b/config/defconfig_arm-armv7a-linuxapp-gcc
@@ -55,4 +55,5 @@ CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
 CONFIG_RTE_LIBRTE_AVP_PMD=n
 CONFIG_RTE_LIBRTE_NFP_PMD=n
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+CONFIG_RTE_LIBRTE_HNS3_PMD=n
 CONFIG_RTE_LIBRTE_PMD_IOAT_RAWDEV=n
diff --git a/config/defconfig_i686-native-linuxapp-gcc b/config/defconfig_i686-native-linuxapp-gcc
index 07fc5f8..61ea160 100644
--- a/config/defconfig_i686-native-linuxapp-gcc
+++ b/config/defconfig_i686-native-linuxapp-gcc
@@ -59,3 +59,8 @@ CONFIG_RTE_MAX_MEM_MB=2048
 # HINIC PMD is not supported on 32-bit
 #
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+
+#
+# HNS3 PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_HNS3_PMD=n
diff --git a/config/defconfig_i686-native-linuxapp-icc b/config/defconfig_i686-native-linuxapp-icc
index 34f34d5..7f614d3 100644
--- a/config/defconfig_i686-native-linuxapp-icc
+++ b/config/defconfig_i686-native-linuxapp-icc
@@ -59,3 +59,8 @@ CONFIG_RTE_MAX_MEM_MB=2048
 # HINIC PMD is not supported on 32-bit
 #
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+
+#
+# HNS3 PMD is not supported on 32-bit
+#
+CONFIG_RTE_LIBRTE_HNS3_PMD=n
diff --git a/config/defconfig_ppc_64-power8-linuxapp-gcc b/config/defconfig_ppc_64-power8-linuxapp-gcc
index de411e9..b7b9d6f 100644
--- a/config/defconfig_ppc_64-power8-linuxapp-gcc
+++ b/config/defconfig_ppc_64-power8-linuxapp-gcc
@@ -30,4 +30,5 @@ CONFIG_RTE_LIBRTE_FM10K_PMD=n
 CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
 CONFIG_RTE_LIBRTE_AVP_PMD=n
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+CONFIG_RTE_LIBRTE_HNS3_PMD=n
 CONFIG_RTE_LIBRTE_PMD_IOAT_RAWDEV=n
diff --git a/config/defconfig_x86_64-native-linuxapp-icc b/config/defconfig_x86_64-native-linuxapp-icc
index d82b922..8aa7af7 100644
--- a/config/defconfig_x86_64-native-linuxapp-icc
+++ b/config/defconfig_x86_64-native-linuxapp-icc
@@ -22,3 +22,8 @@ CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
 # HINIC PMD build is not supported using icc toolchain
 #
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+
+#
+# HNS3 PMD build is not supported using icc toolchain
+#
+CONFIG_RTE_LIBRTE_HNS3_PMD=n
diff --git a/config/defconfig_x86_x32-native-linuxapp-gcc b/config/defconfig_x86_x32-native-linuxapp-gcc
index bcc7208..c188f43 100644
--- a/config/defconfig_x86_x32-native-linuxapp-gcc
+++ b/config/defconfig_x86_x32-native-linuxapp-gcc
@@ -39,3 +39,8 @@ CONFIG_RTE_MAX_MEM_MB=2048
 # HINIC PMD is not supported on 32-bit
 #
 CONFIG_RTE_LIBRTE_HINIC_PMD=n
+
+#
+# HNS3 PMD is not supported on 32-bit
+#
+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..2eb57c8
--- /dev/null
+++ b/doc/guides/nics/features/hns3.ini
@@ -0,0 +1,9 @@
+;
+; Supported features of the 'hns3' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Linux UIO            = Y
+Linux VFIO           = Y
+ARMv8                = Y
diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
new file mode 100644
index 0000000..505488b
--- /dev/null
+++ b/doc/guides/nics/hns3.rst
@@ -0,0 +1,60 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018-2019 Hisilicon Limited.
+
+HNS3 Poll Mode Driver
+===============================
+
+The hns3 PMD (librte_pmd_hns3) provides poll mode driver support
+for the inbuilt Hisilicon Network Subsystem(HNS) network engine
+found in the Hisilicon Kunpeng 920 SoC.
+
+Features
+--------
+
+Features of the HNS3 PMD are:
+
+- 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
+-------------
+- Get the information about Kunpeng920 chip using
+  `<http://www.hisilicon.com/en/Products/ProductList/Kunpeng>`_.
+
+- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` 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 <pmd_build_and_test>`
+for details.
+
+Limitations or Known issues
+---------------------------
+Currently, we only support VF device is bound to vfio_pci or
+igb_uio and then driven by DPDK driver when PF is driven by
+kernel mode hns3 ethdev driver, VF is not supported when PF
+is driven by DPDK driver.
+
+Build with ICC is not supported yet.
+X86-32, Power8, ARMv7 and BSD are not supported yet.
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index 9fec02f..d477001 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -28,6 +28,7 @@ Network Interface Controller Drivers
     enic
     fm10k
     hinic
+    hns3
     i40e
     ice
     ifc
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 1b8bd6f..a54a29d 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,12 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added Hisilicon hns3 PMD.**
+
+  Added the new ``hns3`` net driver for the inbuilt Hisilicon Network
+  Subsystem 3(HNS3) network engine found in the Hisilicon Kunpeng 920 SoC.
+  See the :doc:`../nics/hns3` guide for more details on this new driver.
+
 * **Updated the Intel ice driver.**
 
   Updated the Intel ice driver with new features and improvements, including:
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..ddf3bfb
--- /dev/null
+++ b/drivers/net/hns3/Makefile
@@ -0,0 +1,23 @@
+# 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)
+
+EXPORT_MAP := rte_pmd_hns3_version.map
+
+LIBABIVER := 1
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_HNS3_PMD) += hns3_ethdev.c
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
new file mode 100644
index 0000000..3f74e54
--- /dev/null
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018-2019 Hisilicon Limited.
+ */
diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
new file mode 100644
index 0000000..1a307a7
--- /dev/null
+++ b/drivers/net/hns3/meson.build
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018-2019 Hisilicon Limited
+
+if not is_linux
+	build = false
+	reason = 'only supported on Linux'
+	subdir_done()
+endif
+
+if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_64')
+	build = false
+	reason = 'only supported on x86_64 and arm64'
+	subdir_done()
+endif
+
+sources = files(
+	'hns3_ethdev.c',
+	)
+deps += ['hash']
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..35e5f2d
--- /dev/null
+++ b/drivers/net/hns3/rte_pmd_hns3_version.map
@@ -0,0 +1,3 @@
+DPDK_19.11 {
+	 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


  reply	other threads:[~2019-09-26 14:04 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 14:01 [dpdk-dev] [PATCH v3 00/22] add hns3 ethernet PMD driver Wei Hu (Xavier)
2019-09-26 14:01 ` Wei Hu (Xavier) [this message]
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 02/22] net/hns3: add hardware registers definition Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 03/22] net/hns3: add some definitions for data structure and macro Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 04/22] net/hns3: register hns3 PMD driver and add the log interface definition Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 05/22] net/hns3: add support for cmd of hns3 PMD driver Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 06/22] net/hns3: add the initialization " Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 07/22] net/hns3: add support for MAC address related operations Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 08/22] net/hns3: add support for some misc operations Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 09/22] net/hns3: add support for link_update operation Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 10/22] net/hns3: add support for flow directory of hns3 PMD driver Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 11/22] net/hns3: add support for RSS " Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 12/22] net/hns3: add support for flow control " Wei Hu (Xavier)
2019-09-26 14:01 ` [dpdk-dev] [PATCH v3 13/22] net/hns3: add support for vlan " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 14/22] net/hns3: add support for mailbox " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 15/22] net/hns3: add support for hns3 VF " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 16/22] net/hns3: add RX/TX package burst and queue related operation Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 17/22] net/hns3: add start stop configure promiscuous ops Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 18/22] net/hns3: add dump register ops for hns3 PMD driver Wei Hu (Xavier)
2019-09-27 18:31   ` Ferruh Yigit
2019-09-29 12:09     ` Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 19/22] net/hns3: add abnormal interrupt process " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 20/22] net/hns3: add stats related ops " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 21/22] net/hns3: add reset related process " Wei Hu (Xavier)
2019-09-26 14:02 ` [dpdk-dev] [PATCH v3 22/22] net/hns3: add multiple process support " Wei Hu (Xavier)
2019-09-27  6:52 ` [dpdk-dev] [PATCH v3 00/22] add hns3 ethernet " Wei Hu (Xavier)
2019-09-27  8:47   ` Ferruh Yigit
2019-09-27 19:16     ` Jeremy Plsek
2019-09-27 18:30 ` Ferruh Yigit
2019-09-29 12:12   ` Wei Hu (Xavier)
2019-09-30  8:52     ` Ferruh Yigit
2019-10-11  1:30       ` Wei Hu (Xavier)
2019-10-10 17:10   ` Ferruh Yigit
2019-10-11  1:39     ` Wei Hu (Xavier)
2019-10-11  2:40       ` Wei Hu (Xavier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569506528-60464-2-git-send-email-xavier.huwei@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=dev@dpdk.org \
    --cc=forest.zhouchang@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=xavier.huwei@tom.com \
    --cc=xavier_huwei@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).