[01/17] net/ionic: add skeleton

Message ID 157083999181.11524.14412618767163406859.stgit@devele (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series Series short description |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-compilation warning Compilie Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Alfredo Cardigliano Oct. 12, 2019, 12:26 a.m. UTC
  Add makefile and config file options to compile the Pensando ionic PMD.
Add feature and version map file.
Update maintainers file.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
---
 MAINTAINERS                                 |    6 +++
 config/common_base                          |    5 ++
 doc/guides/nics/features/ionic.ini          |    8 ++++
 doc/guides/nics/index.rst                   |    1 
 doc/guides/nics/ionic.rst                   |   45 +++++++++++++++++++++
 drivers/net/Makefile                        |    1 
 drivers/net/ionic/Makefile                  |   57 +++++++++++++++++++++++++++
 drivers/net/ionic/meson.build               |    8 ++++
 drivers/net/ionic/rte_pmd_ionic_version.map |    5 ++
 mk/rte.app.mk                               |    1 
 10 files changed, 137 insertions(+)
 create mode 100644 doc/guides/nics/features/ionic.ini
 create mode 100644 doc/guides/nics/ionic.rst
 create mode 100644 drivers/net/ionic/Makefile
 create mode 100644 drivers/net/ionic/meson.build
 create mode 100644 drivers/net/ionic/rte_pmd_ionic_version.map
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 6adf20107..ff1fee06a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -787,6 +787,12 @@  F: drivers/net/enetc/
 F: doc/guides/nics/enetc.rst
 F: doc/guides/nics/features/enetc.ini
 
+Pensando ionic
+M: Alfredo Cardigliano <cardigliano@ntop.org>
+F: drivers/net/ionic/
+F: doc/guides/nics/ionic.rst
+F: doc/guides/nics/features/ionic.ini
+
 QLogic bnx2x
 M: Rasesh Mody <rmody@marvell.com>
 M: Shahed Shaikh <shshaikh@marvell.com>
diff --git a/config/common_base b/config/common_base
index 6a7e00d75..1c11fcae6 100644
--- a/config/common_base
+++ b/config/common_base
@@ -270,6 +270,11 @@  CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
 CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 
+#
+# Compile Pensando IONIC PMD driver
+#
+CONFIG_RTE_LIBRTE_IONIC_PMD=y
+
 #
 # Compile burst-oriented HINIC PMD driver
 #
diff --git a/doc/guides/nics/features/ionic.ini b/doc/guides/nics/features/ionic.ini
new file mode 100644
index 000000000..3a92eedc7
--- /dev/null
+++ b/doc/guides/nics/features/ionic.ini
@@ -0,0 +1,8 @@ 
+;
+; Supported features of the 'ionic' network poll mode driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+x86-64               = Y
+Usage doc            = Y
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index d477001d9..185457325 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -33,6 +33,7 @@  Network Interface Controller Drivers
     ice
     ifc
     igb
+    ionic
     ipn3ke
     ixgbe
     intel_vf
diff --git a/doc/guides/nics/ionic.rst b/doc/guides/nics/ionic.rst
new file mode 100644
index 000000000..aaf59981f
--- /dev/null
+++ b/doc/guides/nics/ionic.rst
@@ -0,0 +1,45 @@ 
+..  SPDX-License-Identifier: GPL-2.0
+    Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
+
+IONIC Driver
+============
+
+The ionic driver provides support for Pensando server adapters.
+
+Identifying the Adapter
+-----------------------
+
+To find if one or more Pensando PCI Ethernet devices are installed 
+on the host, check for the PCI devices:
+
+   .. code-block:: console
+
+      lspci -d 1dd8:
+      b5:00.0 Ethernet controller: Device 1dd8:1002
+      b6:00.0 Ethernet controller: Device 1dd8:1002
+
+Pre-Installation Configuration
+------------------------------
+
+The following options can be modified in the ``config`` file.
+Please note that enabling debugging options may affect system performance.
+
+- ``CONFIG_RTE_LIBRTE_IONIC_PMD`` (default ``y``)
+
+  Toggle compilation of ionic PMD.
+
+- ``CONFIG_RTE_LIBRTE_IONIC_DEBUG_RX`` (default ``n``)
+
+  Toggle display of receive fast path run-time messages.
+
+- ``CONFIG_RTE_LIBRTE_IONIC_DEBUG_TX`` (default ``n``)
+
+  Toggle display of transmit fast path run-time messages.
+
+Building DPDK
+-------------
+
+The ionic PMD driver supports UIO and VFIO, please refer to the 
+:ref:`DPDK documentation that comes with the DPDK suite <linux_gsg>`
+for instructions on how to build DPDK. 
+
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 1770d8b23..cb7921c6f 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -34,6 +34,7 @@  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
+DIRS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) += ionic
 DIRS-$(CONFIG_RTE_LIBRTE_IPN3KE_PMD) += ipn3ke
 DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe
 DIRS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += liquidio
diff --git a/drivers/net/ionic/Makefile b/drivers/net/ionic/Makefile
new file mode 100644
index 000000000..3add24087
--- /dev/null
+++ b/drivers/net/ionic/Makefile
@@ -0,0 +1,57 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_ionic.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+EXPORT_MAP := rte_pmd_ionic_version.map
+
+LIBABIVER := 2
+
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+#
+# CFLAGS for icc
+#
+CFLAGS += -diag-disable 174 -diag-disable 593 -diag-disable 869
+CFLAGS += -diag-disable 981 -diag-disable 2259 -diag-disable 3656
+
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
+#
+# CFLAGS for clang
+#
+CFLAGS += -Wno-unused-parameter -Wno-unused-value -Wno-strict-aliasing
+CFLAGS += -Wno-format-extra-args
+
+else
+#
+# CFLAGS for gcc
+#
+ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
+CFLAGS += -Wno-deprecated -Wno-unused-parameter -Wno-unused-value
+CFLAGS += -Wno-strict-aliasing -Wno-format-extra-args
+CFLAGS += -Wno-missing-field-initializers -Wno-pointer-arith
+endif
+
+ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
+CFLAGS += -Wno-implicit-fallthrough
+endif
+
+endif
+
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
+LDLIBS += -lrte_bus_pci
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_IONIC_PMD) +=
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/ionic/meson.build b/drivers/net/ionic/meson.build
new file mode 100644
index 000000000..502076e3c
--- /dev/null
+++ b/drivers/net/ionic/meson.build
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Pensando
+
+version = 1
+
+sources = files(
+)
+
diff --git a/drivers/net/ionic/rte_pmd_ionic_version.map b/drivers/net/ionic/rte_pmd_ionic_version.map
new file mode 100644
index 000000000..96f83bd6c
--- /dev/null
+++ b/drivers/net/ionic/rte_pmd_ionic_version.map
@@ -0,0 +1,5 @@ 
+DPDK_2.0 {
+
+	local: *;
+};
+
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 17b991604..d324078e3 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -176,6 +176,7 @@  _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
+_LDLIBS-$(CONFIG_RTE_LIBRTE_IONIC_PMD)      += -lrte_pmd_ionic
 _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD)      += -lrte_pmd_ixgbe
 ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KNI)        += -lrte_pmd_kni